Write error (error:5) - what to do?

Antworten
Uncle
Beiträge: 32
Registriert: Donnerstag 12. August 2010, 21:32

Write error (error:5) - what to do?

Beitrag von Uncle »

hi all
I make some pl 4.0 programm to draw a graph, but in some time I got Write error (error:5) message in window with my pl exe file name, and after this program and windows hanging on. I can't find this error description in help, may be somewone can help - what is the source of this error? After this error occure, I have to recompile the programm - something in the set files of my compilation directory make the program to stop some seconds after restart. After the new compilation it is OK in some (about8-10) hours - the programm runs, the f(t) graph is written - but till new Write error (error:5) message.
thank for you help
My pl project includes external *.dll and uart, so I think it is useless to publish .prj file here - it will not work without my hardware. The hardware is tested and works for months without errors, so I think the reason of error is in PL.
KAKTUS
Beiträge: 653
Registriert: Samstag 18. Oktober 2008, 21:12

Re: Write error (error:5) - what to do?

Beitrag von KAKTUS »

I get this message yesterday the first time. Maybe its a problem with serial port.
stachlige Grüße, Kaktus
Uncle
Beiträge: 32
Registriert: Donnerstag 12. August 2010, 21:32

Re: Write error (error:5) - what to do?

Beitrag von Uncle »

I have FTDI235RL VCP , not hardware com port. But where the error occure - in Windows or in PL? I noticed pc almost stopp after the error- it is almost impossible to end the programm.
Eagle
Beiträge: 59
Registriert: Montag 25. Mai 2009, 19:24

Re: Write error (error:5) - what to do?

Beitrag von Eagle »

Hello,
I often have the same problem when I try to send and receive bytes at the same time.
In order to prevent this mistake I use the busy contact as it’s shown in my example.
Dateianhänge
Sample.prj
(1.71 KiB) 1179-mal heruntergeladen
Uncle
Beiträge: 32
Registriert: Donnerstag 12. August 2010, 21:32

Re: Write error (error:5) - what to do?

Beitrag von Uncle »

Thank You, Eagle.
I see the error when I use usb/rs485 , and I see no error when I use usb/rs232 converters. I thought to make this type of feed back.
Uncle
Beiträge: 32
Registriert: Donnerstag 12. August 2010, 21:32

Re: Write error (error:5) - what to do?

Beitrag von Uncle »

Eagle, can You restart the program after this error?
Uncle
Beiträge: 32
Registriert: Donnerstag 12. August 2010, 21:32

Re: Write error (error:5) - what to do?

Beitrag von Uncle »

The problem still remains. Hardware - FT232RL virtual com port. Sometimes I got "Write error(error:05)" message, sometime "Zugriffsveletzung bei Adresse 0076F31F in Modul 'MyProgram.EXE'. Lesen von Adresse 0000020F".
What can I do to prevent the errors?
The program do not read and write at the same time.
abacom
Site Admin
Beiträge: 4092
Registriert: Dienstag 23. September 2008, 10:54
Kontaktdaten:

Re: Write error (error:5) - what to do?

Beitrag von abacom »

Try latest driver from FTDI (currently 2.08.xx)
http://www.ftdichip.com/Drivers/VCP.htm
ABACOM support
Uncle
Beiträge: 32
Registriert: Donnerstag 12. August 2010, 21:32

Re: Write error (error:5) - what to do?

Beitrag von Uncle »

Thank You, abacom.
I used 2.08.02, wil try new.
But I have to remark that no other soft (like terminals) made no foults.
abacom
Site Admin
Beiträge: 4092
Registriert: Dienstag 23. September 2008, 10:54
Kontaktdaten:

Re: Write error (error:5) - what to do?

Beitrag von abacom »

If I got it right your own API-DLL does some RS232 communication, right?
You´ll have to check your DLL source carefully. Likely the communication
fails or gets disturbed from time to time, which is hard to debug.
ABACOM support
Uncle
Beiträge: 32
Registriert: Donnerstag 12. August 2010, 21:32

Re: Write error (error:5) - what to do?

Beitrag von Uncle »

abacom hat geschrieben:If I got it right your own API-DLL does some RS232 communication, right?
You´ll have to check your DLL source carefully. Likely the communication
fails or gets disturbed from time to time, which is hard to debug.
No, I use SendByte and Receive Byte modules.
I install new FTDI driver, but the problem still remains.
Sending and receiving is temporally apart, no less than 10 ms.
Antworten

Zurück zu „Thema RS232“