12-15-2011 10:26 AM
Are you reading and decoding the header? Are you sure that all of your messages are the same length. First and foremost I would read the header only and use the length provided to read the rest of the data. When reading the header you can verify you have valid data by verifying the first two bytes are 0xA5 0x09. The read the length value followed by a read of teh length you just read. If your header is not valid begin reading the data and search through it to find the first valid header. Discard any data up to that point. Once you have your header begin processing the packets again.
12-15-2011 10:49 AM
12-15-2011 10:53 AM
Thanks lesher the picture will be of great help!
thanks!
12-15-2011 11:27 AM
This is a crude example on how to do it from the top of my head. Using state machine structure. It should work I hope. Use it as a template as it only show the principles. I have omitted error control on many places. That task I leave to you. If no instrument is present the app will appear to hang. Also the synch part should be made in a sub VI. So it stil a lot of work to do 😉

12-16-2011 04:30 PM
I love queues! But I love reusable code more. Oh, and flexible code. The attached method (LV10, as OP mentioned) is how I typically handle these. It allows for simple Bytes-per-second information, as well as knowledge of exactly which Bytes may have been dropped, and counting packet types.
Granted, it is overkill for a single-function device with fixed-length transmission.