; Keithley 2206B series power supplies
; Note, this is a rebrand of GW Instek PSW series supplies, also supported, and tested.
; USB virtual COM communications is not supported with this device file  Only Ethernet network.
;
; 5/4/32   Rev C   Fix idstring for the GW Instek versions.  Had an extra "-". 
; 11/1/30  Rev B   Update for setup popup.
; 9/6/2020 Rev A   Originate

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

; There are 12 power supplies in this Keithley 2260B family.
; Model				W		V		A		W
; 2260B-30-36		360W	0~30V	0~36A	360W
; 2260B-80-13		360W	0~80V	0~13.5A	360W
; 2260B-250-4		360W	0~250V	0~4.5A	360W
; 2260B-800-1		360W	0~800V	0~1.44A	360W
; 2260B-30-72		720W	0~30V	0~72A	720W
; 2260B-80-27		720W	0~80V	0~27A	720W
; 2260B-250-9		720W	0~250V	0~9A	720W
; 2260B-800-2		720W	0~800V	0~2.88A	720W
; 2260B-30-108		1080W	0~30V	0~108A	1080W
; 2260B-80-40		1080W	0~80V	0~40.5A	1080W
; 2260B-250-13		1080W	0~250V	0~13.5A	1080W
; 2260B-800-4		1080W	0~800V	0~4.32A	1080W

; Below range limits includes the 5% overage on V, I and 10% to 110% on protection limits.
; Tested min logging interval is 45 mSec for On/Off, V, I, Watt.

#metadef
#idstring Keithley Instruments Inc.,Model 2260B-30-36
#name Keithley 2260B-30-36
#handle K2260B30V36A
#replaceText MaxVoltage 31.5
#replaceText MaxCurrent 37.8
#replaceText MaxWatt 360
#replaceText MaxOhm 0.833
#replaceText MinPVolt 3
#replaceText MaxPVolt 33
#replaceText MinPCurrent 3.6
#replaceText MaxPCurrent 39.6

#metadef
#idstring Keithley Instruments Inc.,Model 2260B-80-13
#name Keithley 2260B-80-13
#handle K2260B80V13A5
#replaceText MaxVoltage 84
#replaceText MaxCurrent 13.5
#replaceText MaxWatt 360
#replaceText MaxOhm 5.926
#replaceText MinPVolt 8
#replaceText MaxPVolt 88
#replaceText MinPCurrent 1.35
#replaceText MaxPCurrent 14.85

#metadef
#idstring Keithley Instruments Inc.,Model 2260B-250-4
#name Keithley 2260B-250-4
#handle K2260B250V4A5
#replaceText MaxVoltage 262.5
#replaceText MaxCurrent 4.5
#replaceText MaxWatt 360
#replaceText MaxOhm 55.556
#replaceText MinPVolt 25
#replaceText MaxPVolt 275
#replaceText MinPCurrent 0.45
#replaceText MaxPCurrent 4.95

#metadef
#idstring Keithley Instruments Inc.,Model 2260B-800-1
#name Keithley 2260B-800-1
#handle K2260B800V1A44
#replaceText MaxVoltage 840
#replaceText MaxCurrent 1.44
#replaceText MaxWatt 360
#replaceText MaxOhm 555.556
#replaceText MinPVolt 80
#replaceText MaxPVolt 880
#replaceText MinPCurrent 0.144
#replaceText MaxPCurrent 1.584

#metadef
#idstring Keithley Instruments Inc.,Model 2260B-30-72
#name Keithley 2260B-30-72
#handle K2260B30V72A
#replaceText MaxVoltage 31.5
#replaceText MaxCurrent 72
#replaceText MaxWatt 720
#replaceText MaxOhm 0.417
#replaceText MinPVolt 3
#replaceText MaxPVolt 33
#replaceText MinPCurrent 7.2
#replaceText MaxPCurrent 79.2

#metadef
#idstring Keithley Instruments Inc.,Model 2260B-80-27
#name Keithley 2260B-80-27
#handle K2260B80V27A
#replaceText MaxVoltage 84
#replaceText MaxCurrent 27
#replaceText MaxWatt 720
#replaceText MaxOhm 2.963
#replaceText MinPVolt 8
#replaceText MaxPVolt 88
#replaceText MinPCurrent 2.7
#replaceText MaxPCurrent 29.7

