07-27-2019 01:33 PM - edited 07-27-2019 01:36 PM
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"
07-29-2019 09:50 AM
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
07-29-2019 02:46 PM
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.