LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Agilent 34970A doesn't return error when it should

See attached subvi. When I run this in my main vi and enter nothing in the RELAY string control (which is the required scanlist for the Agilent) and click RESET, the Agilent, as expected, beeps and displays an error on the front panel but the error status in this vi doesn't go true. Why not? (The Agilent Initialize.vi occurs before this vi is run in the main vi.)
0 Kudos
Message 1 of 3
(2,587 Views)

Why should there be an error returned? There is no error in writing or reading. You are not doing an error query of the instrument.

 

If you were to use the driver, you would find the error query function and you could place that in your code to check to see if you have sent an illegal command. What would be better though, would be to ensure that the value that is entered into the string is valid before wasting the time with the VISA Write and Read. An empty string should never be allowed to exit the while loop.

0 Kudos
Message 2 of 3
(2,584 Views)
ok- THANKS.
0 Kudos
Message 3 of 3
(2,572 Views)