From 7907bcce060b22c7d3f78c7545a0fe103d4b4712 Mon Sep 17 00:00:00 2001 From: matthias-schuessler Date: Tue, 11 Apr 2023 11:25:49 +0200 Subject: [PATCH 1/4] ENH: Adds new functionality to keithley_2634b --- basil/HL/keithley_2634b.yaml | 67 +++++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 8 deletions(-) diff --git a/basil/HL/keithley_2634b.yaml b/basil/HL/keithley_2634b.yaml index 813d8e6a9..6e1f98d86 100644 --- a/basil/HL/keithley_2634b.yaml +++ b/basil/HL/keithley_2634b.yaml @@ -6,22 +6,73 @@ identifier : Keithley Instruments Inc., Model 2634B channel 1: on : smua.source.output = 1 off : smua.source.output = 0 + get_on : print(smua.source.output) get_current : print(smua.measure.i()) - set_voltage : smua.source.levelv = + set_current : smua.source.leveli = get_voltage : print(smua.measure.v()) + set_voltage : smua.source.levelv = + set_current_limit : smua.source.limiti = + get_current_limit : print(smua.source.limiti) + set_voltage_limit : smua.source.limitv = + get_voltage_limit : print(smua.source.limitv) + source_volt : smua.source.func = smua.OUTPUT_DCVOLTS + source_current : smua.source.func = smua.OUTPUT_DCAMPS + get_source_mode : print(smua.source.func) + set_voltage_range: smua.source.rangev = + set_current_range: smua.source.rangei = + four_wire_on: smua.sense = smua.SENSE_REMOTE + four_wire_off: smua.sense = smua.SENSE_LOCAL + set_current_sense_range: smua.measure.rangei = + get_current_sense_range: print(smua.measure.rangei) + set_voltage_sense_range: smua.measure.rangev = + get_voltage_sense_range: print(smua.measure.rangev) set_mode_measure_current : display.smua.measure.func = display.MEASURE_DCAMPS channel 2: - on : smub.source.output = 1 - off : smub.source.output = 0 - get_current : print(smub.measure.i()) - set_voltage : smub.source.levelv = - get_voltage : print(smub.measure.v()) - set_mode_measure_current : display.smub.measure.func = display.MEASURE_DCAMPS + on: smub.source.output = 1 + off: smub.source.output = 0 + get_on: print(smub.source.output) + get_current: print(smub.measure.i()) + set_current: smub.source.leveli = + get_voltage: print(smub.measure.v()) + set_voltage: smub.source.levelv = + set_current_limit: smub.source.limiti = + get_current_limit: print(smub.source.limiti) + set_voltage_limit: smub.source.limitv = + get_voltage_limit: print(smub.source.limitv) + source_volt: smub.source.func = smub.OUTPUT_DCVOLTS + source_current: smub.source.func = smub.OUTPUT_DCAMPS + get_source_mode: print(smub.source.func) + set_voltage_range: smub.source.rangev = + set_current_range: smub.source.rangei = + four_wire_on: smub.sense = smub.SENSE_REMOTE + four_wire_off: smub.sense = smub.SENSE_LOCAL + set_current_sense_range: smub.measure.rangei = + get_current_sense_range: print(smub.measure.rangei) + set_voltage_sense_range: smub.measure.rangev = + get_voltage_sense_range: print(smub.measure.rangev) + set_mode_measure_current: display.smub.measure.func = display.MEASURE_DCAMPS on : smua.source.output = 1 off : smua.source.output = 0 +get_on : print(smua.source.output) get_current : print(smua.measure.i()) -set_voltage : smua.source.levelv = +set_current : smua.source.leveli = get_voltage : print(smua.measure.v()) +set_voltage : smua.source.levelv = +set_current_limit : smua.source.limiti = +get_current_limit : print(smua.source.limiti) +set_voltage_limit : smua.source.limitv = +get_voltage_limit : print(smua.source.limitv) +source_volt : smua.source.func = smua.OUTPUT_DCVOLTS +source_current : smua.source.func = smua.OUTPUT_DCAMPS +get_source_mode : print(smua.source.func) +set_voltage_range: smua.source.rangev = +set_current_range: smua.source.rangei = +four_wire_on: smua.sense = smua.SENSE_REMOTE +four_wire_off: smua.sense = smua.SENSE_LOCAL +set_current_sense_range: smua.measure.rangei = +get_current_sense_range: print(smua.measure.rangei) +set_voltage_sense_range: smua.measure.rangev = +get_voltage_sense_range: print(smua.measure.rangev) set_mode_measure_current : display.smua.measure.func = display.MEASURE_DCAMPS From 81d6c679139f0d34ade474581426f07322335c59 Mon Sep 17 00:00:00 2001 From: matthias-schuessler Date: Tue, 11 Apr 2023 17:25:40 +0200 Subject: [PATCH 2/4] ENH: Adds functions to change source range. --- basil/HL/keithley_2634b.yaml | 50 +++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/basil/HL/keithley_2634b.yaml b/basil/HL/keithley_2634b.yaml index 6e1f98d86..f03f2b6b5 100644 --- a/basil/HL/keithley_2634b.yaml +++ b/basil/HL/keithley_2634b.yaml @@ -19,7 +19,13 @@ channel 1: source_current : smua.source.func = smua.OUTPUT_DCAMPS get_source_mode : print(smua.source.func) set_voltage_range: smua.source.rangev = + get_voltage_range: print(smua.source.rangev) + set_voltage_autorange_on: smua.source.autorangev = smua.AUTORANGE_ON + set_voltage_autorange_off: smua.source.autorangev = smua.AUTORANGE_OFF set_current_range: smua.source.rangei = + get_current_range: print(smua.source.rangei) + set_current_autorange_on: smua.source.autorangei = smua.AUTORANGE_ON + set_current_autorange_off: smua.source.autorangei = smua.AUTORANGE_OFF four_wire_on: smua.sense = smua.SENSE_REMOTE four_wire_off: smua.sense = smua.SENSE_LOCAL set_current_sense_range: smua.measure.rangei = @@ -29,29 +35,36 @@ channel 1: set_mode_measure_current : display.smua.measure.func = display.MEASURE_DCAMPS channel 2: - on: smub.source.output = 1 - off: smub.source.output = 0 - get_on: print(smub.source.output) - get_current: print(smub.measure.i()) - set_current: smub.source.leveli = - get_voltage: print(smub.measure.v()) - set_voltage: smub.source.levelv = - set_current_limit: smub.source.limiti = - get_current_limit: print(smub.source.limiti) - set_voltage_limit: smub.source.limitv = - get_voltage_limit: print(smub.source.limitv) - source_volt: smub.source.func = smub.OUTPUT_DCVOLTS - source_current: smub.source.func = smub.OUTPUT_DCAMPS - get_source_mode: print(smub.source.func) + on : smub.source.output = 1 + off : smub.source.output = 0 + get_on : print(smub.source.output) + get_current : print(smub.measure.i()) + set_current : smub.source.leveli = + get_voltage : print(smub.measure.v()) + set_voltage : smub.source.levelv = + set_current_limit : smub.source.limiti = + get_current_limit : print(smub.source.limiti) + set_voltage_limit : smub.source.limitv = + get_voltage_limit : print(smub.source.limitv) + source_volt : smub.source.func = smub.OUTPUT_DCVOLTS + source_current : smub.source.func = smub.OUTPUT_DCAMPS + get_source_mode : print(smub.source.func) set_voltage_range: smub.source.rangev = + get_voltage_range: print(smub.source.rangev) + set_voltage_autorange_on: smub.source.autorangev = smub.AUTORANGE_ON + set_voltage_autorange_off: smub.source.autorangev = smub.AUTORANGE_OFF set_current_range: smub.source.rangei = + get_current_range: print(smub.source.rangei) + set_current_autorange_on: smub.source.autorangei = smub.AUTORANGE_ON + set_current_autorange_off: smub.source.autorangei = smub.AUTORANGE_OFF four_wire_on: smub.sense = smub.SENSE_REMOTE four_wire_off: smub.sense = smub.SENSE_LOCAL set_current_sense_range: smub.measure.rangei = get_current_sense_range: print(smub.measure.rangei) set_voltage_sense_range: smub.measure.rangev = get_voltage_sense_range: print(smub.measure.rangev) - set_mode_measure_current: display.smub.measure.func = display.MEASURE_DCAMPS + set_mode_measure_current : display.smub.measure.func = display.MEASURE_DCAMPS + on : smua.source.output = 1 off : smua.source.output = 0 @@ -68,7 +81,13 @@ source_volt : smua.source.func = smua.OUTPUT_DCVOLTS source_current : smua.source.func = smua.OUTPUT_DCAMPS get_source_mode : print(smua.source.func) set_voltage_range: smua.source.rangev = +get_voltage_range: print(smua.source.rangev) +set_voltage_autorange_on: smua.source.autorangev = smua.AUTORANGE_ON +set_voltage_autorange_off: smua.source.autorangev = smua.AUTORANGE_OFF set_current_range: smua.source.rangei = +get_current_range: print(smua.source.rangei) +set_current_autorange_on: smua.source.autorangei = smua.AUTORANGE_ON +set_current_autorange_off: smua.source.autorangei = smua.AUTORANGE_OFF four_wire_on: smua.sense = smua.SENSE_REMOTE four_wire_off: smua.sense = smua.SENSE_LOCAL set_current_sense_range: smua.measure.rangei = @@ -76,3 +95,4 @@ get_current_sense_range: print(smua.measure.rangei) set_voltage_sense_range: smua.measure.rangev = get_voltage_sense_range: print(smua.measure.rangev) set_mode_measure_current : display.smua.measure.func = display.MEASURE_DCAMPS + From a23f0327c3f5e3567218bbbca12261bc2db0fbda Mon Sep 17 00:00:00 2001 From: matthias-schuessler Date: Tue, 1 Aug 2023 13:44:38 +0200 Subject: [PATCH 3/4] ENH: Adds readout for set source voltage and current. --- basil/HL/keithley_2634b.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/basil/HL/keithley_2634b.yaml b/basil/HL/keithley_2634b.yaml index f03f2b6b5..5bceb1849 100644 --- a/basil/HL/keithley_2634b.yaml +++ b/basil/HL/keithley_2634b.yaml @@ -9,8 +9,10 @@ channel 1: get_on : print(smua.source.output) get_current : print(smua.measure.i()) set_current : smua.source.leveli = + get_source_current : print(smua.source.leveli) get_voltage : print(smua.measure.v()) set_voltage : smua.source.levelv = + get_source_voltage : print(smua.source.levelv) set_current_limit : smua.source.limiti = get_current_limit : print(smua.source.limiti) set_voltage_limit : smua.source.limitv = @@ -40,8 +42,10 @@ channel 2: get_on : print(smub.source.output) get_current : print(smub.measure.i()) set_current : smub.source.leveli = + get_source_current : print(smub.source.leveli) get_voltage : print(smub.measure.v()) set_voltage : smub.source.levelv = + get_source_voltage : print(smub.source.levelv) set_current_limit : smub.source.limiti = get_current_limit : print(smub.source.limiti) set_voltage_limit : smub.source.limitv = @@ -71,8 +75,10 @@ off : smua.source.output = 0 get_on : print(smua.source.output) get_current : print(smua.measure.i()) set_current : smua.source.leveli = +get_source_current : print(smua.source.leveli) get_voltage : print(smua.measure.v()) set_voltage : smua.source.levelv = +get_source_voltage : print(smua.source.levelv) set_current_limit : smua.source.limiti = get_current_limit : print(smua.source.limiti) set_voltage_limit : smua.source.limitv = From 23f3546131569f5528b69c6ccb54d02bdffbbab4 Mon Sep 17 00:00:00 2001 From: AntonioT7 Date: Tue, 11 Apr 2023 14:04:56 +0200 Subject: [PATCH 4/4] ADD: Adds an example for keithley_2634b connexion using Serial --- examples/lab_devices/keithley2634b.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 examples/lab_devices/keithley2634b.yaml diff --git a/examples/lab_devices/keithley2634b.yaml b/examples/lab_devices/keithley2634b.yaml new file mode 100644 index 000000000..e85219f9a --- /dev/null +++ b/examples/lab_devices/keithley2634b.yaml @@ -0,0 +1,15 @@ +transfer_layer: + - name: Serial + type: Serial + init: + port: /dev/ttyUSB5 + read_termination: "\r\n" + baudrate: 19200 + timeout: 5 + +hw_drivers: + - name: Sourcemeter1 + type: scpi + interface: Serial + init: + device: Keithley 2634B \ No newline at end of file