04-09-2011 09:26 AM
I'm trying to receive the following protocol which works, except I have to insert the equipment while the serial port is sending data. So sometimes the first line is partial data and that causes errors down the line. My thought was to wait to receive data until I receive the &&\r\n0108. Any suggestion or code to implement that would be great.
Here is a couple of sample packets:
&&\r\n
0108136.19\r\n
0110146.19\r\n
01130.35\r\n
012350.00\r\n
!!\r\n
&&\r\n
2350155.19\r\n
!!\r\n
TIA,
Jerry
04-11-2011 11:32 AM
Hey Raptor50,
I would recommend using a queue to take in the data and then build an array and then trigger some event to start off of the &&/r/n0108 after this line is found you can proceed normally withou any lose of data. 🙂
These may help:
http://decibel.ni.com/content/docs/DOC-15453
http://decibel.ni.com/content/docs/DOC-8653
04-12-2011 09:04 PM
Sam,
Thanks. I'll give that a shot.
Jerry