#metadef
#idstring Keithley Instruments Inc.,Model 2260B-250-9
#name Keithley 2260B-250-9
#handle K2260B250V9A
#replaceText MaxVoltage 262.5
#replaceText MaxCurrent 9
#replaceText MaxWatt 720
#replaceText MaxOhm 27.778
#replaceText MinPVolt 25
#replaceText MaxPVolt 275
#replaceText MinPCurrent 0.9
#replaceText MaxPCurrent 9.9

#metadef
#idstring Keithley Instruments Inc.,Model 2260B-800-2
#name Keithley 2260B-800-2
#handle K2260B800V2A88
#replaceText MaxVoltage 840
#replaceText MaxCurrent 2.88
#replaceText MaxWatt 720
#replaceText MaxOhm 277.778
#replaceText MinPVolt 80
#replaceText MaxPVolt 880
#replaceText MinPCurrent 0.288
#replaceText MaxPCurrent 3.168

#metadef
#idstring Keithley Instruments Inc.,Model 2260B-30-108
#name Keithley 2260B-30-108
#handle K2260B30V108A
#replaceText MaxVoltage 31.5
#replaceText MaxCurrent 108
#replaceText MaxWatt 1080
#replaceText MaxOhm 0.278
#replaceText MinPVolt 3
#replaceText MaxPVolt 33
#replaceText MinPCurrent 10.8
#replaceText MaxPCurrent 118.8

#metadef
#idstring Keithley Instruments Inc.,Model 2260B-80-40
#name Keithley 2260B-80-40
#handle K2260B80V40A5
#replaceText MaxVoltage 84
#replaceText MaxCurrent 40.5
#replaceText MaxWatt 1080
#replaceText MaxOhm 1.975
#replaceText MinPVolt 8
#replaceText MaxPVolt 88
#replaceText MinPCurrent 4.05
#replaceText MaxPCurrent 44.55

#metadef
#idstring Keithley Instruments Inc.,Model 2260B-250-13
#name Keithley 2260B-250-13
#handle K2260B250V13A5
#replaceText MaxVoltage 262.5
#replaceText MaxCurrent 13.5
#replaceText MaxWatt 1080
#replaceText MaxOhm 18.519
#replaceText MinPVolt 25
#replaceText MaxPVolt 275
#replaceText MinPCurrent 1.35
#replaceText MaxPCurrent 14.85

#metadef
#idstring Keithley Instruments Inc.,Model 2260B-800-4
#name Keithley 2260B-800-4
#handle K2260B800V4A32
#replaceText MaxVoltage 840
#replaceText MaxCurrent 4.32
#replaceText MaxWatt 1080
#replaceText MaxOhm 185.185
#replaceText MinPVolt 80
#replaceText MaxPVolt 880
#replaceText MinPCurrent 0.432
#replaceText MaxPCurrent 4.752



#metadef
#idstring GW-INSTEK,PSW30-36
#name GW Instek PSW 30-36
#handle PSW30V36A
#replaceText MaxVoltage 31.5
#replaceText MaxCurrent 37.8
#replaceText MaxWatt 360
#replaceText MaxOhm 0.833
#replaceText MinPVolt 3
#replaceText MaxPVolt 33
#replaceText MinPCurrent 3.6
#replaceText MaxPCurrent 39.6

#metadef
#idstring GW-INSTEK,PSW80-13.5
#name GW Instek PSW 80-13.5
#handle PSW80V13A5
#replaceText MaxVoltage 84
#replaceText MaxCurrent 14.175
#replaceText MaxWatt 360
#replaceText MaxOhm 5.926
#replaceText MinPVolt 8
#replaceText MaxPVolt 88
#replaceText MinPCurrent 1.35
#replaceText MaxPCurrent 14.85

#metadef
#idstring GW-INSTEK,PSW160-7.2
#name GW Instek PSW 160-7.2
#handle PSW160V7A2
#replaceText MaxVoltage 168
#replaceText MaxCurrent 7.56
#replaceText MaxWatt 360
#replaceText MaxOhm 22.222
#replaceText MinPVolt 16
#replaceText MaxPVolt 176
#replaceText MinPCurrent 0.72
#replaceText MaxPCurrent 7.92

#metadef
#idstring GW-INSTEK,PSW250-4.5
#name GW Instek PSW 250-4.5
#handle PSW250V4A5
#replaceText MaxVoltage 262.5
#replaceText MaxCurrent 4.725
#replaceText MaxWatt 360
#replaceText MaxOhm 55.556
#replaceText MinPVolt 25
#replaceText MaxPVolt 275
#replaceText MinPCurrent 0.45
#replaceText MaxPCurrent 4.95

