
; 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,TF930,
#name Thurlby-thandar TF930
#handle TF930
#port comfixedbaud
; Alternate port types: comnobaud or com, com lets the user define baudrate on the "Load devices" page
#baudrate 115200

#eol \n

#notes Counter do not support reading back settings, this prevents the UI from showing current settings and limits the column names.

; A list of possible column name with unit and formatter (SI, Time, Int, D0..D6) 
; Format: #value ColumnName Unit Format {Selector}
; Selector is only used when column layout varies with mode, this often require the use of #cmdMode
#value Frequency Hz SI9 Frequency_A,Frequency_B
#value Time s SI9 Period_A,Period_B,Width_high_A,Width_low_A
#value Duty_cycle % SI Duty_cycle_A
#value Value _ SI Count_A,Ratio_B/A,Ratio_High/Low_A

#interfaceType Counter
#interface readValue 0

; 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.
; Number of returned values must match number of columns defined with #value
; This is a single line command
#askValues ?
#askValuesMathFormat getMatch(value,"[0-9]+\\.[0-9]*e[+-][0-9]+")

; Format of answer: f=float, u=remove trailing letters, x=skip, *=Zero upper case values if this value is 0
;#askValuesReadFormat 

; Accept this delay when reading values (seconds)
#readingDelay 2

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


; String to ask about actual meter mode, it is mostly used for DMM's
; This is a single line command
; Counter cannot return selected mode, use unit to get a rough mode estimate
#askMode ?
#askModeMathFormat "mode"+getMatch(value,"s|%|Hz")


; 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 


; Prepare the meter to response to #askValues
;#prepareSample arm:sour imm;:arm:count 1;:trig:sour imm;:trig:count 1;:trig:samp:count 1;init

; Initial commands to meter when establishing connection, used to disable local control
;#initCmd  

; Final command to meter before breaking connection, used to restore local control
#finalCmd local

; Used to turn output off for power supplies, generators and electronic loads
;#outputOff 

#cmdModeLayout 2 5

#cmdMode Frequency_A modeHz F2;[1000]
#cmdMode Frequency_B modeHz F3;[1000]
#cmdMode Period_A modes F1;[1000]
#cmdMode Period_B modes F0;[1000]
#cmdMode Width_high_A modes F5;[1000]
#cmdMode Width_Low_A modes F6;[1000]
#cmdMode Count_A mode F7;[1000]
#cmdMode Duty_cycle_A mode% F9;[1000]
#cmdMode Ratio_B/A mode F4;[1000]
#cmdMode Ratio_High/Low_A mode F8;[1000]

#cmdSetup buttons Measurement_Time
:write:
0.3s M1
1s M2
10s M3
100s M4

#cmdSetup buttons Coupling
:write:
:tip: This setting is only valid for input A
AC AC
DC DC

#cmdSetup buttons Input_Impedance
:write:
:tip: This setting is only valid for input A
1Mohm Z1
50ohm Z5

#cmdSetup buttons Attenuation
:write:
:tip: This setting is only valid for input A
1:1 A1
5:1 A5

#cmdSetup buttons Edge
:write:
:tip: This setting is only valid for input A
Rising ER
Falling EF

#cmdSetup buttons Low_Pass_Filter
:write:
:tip: This setting is only valid for input A
Off FO
On_50KHz FI

#cmdSetup numberInt AC_Offset
:read: TO?
:readmath: replace(value,"mV","");
:write: TO
:tip: Value is for 1:1 setting, the actual limit will be 5 times higher at 5:1 setting. Value is initialized from the rotary knob.
mV -60 60

#cmdSetup numberInt DC_Threshold
:read: TT?
:readmath: replace(value,"mV","");
:write: TT
:tip: Value is for 1:1 setting, the actual limit will be 5 times higher at 5:1 setting. Value is initialized from the rotary knob.
mV -300 2100

