Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview VISA and SCPI command

When use VISA VIs(VISA open/write/read/close) to control VNA(vector network analyzer, Keysight M9804A), how to excute the scpi command in sequence?

 

 

Example:

 

Try to use normal command *OPC? to check the state of excution, the harware should reply +1 if the command in queue has been completed. But after writing *OPC? command and reading it, it caused query interrupy error, and there is no reply of *OPC command. 

 

 

The block diagram as follow:

Sandra421_0-1696988698809.png

 

0 Kudos
Message 1 of 4
(986 Views)

I'm concerned about your Memory Load since you are potentially pointing the VNA to a file on your computer that the VNA does not have access to.  That would be the first thing I would look at.

 

What bus are you using for the communication (GPIB, Ethernet, RS-232, etc)?  How are you initializing the VISA resource?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(948 Views)

Crossrulz is correct, that path needs to be a location on the VNA.  It can point to a *.csa file with setup and cal.  I'm not sure *OPC? is applied to that command, it needs to be a command that updates the status resister or the instrument.  You can look at the extensive status register model for the VNA and check if there's a bit for that request. 

 

An easier method would be to set some value of the measurement to something obsurd, try to load the file and make sure the obsurd value has changed.  For example you could be to set the Start and Stop Freq to something ridiculous (S=1,11111GHz, End=2.22222GHz, # Pts 3), try to load the file that making sure the actual Start and Stop frequencies significantly different.  Query the start and stop.frequencies, if they are not 1.111GHz and 2.2222GHz then assume the file was loaded successfully.

 

Hope that helps.

Craig

0 Kudos
Message 3 of 4
(928 Views)

Have successfully connected to VNA, when load correct .csa file it has no question. But we now delete some content in the .csa file to simulate load error .csa file, *OPC? command will cause query interruption and the command :SYSTem:ERRor? to visit error state is diabled.

0 Kudos
Message 4 of 4
(903 Views)