LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Configure VISA Read to terminate on unique character sequence

I am communicating with an instrument via a TCP connection using VISA read/write. The terminating character sequence from the instrument is "->" Is it possible to get VISA to terminate on this character sequence and basically not return these characters in a read?

0 Kudos
Message 1 of 4
(2,908 Views)

No, it can only be configured to terminate on a single character. If you know that '>' will not appear in your data you can use that as your termination character. Otherwise you need to create your own read VI that will look for a sequence of characters as the termination value.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 4
(2,903 Views)

Since you are TCP-  you could use the telnet vi's   

to read until line end with a "line end" set to any string (like "->")  This requires the internet toolkit but, this may be part of your package since it ships in some Developer Suites.

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 4
(2,894 Views)

Hey Amaglio,

What Mark and Jeff have said is correct the VISA read/write can only take one termination character.  The termination character can be set using a Property Node after the VISA Open.  It is probably easiest to see if that method will work for your application by using > as the termination character and then programatically removing the - from the end of the string after it is read.  Telnet is also another option but there isn't a whole lot of documentation out there that I can find on using it for your type of application.  Additionally you could use the TCP communication pallette which you can find examples of in the LabVIEW example finder under  Communicating with External Applications->General.  Please post back if you have issues with these methods.   

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 4 of 4
(2,872 Views)