TestController, Configuration of a SCPI DMM

The software can fairly easy be configured for SCPI devices, in this short article I will describe how to setup a typical bench DMM.

Establish a connection and identify the DMM

For sockets use a "Search socket" for the desired address, for comports enable "Scan serial ports". The try a pressing "Reconnect" and see if the log window on "Commands" complains about a non-matching device.

The above failed

If this is not the case it is necessary to start on the new configuration before it can be found.

Start by taking a copy if "Keysight34465A.txt" and name it for the new device.

The start of the file is:
Code:
#idString Keysight Technologies,34465A,
#name Keysight 34465A
#handle K34465
#port 5025

What is needed to establish communication is the #port, it can have one of the following settings:
With com and comFixedBaud place a "#baudrate 9600" or whatever baudrate is used on the next line.

Change the #name to something else.

Save the file, restart TestController and select this new device on the "Load devices" page and try reconnect. When the settings are correct you will get a complain about non-matching device.



Accepting the new device

With the non-matching message there is some text similar to this: "Tektronix,PA1000,B010302,Ver.1.002.016", i.e. the brand and the name of the device. This is used to setup correct name for the device:

#idString must contain the message up to and include the second comma.
#name is a shorter and more readable version, it will be displayed in the TestController.
#handle is a short version of the name and is used to name columns and to select the device when multiple devices are connected. It must start with a letter and only contain letters and numbers.

When this is fixed, save the file and restart TestController. Now the device will be connected without any error messages and it is possible to give SCPI commands to it on the command line.



Getting data from the device

A command to read the current value must be found. This may involve some initialization and trigger mode configuration. Everything can be test from the command line first.

#initCmd If the meter needs some special command to get into remote control, put them here

#prepareSample Trigger mode and other sample related settings are put here.

#askValues Command to read the current value.

If the meter returns two values, like a number and a range, use this to remove the last value:
#askValuesReadFormat ux



Setting up modes

There are two ways to do this, one is to not do it:

Ignore mode

#value Value - SI _
#askMode

The above two lines will say the meter returns one column with unspecified unit and the software cannot ask the meter about mode.



Controlling mode from TestController

This requires some more configuration, first define all the possible measurement modes:

Code:
#value VoltageDC V d5 VDC,VDCfast,d
#value CurrentDC A si ADC,ADC10A
#value VoltageAC V d5 VAC
#value CurrentAC A si AAC,AAC10A
#value Resistance ohm si ohm,ohm4
#value Capacitance F si c
#value Temperature C d3 temp
#value Frequency Hz si hz
#value Ratio - d3 Ratio
#value Period s si Period

It is measurement name, unit, format and modeName. The mode name must either match what is used on the #cmdMode or the values mode values read from the meter.
Reading the actual mode from the meter is done with:

#askMode SCPI command to read mode

Use the command line to find the exact name of all modes.

To make the mode selection menu and connect the measurement names with the meter value use a #cmdMode for each mode:

#cmdMode modeName #askMode_answer SCPI commands to select mode.

The modeName must match the #value specification that must be used for that mode. This name is also shown on the button to select this mode.
The #askMode_answer is the text returned by the meter when enquiring about the current mode.
The SCPI commands can be one or more commands to select this mode and do any extra configuration needed. It can stretch over multiple lines.

#cmdMode VDC VOLT abort;*cls;CONF:VOLT:DC;sense:voltage:dc:nplc 10;

An example of a #cmdMode, one is needed for each mode the meter has




Closing down

When disconnecting from the device it is sometimes necessary to give it one or more command to return to manual mode. This is done with #finalCmd

#finalCmd abort;*cls;*rst;init;system:local

One example on closing down a connection.




Conclusion

This is a short and hastily written description on how to setup a multimeter in TestController. If more details are needed in some chapters please ask.

I am interested in well working definitions and would like to include them with the software. I will add a #author tag that can be used to automatic add credit for supplied definitions on the About page.