
#idString HKJ,Discharger,
#name HKJ Discharger
#handle D
#port com

#outputOff stop

; 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
;#cmdMode 

; Setup menu functions
; The parameters on the first line is: type name page 
; Settings on the following lines are:
; read: SCPI to read value from device, is used to synchronize when opening setup page or setting equal named fields. Not always used
; readformat: Parse read value.
; write: Send the value to device, this field is used in combination with data fields in the details to send updates to device.
; tip: Add this tip to all components for this input field.


#cmdSetup indicator Mode
:read: mode?
Active 1 blue
Idle getElement(value,0)=="IDLE" yellow
Discharge getElement(value,0)=="DISC" red
Pulsing getElement(value,0)=="PULSE" magenta


#cmdSetup number Finaltime
:read: finaltime?
:write: finaltime
:tip: How long time to log data after the discharge is done
sec 0 3600

#cmdSetup number MinimumVoltage
:read: SETMINVOLTAGE?
:write: SETMINVOLTAGE
:tip: Automatic stop discharging when this voltage is reached
volt 0 5


#cmdSetup number Discharge
:update: Mode
:write: start disc
:buttontext: Start
Amps 0.001 3

#cmdSetup numberTriple Pulse
:update: Mode
:write: start pulse
:buttontext: Start
Amps 0.001 3 Current
sec 1 3600 on_time
sec 1 3600 off_time

#cmdSetup button STOP
:update: Mode
stop

#cmdSetup Updater update
:update: Mode
3