#metadef
#idstring GW-INSTEK,PSW800-1.44
#name GW Instek PSW 800-1.44
#handle PSW800V1A44
#replaceText MaxVoltage 840
#replaceText MaxCurrent 1.512
#replaceText MaxWatt 360
#replaceText MaxOhm 555.556
#replaceText MinPVolt 80
#replaceText MaxPVolt 880
#replaceText MinPCurrent 0.144
#replaceText MaxPCurrent 1.584

#metadef
#idstring GW-INSTEK,PSW30-72
#name GW Instek PSW 30-72
#handle PSW30V72A
#replaceText MaxVoltage 31.5
#replaceText MaxCurrent 75.6
#replaceText MaxWatt 720
#replaceText MaxOhm 0.417
#replaceText MinPVolt 3
#replaceText MaxPVolt 33
#replaceText MinPCurrent 7.2
#replaceText MaxPCurrent 79.2

#metadef
#idstring GW-INSTEK,PSW80-27
#name GW Instek PSW 80-27
#handle PSW80V27A
#replaceText MaxVoltage 84
#replaceText MaxCurrent 28.35
#replaceText MaxWatt 720
#replaceText MaxOhm 2.963
#replaceText MinPVolt 8
#replaceText MaxPVolt 88
#replaceText MinPCurrent 2.7
#replaceText MaxPCurrent 29.7

#metadef
#idstring GW-INSTEK,PSW160-14.4
#name GW Instek PSW 160-14.4
#handle PSW160V14A4
#replaceText MaxVoltage 168
#replaceText MaxCurrent 15.12
#replaceText MaxWatt 720
#replaceText MaxOhm 11.111
#replaceText MinPVolt 16
#replaceText MaxPVolt 176
#replaceText MinPCurrent 1.44
#replaceText MaxPCurrent 15.84

#metadef
#idstring GW-INSTEK,PSW-250-9
#name GW Instek PSW  250-9
#handle PSW250V9A
#replaceText MaxVoltage 262.5
#replaceText MaxCurrent 9.45
#replaceText MaxWatt 720
#replaceText MaxOhm 27.778
#replaceText MinPVolt 25
#replaceText MaxPVolt 275
#replaceText MinPCurrent 0.9
#replaceText MaxPCurrent 9.9

#metadef
#idstring GW-INSTEK,PSW800-2.88
#name GW Instek PSW 800-2.88
#handle PSW800V2A88
#replaceText MaxVoltage 840
#replaceText MaxCurrent 3.024
#replaceText MaxWatt 720
#replaceText MaxOhm 277.778
#replaceText MinPVolt 80
#replaceText MaxPVolt 880
#replaceText MinPCurrent 0.288
#replaceText MaxPCurrent 3.168

#metadef
#idstring GW-INSTEK,PSW30-108
#name GW Instek PSW 30-108
#handle PSW30V108A
#replaceText MaxVoltage 31.5
#replaceText MaxCurrent 113.4
#replaceText MaxWatt 1080
#replaceText MaxOhm 0.278
#replaceText MinPVolt 3
#replaceText MaxPVolt 33
#replaceText MinPCurrent 10.8
#replaceText MaxPCurrent 118.8

#metadef
#idstring GW-INSTEK,PSW80-40.5
#name GW Instek PSW 80-40.5
#handle PSW80V40A5
#replaceText MaxVoltage 84
#replaceText MaxCurrent 42.525
#replaceText MaxWatt 1080
#replaceText MaxOhm 1.975
#replaceText MinPVolt 8
#replaceText MaxPVolt 88
#replaceText MinPCurrent 4.05
#replaceText MaxPCurrent 44.55

#metadef
#idstring GW-INSTEK,PSW160-21.6
#name GW Instek PSW 160-21.6
#handle PSW160V21A6
#replaceText MaxVoltage 168
#replaceText MaxCurrent 22.68
#replaceText MaxWatt 1080
#replaceText MaxOhm 7.407
#replaceText MinPVolt 16
#replaceText MaxPVolt 176
#replaceText MinPCurrent 2.16
#replaceText MaxPCurrent 23.76

#metadef
#idstring GW-INSTEK,PSW250-13.5
#name GW Instek PSW 250-13.5
#handle PSW250V13A5
#replaceText MaxVoltage 262.5
#replaceText MaxCurrent 14.175
#replaceText MaxWatt 1080
#replaceText MaxOhm 18.519
#replaceText MinPVolt 25
#replaceText MaxPVolt 275
#replaceText MinPCurrent 1.35
#replaceText MaxPCurrent 14.85

