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

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: 645
Registriert: Samstag 18. Oktober 2008, 21:12

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

Beitrag von KAKTUS » Montag 14. Februar 2011, 18:18

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

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

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) 313-mal heruntergeladen

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

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

Beitrag von Uncle » Montag 21. Februar 2011, 19:32

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

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

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: 3413
Registriert: Dienstag 23. September 2008, 10:54
Kontaktdaten:

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

Beitrag von abacom » Dienstag 26. April 2011, 08:30

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

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: 3413
Registriert: Dienstag 23. September 2008, 10:54
Kontaktdaten:

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

Beitrag von abacom » Dienstag 14. Juni 2011, 07:59

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

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“