LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Agilent N1996A Query Interrupted

I am trying to query the Agilent CSA Spectrum Analyzer N1996A.  I'm simply using the VISA Write that is already in LabVIEW.

I can send it commands and it will do them, so I know the Write is working to a certain extent.  I'm just not sure if there is some other setting I need to set or something.

 

So this works: SENS:SWE:TIME:AUTO ON ... or ... SENS:SWE:TIME 500

This doesn't work.  It throws a Query INTERRUPTED error on the screen: SENS:SWE:TIME:AUTO?

None of the queries work, not even SENS:SWE:TIME?, *OPC?, *OPT?, *TST?.... they all give me the Query INTERRUPTED eror.

 

I've tried this with doing an immediate VISA Read afterward, and without doing a Read.  When I try the read, it detects 0 bytes on the input to read. 

 

Does anyone know what I'm missing here?  This is on LabVIEW 8.6. and it's over GPIB.

Thanks in advance

0 Kudos
Message 1 of 4
(4,620 Views)

OK, Lets see what we've got here.

1: Does the device show up in MAX under GPIB? 

NO- check the instrument set-up its communications options are wrong or the device has a problem.

YES- 2: Can you talk to it from GPIB interactive control?

 


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

Try clearing the status register *CLS before sending a new query. Some of the commands you sent are incorrect and will put the analyzer in an error state, it should be a space and not a colon between TIME and AUTO (SENS:SWE:TIME AUTO ON).

 

Ben64

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

I was able to sort it out.  I was actually using a simple Write Instrument Data VI that just called the VISA Write function and followed it up with a Check For Error VI that sent a *ESR? command (immediately after the "write" command).  So, checking for an error actually created an error!

I took that out of my Write Instrument Data SubVI and it works correctly now.  I'll have to check for errors at the higher level.

Thanks for the responses!

PS.  My Commands were correct Smiley Tongue

0 Kudos
Message 4 of 4
(4,604 Views)