#metadef
#handle PSW800V4A32
#replaceText MaxVoltage 840
#replaceText MaxCurrent 4.536
#replaceText MaxWatt 1080
#replaceText MaxOhm 185.185
#replaceText MinPVolt 80
#replaceText MaxPVolt 880
#replaceText MinPCurrent 0.432
#replaceText MaxPCurrent 4.752


#meta
#idstring GW-INSTEK,PSW800-4.32
#name GW Instek PSW 800-4.32
#handle PSW800V4A32
; Per manual "The port number is fixed at 2268."
#port 2268 com
#author gby
#notes GW Instek PSW series that Keithley OEM's as 2260B series single dc power supply family. Tested with Keithley 2260B and GW Instek PSW over LAN.  On supply verify LAN with Menu button, then Rotate Volt knob to F-36 = 1 to make sure LAN on, and then F-57 = 1 for socket enabled.  Use web browser on IP address to prove connectivity, set more LAN options.  Remote connection disables front panel.


; 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 Main_On - D0
#value Main_Voltage Vdc D3 
#value Main_Current Adc D3
; Watts seems to be quantized to integer.  Better resolution to multiply log V times log I.
#value Main_Power W D3


; 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 OUTP:STAT:IMM?;MEAS:SCAL:VOLT:DC?;MEAS:SCAL:CURR:DC?;MEAS:SCAL:POW? 

; 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 4


; String to ask about actual meter mode, it is mostly used for DMM's
; This is a single line command
;#askMode 


; 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 

; Used to turn output off for power supplies, generators and electronic loads
#outputOff OUTP:STAT:IMM 0


;  **********  Generic Power Supply Interface  *******
;  Modeled after existing Keithley 2280 series power supply from 10/19/20

#interfaceType PS
#interface setVoltage SOUR:VOLT:LEVEL:IMM (value)
#interface getVoltage SOUR:VOLT:LEVEL:IMM?

#interface setCurrent SOUR:CURR:LEVEL:IMM (value)
#interface getCurrent SOUR:CURR:LEVEL:IMM?

#interface setOVP SOUR:VOLT:PROT:LEVEL (value)
#interface getOVP SOUR:VOLT:PROT:LEVEL?

#interface setOCP SOUR:CURR:PROT:LEVEL (value)
#interface getOCP SOUR:CURR:PROT:LEVEL?

#interface setOn OUTP:STAT:IMM (value)
#interface getOn OUTP:STAT:IMM?


#interface readCurrent 2
#interface readVoltage 1
#interface readWatt 3

; **********  Mode Popup Turn Supply On/Off   ***********

#cmdModeLayout 2 1

#cmdMode _Vout_Off_ _
OUTP:STAT:IMM 0

#cmdMode _Vout_On_ _
OUTP:STAT:IMM 1

; **********  Setup Popup   ***********

#cmdSetup number Voltage Settings
:read: SOUR:VOLT:LEVEL:IMM?
:write: SOUR:VOLT:LEVEL:IMM
Vdc  0 MaxVoltage

#cmdSetup number Current Settings
:read: SOUR:CURR:LEVEL:IMM?
:write: SOUR:CURR:LEVEL:IMM
Adc  0 MaxCurrent

#cmdSetup number Source_Resistance Settings
:read: SOUR:RES:LEVEL:IMM?
:write: SOUR:RES:LEVEL:IMM
Ohm  0 MaxOhm

#cmdSetup number Voltage Protect_Limits
:read: SOUR:VOLT:PROT:LEVEL?
:write: SOUR:VOLT:PROT:LEVEL
Vdc  MinPVolt MaxPVolt

#cmdSetup number Current Protect_Limits
:read: SOUR:CURR:PROT:LEVEL?
:write: SOUR:CURR:PROT:LEVEL
Adc  MinPCurrent MaxPCurrent

#cmdSetup buttonsOn Output
:read: OUTP:STAT:IMM?
:write: OUTP:STAT:IMM 
:color: (0,255,0)
:tip: Turn output on or off
:updatealloff:
Off 0
On 1

#cmdSetup radio Volt_Presets
:read: SOUR:VOLT:LEVEL:IMM?
:update: Voltage
:write: SOUR:VOLT:LEVEL:IMM
3.3_V 3.3
5_V 5
12_V 12
24_V 24