Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Keysight Command Expert & 34970A: Measuring Current

I'm trying to make sure I'm using the right commands with Keysight Command Expert before I use Python commands. Using GPIB interface and using the 34901A modules. I am able to display current off the data logger's display so I know it isn't a hardware configuration issue. I'm sure I just don't have the correct measure setup.

 

This is how I have it setup...

 

In order to read Measuring Current, I need those first four formatting commands (according to Command Expert). Which is why those are added to the sequence...

 

However, I'm unable to extract Current. My error with Command Expert: 

(':MEASure:CURRent:DC? %s,%s,(%s)' % ('AUTO', 'MAX', '122'))" "COMException:VI_ERROR_TMO: A timeout occurred | CommunicationTimeoutException:SCPI connection attempt timed out | SCPI Error: -102,Syntax error | SCPI Error: -420,Query UNTERMINATED"
Not sure where to go next... 
0 Kudos
Message 1 of 3
(4,192 Views)

Before you can make measurement or read measured data, you need to setup the measurement type.  That's usually a SCPI command like ":SENS:FUNC "CURR:DC"".  (I'd verify that SCPI command in the manual, I'm going by memory!)

 

Once you do that you should be able to make a measurement and read back the DC current.  By default all channels are usually set to VOLT:DC, so you can't read current.

 

The SCPI programming examples in the manual, (usually in VB from 1992)  are easy to understand and are usually a good place to start learning what the full sequence of commands needs to be to accomplish a specific measurement task.

 

Hope that helps.

Craig

0 Kudos
Message 2 of 3
(4,102 Views)

These SCPI commands for this instrument are extremely particular with where the comma (,) appears prior to the channel parenthesis (@106) and following the end of the command/query.  Depending on the command/query it may want the comma first without any spaces then followed by a space while others require a space directly after the command/query followed by the comma and the start of the parenthesis.  For example:

MEAS:VOLT:DC? ,(@106)
MEAS:VOLT:DC?, (@106)

One of these will give an error while the other should be provide a valid reading response.

 

It is not necessary to add any of the lowercase letters to the command/queries nor is it necessary to post the default ranges or resolutions.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 3 of 3
(4,088 Views)