02-06-2007 02:49 PM
Hello,
I am a new Labview user. I have an instrument that would continuously send out 20 bytes of data every 500ms at the 9600baud/8data/1parity rate connected to COM5(via USB) port of a NI PXI box. I want to extract & display the 8th byte from every transmission continuously. Which VI function can I use to wait for the 400ms communication timeout first before starting the VISA RD and then Parse function? If I don't use timeout to begin READ, I am worried that it would start counting the bytes at the wrong place and get out of sync. Any suggestion would be greatly appreciated.
02-06-2007 03:25 PM
You need to sync up with the data stream before starting a loop that continuously reads the buffer every 500mS. Does the 20bytes of data end with a unique termination character? If so you can use VISA events to detect when the termination character has been received. You could then dump the buffer and start a loop that read 20 bytes of data from the buffer every 500ms.
You could also use the VISA Events to detect the absence of incoming data for a period greater that say 100mS. Once you detect the gap between data transmissions, dump the buffer and start your loop.