LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Read function node replys slowely if the string does not consists "end of line constant"

 
0 Kudos
Message 1 of 3
(762 Views)
And you are also probably getting a VISA Read timeout error but if you don't have automatic error checking turned on or using the error out connections, you probably aren't seeing this. With the VISA Configure Serial Port, you have an input called Enable Termination Char (T). If you don't have anything wired to this, this defaults to True and the default termination character is 0xA which is also a \n which is also the Line Feed character. With Enable Termination Char set to true, the VISA Read will continue to read until either the byte count is reached OR the termination character is detected. If you specify a byte count that is higher than what the instrument is returning, then VISA Read will continue to read for the until the termination character is detected. If it is never found, then after the timeout value is reached (a default of 10 sec), then you get the timeout error. What you can do is set Enable Termination Char to false and before doing a read, use the VISA Bytes at Serial Port to determine exactly how many bytes are available and pass that number to the byte count of VISA Read.
Message 2 of 3
(757 Views)

Thanks!!!

I set byte count and it works now.

0 Kudos
Message 3 of 3
(729 Views)