Seite 1 von 1

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

Verfasst: Samstag 12. Februar 2011, 20:52
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.

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

Verfasst: Montag 14. Februar 2011, 18:18
von KAKTUS
I get this message yesterday the first time. Maybe its a problem with serial port.

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

Verfasst: Dienstag 15. Februar 2011, 09:40
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.

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

Verfasst: Samstag 19. Februar 2011, 21:46
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.

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

Verfasst: Montag 21. Februar 2011, 19:32
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.

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

Verfasst: Montag 21. Februar 2011, 19:38
von Uncle
Eagle, can You restart the program after this error?

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

Verfasst: Freitag 22. April 2011, 14:17
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.

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

Verfasst: Dienstag 26. April 2011, 08:30
von abacom
Try latest driver from FTDI (currently 2.08.xx)
http://www.ftdichip.com/Drivers/VCP.htm

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

Verfasst: Freitag 10. Juni 2011, 15:47
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.

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

Verfasst: Dienstag 14. Juni 2011, 07:59
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.

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

Verfasst: Dienstag 1. November 2011, 09:33
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.