LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial read

I am trying to read from the serial port using the visa read. the problem I encounter is that the hex string that I am interested in does not have a set number of bytes. The visa read asks me for the number of bytes, and when I enter a number i have wraparounds of strings. I was wondering if anyone knew how to terminate the read at a character rather than the a set number of bytes.
 
 
L.A.
0 Kudos
Message 1 of 3
(2,340 Views)
You might want to look into the VISA Events vi's.  You can set up a VISA Event to trigger when a termination character is received.
0 Kudos
Message 2 of 3
(2,336 Views)
The VISA Configure Serial Port sets the termination character. By default, it is set xA which is the LF character. Also by default, the VISA Configure Serial Port has the termination character enabled. With it enabled, your read will terminate automatically even if you have some extremely high number of bytes to read specified. It seems to me though, that you would be better off disabling the termination character and use the VISA Bytes at Serial Port to determine how many bytes to read.
0 Kudos
Message 3 of 3
(2,329 Views)