#idString Manson,HCS-3404
#name Manson HCS-3404
#handle HCS3404
#driver Ascii
#port comfixedbaud
#baudrate 9600N81
#eol \r
#author Scheppo
;-----------------------------
#scpiCmd setV tx VOLT(formatDouble(value*10,3,3,0,0))
#scpiCmd setC tx CURR(formatDouble(value*10,3,3,0,0))
#scpiCmd getVS? txrx? GETS
:readmath: (substring(value,0,3)/10.0)
#scpiCmd getCS? txrx? GETS
:readmath: (substring(value,3,6)/10.0)
#scpiCmd getV? txrx? GETD
:readmath: (substring(value,0,4)/100.0)
#scpiCmd getC? txrx? GETD
:readmath: (substring(value,4,8)/100.0)
#scpiCmd getCVCC? txrx? GETD
:readmath: (substring(value,8,9))
#scpiCmd kbON tx ENDS
#scpiCmd outON tx SOUT0
#scpiCmd outOFF tx SOUT1
#scpiCmd Model? txrx? GMOD
#outputOff outOFF
#verifyDevice HCS-3404 Model?
;-----------------------------
#value VSet V D2
#value VGet V D2
#value CSet A D2
#value CGet A D2
#value CVCCget CVCC SI
#askValues getVS?;[10];getV?;[10];getCS?;[10];getC?;[10];getCVCC;[10]
;-----------------------------
#interfaceType PS
#interface setVoltage setV (value)
#interface setCurrent setC (value)
#interface setOn (value?"outON":"outOFF")
#interface getVoltage getV?
#interface getCurrent getC?
#interface readVoltage 1
#interface readCurrent 3
;-----------------------------
#cmdDelayTime 50
#cmdSetup radio Voltage
:read: getVS?
:write: setV (value)
:readformat: u
:tip: Setup this voltage, turn output on
5V 5
12V 12
20V 20
30V 30
60V 60

#cmdSetup radio Current
:read: getCS?
:write: setC (value)
:readFormat: u
:tip: Output will current limit at this current
500mA 0.5
1A 1
2A 2
3A 3
10A 10
11A 11

#cmdSetup buttonsOn Output
:tip: Turn output on or off
:updatealloff:
Off outOFF
On outON

#cmdSetup number Voltage
:read: getVS?
:readformat: u
:write: setV (value)
:tip: Setup this voltage, do not turn output on/off
Volt 0 60.5

#cmdSetup number Current
:read: getCS?
:readformat: u
:write: setC (value)
:tip: Setup this current, do not turn output on/off
Amps 0.1 11
