LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ILabVIEW VISA Read

I am using the LabVIEW VISA VIs to read data from an external device through the serial port. The data are delivered as packets of 6 bytes. At VISA read, I read in 6 bytes at the "byte count". But at some instances, the device does not deliver 6 bytes. At these instances, the program stalls. I would like to know techniques that I can use to improve this problem without stalling the program.

 

Thank you very much

 

0 Kudos
Message 1 of 2
(2,620 Views)
You need to redesign your program so that you don't have a fixed byte count. If the instrument sends data with a termination character, you should enable this with the VISA Configure Serial Port. Then you can use a high byte count and the read will automatically terminate when the term character is detected. If no termination character, use the VISA Bytes at Serial Port to determine how many bytes are in the buffer and wire this to the VISA Read byte count input.
0 Kudos
Message 2 of 2
(2,617 Views)