LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Script

Solved!
Go to solution

Hi there, 

 

If you look at my script and the front panel, you can see that the first "read and write" sequence executes perfectly and prints the program name "Temperature Test". However, the second "read and write" VISA sequence does not execute at all as indicated by nothing printing in the read buffer 2 indicator. Just to mention, when I delete the second "read and write" sequence entirely from the script and run the script one at a time with different commands, (:PROGRAM:NAME?, *IDN?), each time it works. In the script attached, switching the places of *IDN? and :PROGRAM:NAME? does what is expected: the *IDN is properly printed but the program name is never printed, so the issue is obviously with the second read and write block combination.

 

I am relatively new to LabVIEW so I could easily be missing something glaringly obvious here, could somebody take a quick peek?

 

Much appreciated, Justin

Download All
0 Kudos
Message 1 of 4
(2,417 Views)

That's not a script.  It is the exact opposite of a script since it is done with graphical programming.  What you have is a block diagram.

 

Most times when writing human readable commands to an instrument, the instrument expects to see some termination character as the end of the string such as a carriage return or linefeed.  You don't have that in either of your commands.  But much of this was already discussed in your previous thread.

 

https://forums.ni.com/t5/LabVIEW/Problem-with-VISA-Read/td-p/3812605

 

Isn't this a continuation of that thread?  You should have continued there.

0 Kudos
Message 2 of 4
(2,408 Views)

Yes sorry I didn't know whether or not to start a new topic... I will repost problem in that thread.

0 Kudos
Message 3 of 4
(2,404 Views)
Solution
Accepted by topic author laps682

I think if you use the property nodes to set the TermChar Enable and Send End Enable (everything from the first half of the VI from yesterday minus the VISA clear) then all of your read and writes will work.

Message 4 of 4
(2,372 Views)