I'm working with a measurement system that is connected to my computer trough a com cable.
Everything is fine but in a different time intervall under the same conditions the device stops sending codes...
I dunno why but may you can help me.
Here's my connection
// Set the port's settings comport.BaudRate = 9600; comport.DataBits = 7; comport.Parity = Parity.Even; comport.Handshake = Handshake.XOnXOff; comport.RtsEnable = true; comport.ReadTimeout = 500; comport.WriteTimeout = 500; comport.PortName = portname;
|
Is there maybe a timeout or a datalimit or so?
So it stops sending ?
Edit: I'm sending codes like 10 with a 1 second waiting time between every. Maybe to short?
Sascha BPosted Sep 8, 2010, 9:06 AM
Thanks
In the meantime I made a workaround.
I catched the place where the failure sending code starts and put it in a try and catch area.
The catch area is now filled with a disconnect and connect (reconnect) command.
An it works! Sadly XD
Dunno why but the device is after a "crash" or timeout not aviable until I reconnect it.
So, solved :)
AnkurPosted Sep 8, 2010, 6:58 AM
i think "writetimeout" property may be the culprit. try observing failures, if their occurrence shows a pattern then it must be the writetimeout property
thanks and regards
ankur malik