LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What's the difference between using Open VISA Test Panel in MAX and VISA open and VISA write vi's?

I am trying to send commands to a netBooter remote power mangement device using TCP. The command is "$A3 1 1" and it must be followed by a termination of \r.

 

I set up a new TCP resource using manual entry of raw socket in MAX and have successfully tested the ability to open a VISA session. When I send the command using Open VISA Test Panel's "viWrite" by typing "$A3 1 1\r" in the buffer, the command works. However, I cannot get the netBooter to execute the same command by using VISA open and VISA write.

 

What could I be missing in the VI?

 

Thanks,

 

Ricardo

 

Download All
0 Kudos
Message 1 of 4
(3,092 Views)

Is there some kind of handshake process that the MAX does to establish a link over TCP?

0 Kudos
Message 2 of 4
(3,061 Views)

Hi Ricardo,

 

You might check whether you already have a default termination character - if so, then manually adding one to the string in LabVIEW might cause a problem.  You can check that (and set it, if necessary) via a property node:

 

VISA Term Char.png

 

Also, are you getting any errors on opening or writing, or is the device just not recognizing the command?

0 Kudos
Message 3 of 4
(3,044 Views)

Thanks for the suggestion, MorganS.

 

I poked around with this problem some more and realized that I was having to execute the command twice in MAX before getting a response in the remote device. I've confirmed with the manufacturer's tech support that their firmware has a bug in it where the first command issued after a new connection is ignored because a buffer is not cleared. The resolutions is to issue two carriage returns before any actual command after first opening the TCP connection.

0 Kudos
Message 4 of 4
(3,037 Views)