From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SCPI communication error

Solved!
Go to solution

I am trying to communicate with an HP 34461A multimeter (with USB).  I am using the example VIs in the driver download from NI.  In the initialize VI, all commands (including VISA reads) generate no errors, until it gets to the Error Query VI.  The write VISA VI does not generate an error (command :SYST:ERR?), but the read VISA VI times out.  The SCPI command is correct according to the manual.  What could cause this?

0 Kudos
Message 1 of 16
(1,891 Views)

Hi Jim,

 


@Jim_Marihew wrote:

the read VISA VI times out. 

What could cause this?


Your device does not respond!

 

(Does it react on any command? Some devices indicate with an LED/in their display their remote operation status...)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 16
(1,855 Views)

Hi Gerd,

As I mentioned, the meter responds to all of the commands up to the request for system errors.  It responds to the *IDN? with appropriate data, accepts the *RST command, and accepts the *ESE 60;*SRE 48;*CLS; commands with no errors.  The next VI in the initialize VI is the Error Query, and that's where it locks up.

0 Kudos
Message 3 of 16
(1,843 Views)

Hi Jim,

 

what happens when you disable the specific command/request? Maybe there are no errors to report...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 16
(1,839 Views)

That's what I don't understand.  It would seem that there should be a response that equates to "I got no problems".  Or just a null, but not ignored response.

0 Kudos
Message 5 of 16
(1,833 Views)

Hi Jim,

 


@Jim_Marihew wrote:

That's what I don't understand.  It would seem that there should be a response that equates to "I got no problems".  Or just a null, but not ignored response.


You don't need to guess and hope for something that "should be"! All you need to know is in the manual!

 

The SYST:ERR? command does not mention any "default" answer. It only mentions: "if an error was generated by a com-
mand sent over GPIB, send SYSTem:ERRor? from GPIB to read the error queue". It does not mention to read from that queue when there was no error before...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 16
(1,824 Views)

I don't understand.  Yes, I have read the manual.  Why does it not respond with a "No Errors" response.  The Read VISA is waiting for a response, and when it gets none (many seconds later) TIMES OUT.

0 Kudos
Message 7 of 16
(1,818 Views)

Hi Jim,

 


@Jim_Marihew wrote:

I don't understand.  Yes, I have read the manual.  Why does it not respond with a "No Errors" response.  The Read VISA is waiting for a response, and when it gets none (many seconds later) TIMES OUT.


You have to ask Keysight about their devices and their firmware...

And you can handle timeout errors very easily in your code...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 16
(1,786 Views)

It seems weird. In the past all instruments did return at least a “0”, some can return “0, No Error” if extended error reporting is enabled.

Could it be that this device has actually three levels of error reporting such as None, Normal and Extended? And your device got in the past configured by someone to None by accident?

Rolf Kalbermatter
My Blog
Message 9 of 16
(1,782 Views)

Alright,  the command is formatted correctly ":SYST:ERR?" should result in ;

  • A system error such as "-201 Query unterminated"
  • "+0 No Error"

So let's look at 2 things:

  • Take the device into "Diet mode" <my joking reference for pressing the "Local / Lo-Cal" button on the front panel> is there a system error? What error(s)?  The same manual will tell you how to navigate the system menu locally. While you are in the Local System Configuration Menu anyhow....double check the communications settings.
  • Look at the Windows Power Management settings for the USB Hub in Windows Device Manager.  Did you remember to change the default setting that allows Windows to shut off the USB Power thereby disabling all data transfer on the port?

EDIT: Let's add a third item.  If the device is armed and awaiting trigger, or otherwise dedicated to doing its primary purpose of taking measurements, it will NOT respond to anything except required common commands (ones that start with "*") until the measurements are done.  A "Specific Device Reset" *RST, or Device Clear *CLR would be needed to cancel the pending order for measurements. 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 16
(1,775 Views)