
; TestController must be restarted before any changes in this file will be used.

; Manual is here: https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html


#idString THURLBY THANDAR, 1908,
#name TTi 1908
#handle TTi1908
#port comNoBaud
#baudrate 9600 ;doesn't matter as the 1908 emulates USB CDC but ignores baud setting
#author voltsandjolts

; A list of possible column name with unit and formatter (SI, Time, Int, D0..D6)
#value VoltageDC V D6 VDC,Diode
#value CurrentDC A si IDC
#value VoltageAC V D6 VAC
#value CurrentAC A si IAC
#value Resistance Ohm si 2WOhms,4WOhms
#value Temperature C d4 TEMPC
#value Temperature F d4 TEMPF
#value Frequency Hz si Freq
#value Capacitance F si Cap


; How to poll for data, this is used for table and #values?
; a #askMode, #cmdMode and #prepareSample is used before this is string is used.
; This is a single line command
#askValues read?

; Format of answer: f=float, u=remove trailing letters, x=skip, *=Zero upper case values if this value is 0
#askValuesReadFormat fxx
#askValuesMathFormat value=="OVLOAD"?1e100:value


; Timeout (secs) for reading values, allows time for auto range
#readingDelay 5


; Mode change have a longer delay on reading values (seconds)
#modeChangeDelay 10


; Switch meter to this mode during start, leave empty to avoid any switching
#initialMode 


; String to ask about actual meter mode, 
; This is a single line command
#askMode mode?
; extract mode from askMode response e.g. "VDC" from "VDC,100mV,AUTO"
#askModeMathFormat getElement(value,0,",")


; When one of these commands are used through the command interface a new configuration will be done before using #askMode
; Only one word for each #mayModifyMode
; Specify command without initial colon and in the shortest possible form
#mayModifyMode sens


#interfaceType DMM BMM
#interface readValue 0


; Strings to configure device in different modes
; First parameter must match a #value (4 parameter) and second parameter must match what #askMode returns
; First parameter is also used in shortcut menu
; The delays are necessary, the meter misbehaves without them.
#cmdMode _Volts_DC      VDC      *cls;[100];vdc;[500];
#cmdMode _Volts_AC      VAC      *cls;[100];vac;[500];
#cmdMode Amps_DC        IDC      *cls;[100];idc;[500];
#cmdMode Amps_AC        IAC      *cls;[100];iac;[500];
#cmdMode Ohm_2W         2WOhms   *cls;[100];2WOHMS;[500];
#cmdMode Ohm_4W         4WOhms   *cls;[100];4WOHMS;[500];
#cmdMode Frequency      Freq     *cls;[100];FREQ;[500];
#cmdMode Capacitance    Cap      *cls;[100];CAP;[500];
#cmdMode PT100_4W_°C    TEMPC    *cls;[100];RTD 4W;[100];TEMPC PT100;[500];
#cmdMode PT100_4W_°F    TEMPF    *cls;[100];RTD 4W;[100];TEMPF PT100;[500];
;#cmdMode PT1000_4W_°C   TEMPC    *cls;[100];RTD 4W;[100];TEMPC PT1000;[500];
;#cmdMode PT1000_4W_°F   TEMPF    *cls;[100];RTD 4W;[100];TEMPF PT1000;[500];
;#cmdMode Diode          Diode    *cls;[100];DIODE;[500];


; Prepare the meter to respond to #askValues
#prepareSample


; Initial commands to meter when establishing connection
#initCmd *cls;[100];*rst;[400];
; After the *rst command the meter status is as follows:
; Measurement parameter set to DC Volts, single measurement mode.
; Auto-ranging mode set.
; All first level modifiers cancelled, including Ohms Null.
; All second level modifiers cancelled.
; Ax + b factors set to A = 1.0000 and b = 00000
; Limits set to 0.0000
; Delta % reference set to 10000
; dB reference impedance set to 600 Ohms
; Watts reference impedance set to 50 Ohms
; Data logger set to OFF and timer set to 0000 seconds (logger store contents preserved)
; External Trigger set to OFF 
; Speed set to slow (4 readings/sec)
; Measurement update symbol (star) set to On
; Beep sound set to OFF
; Measurement filter set to ON
; RTD probe type set to PT100
; RTD measurement mode set to 4 wire


; Final command to meter before breaking connection
#finalCmd
*cls
[100]
*rst
[400]
local


