PyICe.lab_instruments

Instrument Drivers

Supported lab instruments

agilent_34970a_chassis
collection instrument for all 34970 plugins
agilent_34970a_20ch
20ch meter
agilent_34970a_34908A_40ch
40ch meter
agilent_34970a_dacs
2 dacs
agilent_34970a_dig_out8
8 bit digital output
agilent_34970a_dig_in8
8 bit digital input
agilent_34970a_actuator
34970a actuator module
agilent_e3631a
triple supply
agilent_e53181a
frequency counter
agilent_34401a
multimeter
agilent_34461a
multimeter
bus_pirate_gpio
general purpose input/output using the bus pirate
bk 8500
single channel 300W electronic load
hp_3478a
multimeter
agilent_n3301
2 channel electronic load
htx9000
usb serial load box (Steve Martin)
htx9001
configurator pro (Steve Martin)
htx9001a
configurator pro A (Steve Martin)
kikusui_plz334w
Kikusui PLZ 334W single channel 330w load (Almost certainly also supports PLZ 664WA)
kikusui_pbz20_20
Kikusui PBZ20-20 single channel bipolar power supply (20V/20A)
kikusui_pbz40_10
Kikusui PBZ40-10 single channel bipolar power supply (40V/10A)
hameg_4040
Hameg 4 channel 10A 384W supply
sorensen_lhp_100_10
1000w supply 100v 10a
sorensen_xt_250_25
250V 250mA DC supply
tektronix_3054
Oscilloscope
autonicstk
Autonics TK series RS-485 Modbus PID Temperature Controller
modbus_relay
Two-channel Modbus RTU RS-485 controllable relay
temptronic_4310
ThermoStream (max temp 175)
delta_9039
GPIB Oven
Sun EC1x
Temp chamber
Sun EX0x
Temp chamber
Franken_oven
Temperature chamber controlled by autonicstk and modbus_relay
oven_w4sd
Vermont Lab Oven controller
krohnhite_523
DC Source/Calibrator
krohnhite_526
DC Source/Calibrator with LAN
powermux
8x8 power switching matrix board (Steve Martin)
keithley_7002
Switch system
hp_3458a
8.5 digit multimeter
RL1000
Reay Labs Efficiency Meter.
agilent_3034a
4-channel oscilloscope
hp_4195a
network analyzer
keithley_4200
semiconductor parameter analyzer (HP4145 command set)
hp_4155b
semiconductor parameter analyzer (HP4145 command set)
ADT7410
Analog Devices I2C Silicon Temperature Sensor
AD5272
Analog Devices I2C 10-bit Potentiometer
PCF8574
I2C GPIO chip, multiple vendors
TDS640A
Tektronix Digital Scope
fluke45
multimeter
saleae
Logic Pro 8/16 Analog DAQ. Digital support possible later
agilent_e4433b
Agilent E4433B ESG-D Series Signal Generator 250kHz - 4GHz
firmata
Firmata universal embedded system (Arduino) control protocol

Virtual Instruments

instrument_humanoid
Notification helper to put human control of a manual instrument into an otherwise automated measurement.
delay_loop
Instrument wrapper for lab_utils.delay_loop enables logging of delay diagnostic vairables.
clipboard
Store and retrieve data to/from windows/linux/osx clipboard.
accumulator
Accumulator Virtual Instrument
timer
Timer Virtual Instrument
integrator
Integrator Virtual Instrument
differencer
Differencer Virtual Instrument
differentiator
Differentiator Virtual Instrument
servo
Servo controller, for kelvins etc
servo_group
Group Servo Control, servos multiple servos into regulation
ramp_to
Move forcing channels incrementally to control overshoot
threshold_finder
Automatically find thresholds and hysteresis
calibrator
Remap write values through two-point or univariate transform
smart_battery_emulator
A pair of threaded writers to output smart battery commands to a smart-battery charger

Functions

Classes

AD5272(interface_twi, addr7[, full_scale_ohms]) Analog Devices I2C Precision Potentiometer / Rheostat
AD5693R(interface_twi, addr7) Analog Devices 16 bit DAC
ADT7410(interface_twi, addr7) Analog Devices Silicon Temperature Sensor
CAT5140(interface_twi) ONSemi/Catalyst I2C 256 Tap Potentiometer
Franken_oven(interface_raw_serial) Autonics controlled temperature chamber with Modbus remote-power relay
PCF8574(interface_twi, addr7) Multi-vendor 8bit I2C GPIO
TDS640A(interface_visa[, force_trigger]) Tek Digitizing Oscilloscope
a3497xa_instrument(name, automatic_monitor) superclass of all Agilent 34970 plugin instruments
accumulator([init]) Virtual accumulator instrument.
agilent_3034a(interface_visa[, ...]) Agilent 4-channel mixed signal DSO
agilent_34401a(interface_visa) single channel agilent_34401a meter
agilent_34461A(interface_visa) LXI, histogram, Truevolt 34401 modernized replacement 6.5 digit DMM
agilent_34970a_20ch(*args, **kwargs)
agilent_34970a_34901A_20ch(*args, **kwargs) Extend base class to add module name to class name for compatibility.
agilent_34970a_34908A_40ch(*args, **kwargs) Extend base class to add module name to class name for compatibility.
agilent_34970a_40ch(*args, **kwargs)
agilent_34970a_actuator(interface_visa, bay)
agilent_34970a_chassis(interface_visa[, ...])
agilent_34970a_dacs(interface_visa, bay)
agilent_34970a_dig_in8(interface_visa, bay, ch)
agilent_34970a_dig_out8(interface_visa, bay, ch)
agilent_34970a_totalizer(name, automatic_monitor)
agilent_34972a_20ch(*args, **kwargs)
agilent_34972a_34901A_20ch(*args, **kwargs) Extend base class to add module name to class name for compatibility.
agilent_34972a_34908A_40ch(*args, **kwargs) Extend base class to add module name to class name for compatibility.
agilent_34972a_40ch(*args, **kwargs)
agilent_34972a_actuator(interface_visa, bay)
agilent_34972a_chassis(interface_visa[, ...])
agilent_34972a_dacs(interface_visa, bay)
agilent_34972a_dig_in8(interface_visa, bay, ch)
agilent_34972a_dig_out8(interface_visa, bay, ch)
agilent_34972a_totalizer(name, automatic_monitor)
agilent_3497xa_20ch(*args, **kwargs) Extends base class to add methods specific to the 20-channel mux that are not appropriate for the 40-channel mux such as frequency, current measurement (internal shunt), and current measurement (external sense resistor).
agilent_3497xa_20ch_40ch(interface_visa, bay) Superclass for the 34901A, 34902A and 34908A input measurement multiplexers All functionality common to the 20Ch and 40Ch is implemented here and inherited by the appropriate subclasses.
agilent_3497xa_40ch(*args, **kwargs) Implement any methods specific to the 40-channel mux here.
agilent_3497xa_actuator(interface_visa, bay) agilent_a34970a_actuator 20 channel general purpose actuator plugin module
agilent_3497xa_chassis(interface_visa[, ...]) A lab_bench-like container object to speed up operation of the 34970 instrument.
agilent_3497xa_dacs(interface_visa, bay) control of the two dacs in the multifunction module
agilent_3497xa_dig_in8(interface_visa, bay, ch) agilent_a34970a_dig_in8 8 bit digital input of the 34907A plugin module
agilent_3497xa_dig_out8(interface_visa, bay, ch) agilent_a34970a_dig_out8 8 bit digital output of the 34907A plugin module
agilent_3497xa_totalizer(name, automatic_monitor) Implement this if you need it
agilent_35670a(interface_visa) Agilent 35670a 100kHz Signal Analyzer This driver is not complete and only supports noise measurements at this time.
agilent_e3631a(interface_visa) Triple-channel programmable DC power supply
agilent_e3648a(interface_visa[, resetoutputs])
agilent_e3649a(interface_visa[, resetoutputs])
agilent_e364xa(interface_visa[, resetoutputs]) Dual-channel programmable DC power supply
agilent_e36xxa(name) Generic base class for Agilent programmable DC power supply
agilent_e4433b(interface_visa) Agilent E4433B Signal Generator
agilent_e53181a(interface_visa) Agilent e53181a frequency counter
agilent_n3301(interface_visa) Agilent N3301 Electronic Load with two channels This is a minimal class to interface with an Agilent N3301 electronic load.
autonicstk(interface_raw_serial, modbus_address)
bk8500(interface_raw_serial[, address]) The below license only applies to most of the code in the bk8500 instrument:
bus_pirate_gpio(interface_raw_serial) bus pirate board as a gpio driver, uses binary mode to control and read up to 5 bits.
calibrator([verbose])
clipboard() Virtual instrument to exchange data with Windows/Linux clipboard for interactive copy and paste with another application.
data_precision_8200(interface_visa) Data Precision GPIB controlled precision DC Voltage/Current Source
delay_loop([strict, begin, no_drift]) instrument wrapper for lab_utils.delay_loop enables logging of delay diagnostic variables
delta_9039(interface_visa) single channel delta 9039 oven
differencer([init]) Virtual differencer instrument.
differentiator() Virtual differentiator instrument.
firmata(serial_port_name) Firmata is a protocol for communicating with microcontrollers from software on a host computer.
fluke_45(interface_visa) single channel fluke_45 meter
hameg_4040(interface_visa) Hameg Lab Supply, model HMP 4040 Four channel lab supply with GPIB interface.
hp_3458a(interface_visa) HP 3458A MULTIMETER
hp_3478a(interface_visa) single channel hp_3478a meter
hp_4155b(interface_visa) Hewlett Packard Semiconductor Parameter Analyzer speaking HP4145 Command Set
hp_4195a(interface_visa) HP4195A Network Analyzer
htx9000(interface_visa) Single Channel Hypertronix (Steve Martin) HTX9000 400nA < IL < 2.5A, up to 60V, 20W Max on fanless version.
htx9001(interface_visa, interface_twi[, ...]) HTX9001 Configurator Pro (Steve Martin)
htx9001a(interface_visa[, calibrating]) HTX9001 Configurator Pro A(Steve Martin)
instrument_humanoid([notification_function]) Notification helper to put human control of a manual instrument into an otherwise automated measurement.
integrator([init]) Virtual integrator instrument.
keithley_4200(interface_visa) Keithley Model 4200-SCS Semiconductor Characterization System
keithley_7002(interface_visa) KEITHLEY 7002 SWITCH SYSTEM
keithley_7002_meter(interface_visa, ...) Combines 7002 switch system and any multimeter instrument into a virtual super 34970.
kikusui_pbz(interface_visa) single channel kikusui_pbz20-20, pbz40-10 bipolar power supply parent class
kikusui_pbz20_20(interface_visa) Kikusui single channel 20V/20A bipolar power supply.
kikusui_pbz40_10(interface_visa) Kikusui single channel 40V/10A bipolar power supply.
kikusui_plz(interface_visa) Kikusui single channel electronic load superclass
kikusui_plz334w(interface_visa) single channel kikusui_plz334w electronic load
kikusui_plz664wa(interface_visa) single channel kikusui_plz664wa electronic load
kikusui_pwr(interface_visa, node, ch) Kikusui single channel unipolar power supply superclass
kikusui_pwr800l(addr, node, ch) single channel kikusui PWR800l electronic load
krohnhite_523(interface_visa) Krohn-Hite Model 523 Precision DC Source/Calibrator
krohnhite_526(interface_visa) Krohn-Hite Model 526 Precision DC Source/Calibrator
modbus_relay(serial_port, modbus_address)
powermux(interface_visa) Boston Design Center 8x8 crosspoint relay mux + 4 aux channels, this needs an example of how to use AUX channels
ramp_to([verbose]) Virtual instrument that changes channel setting incrementally.
rl1000([serial_number])
saleae([host, port]) analog DAQ intrument using Saleae Logic Pro hardware.
semiconductor_parameter_analyzer(name) Generic parameter analyzer speaking HP4145 Command Set in user mode (US page)
servo(fb_channel, output_channel, minimum, ...)
servo_group(name) This is a group of servos.
smart_battery_emulator(voltage_channel_name, ...)
sorensen_generic_supply(interface_visa)
sorensen_lhp_100_10(interface_visa) single channel sorensen_lhp_100_10
sorensen_xt_250_25(interface_visa) single channel sorensen_xt_250_25
sun_ec0x(interface_visa) sun ec0 oven
sun_ec1x(interface_visa) sun ec1x oven
sun_ecxx(interface_visa) sun ecXx oven instrument base class
tektronix_3054(interface_visa[, force_trigger]) Tek 4-channel DSO
temperature_chamber() generic temperature chamber parent class to handle common tasks
temptronic_4310(interface_visa[, en_compressor]) single channel temptronic_4310 thermostream
threshold_finder(...[, ...]) virtual instrument
timer() Virtual timer instrument.

Exceptions

class PyICe.lab_instruments.AD5272(interface_twi, addr7, full_scale_ohms=100000)[source]

Bases: PyICe.lab_core.instrument

Analog Devices I2C Precision Potentiometer / Rheostat http://www.analog.com/static/imported-files/data_sheets/AD5272_5274.pdf

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
enable(enable=True)[source]

Place AD5272 into shutdown by writing enabled=False Re-enable by writing enabled=True

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.AD5693R(interface_twi, addr7)[source]

Bases: PyICe.lab_core.instrument

Analog Devices 16 bit DAC http://www.analog.com/en/products/digital-to-analog-converters/da-converters/ad5693r.html

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.ADT7410(interface_twi, addr7)[source]

Bases: PyICe.lab_core.instrument

Analog Devices Silicon Temperature Sensor http://www.analog.com/static/imported-files/data_sheets/ADT7410.pdf

enable(enabled=True)[source]

Place ADT7410 into shutdown by writing enabled=False Re-enable by writing enabled=True

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_id()[source]

Return Manufacturer ID and chip revision ID

read_temp()[source]

Return free-running temperature conversion result. 16-bit conversion result scaled to signed degrees Celsius

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.CAT5140(interface_twi)[source]

Bases: PyICe.lab_core.instrument

ONSemi/Catalyst I2C 256 Tap Potentiometer

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.Franken_oven(interface_raw_serial)[source]

Bases: PyICe.lab_instruments.autonicstk, PyICe.lab_instruments.modbus_relay, PyICe.lab_instruments.temperature_chamber

Autonics controlled temperature chamber with Modbus remote-power relay

add_channel_alarm1(channel_name)

Alarm 1 output status.

add_channel_alarm2(channel_name)

Alarm 2 output status.

add_channel_autotune(channel_name)

Start autotune sequence.

add_channel_blocking(channel_name)

allow Python to continue immediately for gui/interactive use without waiting for slew/settle

add_channel_cool_mv(channel_name)

Cooler percent power manipulated variable (MV). Can be written directly in manual mode.

add_channel_enable(channel_name)

channel name represents oven enable/disable setting. Accepts boolean and True enables the oven. Heat and cool only settings also accepted if temperature chamber supports that.

add_channel_enable_output(channel_name)

Enable/Disable heat and cool outputs.

add_channel_heat_cool_mode(channel_name)

enable heat only, cool only or heat-cool mode

add_channel_heat_mv(channel_name)

Heater percent power manipulated variable (MV). Can be written directly in manual mode.

add_channel_measured(channel_name)

Measured Temperature Readback (PV)

add_channel_mode(channel_name)

Automatic/Manual mode selector. Automatic uses temperature setpoint (SV). Manual uses heat and cool MV setpoints.

add_channel_presets(channel_name)

Select one of 4 pre-selected temperatures.

add_channel_sense(channel_name)

channel_name represents primary PID control loop thermocouple readback.

add_channel_setpoint(channel_name)

Target Temperature Setpoint (SV)

add_channel_settle_time_limit(channel_name)

channel_name represents max time to wait for oven to settle to within window before raising Exception.

add_channel_soak(channel_name)

channel_name represents soak time setpoint in seconds. Soak timer runs while temperature is continuously within ‘window’ and resets to zero otherwise.

add_channel_soak_settling_time(channel_name)

channel_name represents soak timer elapsed time readback.

add_channel_temp(channel_name)

Channel_name represents PID loop forcing temperature setpoint.

add_channel_units(channel_name)

Select Celsius or Farenheit. CAUTION: Units also change PID gains.

add_channel_window(channel_name)

channel_name represents width setpoint of tolerance window to start soak timer. Setpoint is total window width in degrees (temp must be +/-window/2).

add_channels_tuning(channel_name)

PID control gain settings. See: https://en.wikipedia.org/wiki/PID_controller#Alternative_nomenclature_and_PID_forms

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_blocking_mode(blocking)

allow Python to continue immediately for gui/interactive use without waiting for slew/settle

shutdown(shutdown)[source]

turn entire temp controller on or off with modbus relay.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.PCF8574(interface_twi, addr7)[source]

Bases: PyICe.lab_core.instrument

Multi-vendor 8bit I2C GPIO http://www.ti.com/lit/ds/symlink/pcf8574.pdf

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.TDS640A(interface_visa, force_trigger=False)[source]

Bases: PyICe.lab_core.scpi_instrument, PyICe.lab_core.delegator

Tek Digitizing Oscilloscope

add_channel(channel_name, scope_channel_number)[source]

Add named channel to instrument. num is 1-4.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

trigger_force()[source]

Creates a trigger event. If TRIGger:STATE is set to READy, the acquisition will complete. Otherwise, this command will be ignored.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.a3497xa_instrument(name, automatic_monitor)[source]

Bases: PyICe.lab_core.scpi_instrument, PyICe.lab_core.delegator

superclass of all Agilent 34970 plugin instruments

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)[source]

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)[source]

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.accumulator(init=0)[source]

Bases: PyICe.lab_core.instrument

Virtual accumulator instrument. Writable channel adds value to stored total. Readable channel returns accumulation total. Can be used as a counter by writing accumulation value to +/-1

accumulate(value)[source]

Adds value to accumulation total. Use with caution outside channel framework.

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_accumulate(channel_name)[source]

Channel writes accumulate value into total previously accumulated quantity.

add_channel_accumulation(channel_name)[source]

Channel reads return total accumulated quantity.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_3034a(interface_visa, force_trigger=False, timeout=1)[source]

Bases: PyICe.lab_core.scpi_instrument, PyICe.lab_core.delegator

Agilent 4-channel mixed signal DSO

add_channel(channel_name, scope_channel_number)[source]

Add named channel to instrument. num is 1-4.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_points(points)[source]

set the number of points returned by read_channel() or read_channels() points must be in range [100,250,500] or [1000,2000,5000]*10^[0-4] or [8000000]

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_34401a(interface_visa)[source]

Bases: PyICe.lab_core.scpi_instrument

single channel agilent_34401a meter defaults to dc voltage, note this instrument currently does not support using multiple measurement types at the same time

add_channel(channel_name)[source]

Add named channel to instrument without configuring measurement type.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

config_ac_current()[source]

Configure meter for AC current measurement

config_ac_voltage()[source]

Configure meter for AC voltage measurement

config_dc_current(NPLC=1, range=None, BW=20)[source]

Configure meter for DC current measurement NPLC is an optional number of integration powerline cycles

Valid values are: [.02,.2,1,10,100]
range is optional string value that is the manual range the meter should operate in.
Valid values are in amps: [0.01, 0.1, 1, 3]
config_dc_voltage(NPLC=1, range='AUTO', BW=20)[source]

Set meter to measure DC volts. Optionally set number of powerline cycles for integration to [.02,.2,1,10,100] and set range to [0.1, 1, 10, 100, 1000]

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

read_meter()[source]

Return float representing meter measurement. Units are V,A,Ohm, etc depending on meter configuration.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_34461A(interface_visa)[source]

Bases: PyICe.lab_instruments.agilent_34401a

LXI, histogram, Truevolt 34401 modernized replacement 6.5 digit DMM

add_channel(channel_name)

Add named channel to instrument without configuring measurement type.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

config_ac_current()

Configure meter for AC current measurement

config_ac_voltage()

Configure meter for AC voltage measurement

config_dc_current(NPLC=1, range=None, BW=20)

Configure meter for DC current measurement NPLC is an optional number of integration powerline cycles

Valid values are: [.02,.2,1,10,100]
range is optional string value that is the manual range the meter should operate in.
Valid values are in amps: [0.01, 0.1, 1, 3]
config_dc_voltage(NPLC=1, range='AUTO', BW=20)

Set meter to measure DC volts. Optionally set number of powerline cycles for integration to [.02,.2,1,10,100] and set range to [0.1, 1, 10, 100, 1000]

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

read_meter()

Return float representing meter measurement. Units are V,A,Ohm, etc depending on meter configuration.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_34970a_34901A_20ch(*args, **kwargs)[source]

Bases: PyICe.lab_instruments.agilent_3497xa_20ch

Extend base class to add module name to class name for compatibility.

add_channel(channel_name, channel_num)

Register a named channel. No configuration takes place. When the channel is read directly, or through read_channels(), an appropriate scanlist will be written to the 34970. channel_num is 1-22 for the 20Ch mux (1-20 no current, 21-22 current only) channel_num is 1-40 for the 40Ch mux

add_channel_ammeter_range(channel_name, base_channel)

Modify ammeter current range shunt.

add_channel_autozero(channel_name, base_channel)

adds a secondary channel that can modify the auto-zero mode of an existing channel. Write channel to True autozero every measurement (doubling measurement time), False for one-time autozero.

add_channel_current_sense(channel_name, channel_num, gain=1, NPLC=10, range='AUTO', resistance=None, delay=None, disable_autozero=True, Rsource=None)

Configure channel to return current measurement by scaling voltage measured across user-supplied sense resistor. Specify either gain or its reciprocal resistance.

add_channel_dc_current(channel_name, channel_num, NPLC=1, range='AUTO', delay=None, disable_autozero=True)

DC current measurement only allowed on 34901A channels 21 and 22

add_channel_dc_voltage(channel_name, channel_num, NPLC=1, range='AUTO', high_z=True, delay=None, disable_autozero=True, Rsource=None)

Shortcut method to add voltage channel and configure in one step.

add_channel_delay(channel_name, base_channel)

adds a secondary channel that can modify the delay of an existing channel

add_channel_gain(channel_name, base_channel)

adds a secondary channel that can modify the gain (span multiplier) of an existing channel

add_channel_input_hiz(channel_name, base_channel)

adds a secondary channel that can modify the input impedance of an existing channel. Write channel to True for >10G mode (<~10V), False for 10Meg mode.

add_channel_nplc(channel_name, base_channel)

adds a secondary channel that can modify the nplc setting of an existing channel.

add_channel_offset(channel_name, base_channel)

adds a secondary channel that can modify the offset of an existing channel

add_channel_thermocouple(channel_name, channel_num, tcouple_type, NPLC=1, disable_autozero=True)

Shortcut method to add thermistor measurement channel and configure in one step.

add_channel_unit(channel_name, base_channel)

adds a secondary channel that can modify the displayed unit (V/A/etc) of an existing channel

beep()

Send a beep command.

clear_status()

Send the *CLS command.

config_freq(channel_name)

Configure a channel to measure frequency.

config_res(channel_name)

DC resistance measurement

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_34970a_34908A_40ch(*args, **kwargs)[source]

Bases: PyICe.lab_instruments.agilent_3497xa_40ch

Extend base class to add module name to class name for compatibility.

add_channel(channel_name, channel_num)

Register a named channel. No configuration takes place. When the channel is read directly, or through read_channels(), an appropriate scanlist will be written to the 34970. channel_num is 1-22 for the 20Ch mux (1-20 no current, 21-22 current only) channel_num is 1-40 for the 40Ch mux

add_channel_autozero(channel_name, base_channel)

adds a secondary channel that can modify the auto-zero mode of an existing channel. Write channel to True autozero every measurement (doubling measurement time), False for one-time autozero.

add_channel_dc_voltage(channel_name, channel_num, NPLC=1, range='AUTO', high_z=True, delay=None, disable_autozero=True, Rsource=None)

Shortcut method to add voltage channel and configure in one step.

add_channel_delay(channel_name, base_channel)

adds a secondary channel that can modify the delay of an existing channel

add_channel_gain(channel_name, base_channel)

adds a secondary channel that can modify the gain (span multiplier) of an existing channel

add_channel_input_hiz(channel_name, base_channel)

adds a secondary channel that can modify the input impedance of an existing channel. Write channel to True for >10G mode (<~10V), False for 10Meg mode.

add_channel_nplc(channel_name, base_channel)

adds a secondary channel that can modify the nplc setting of an existing channel.

add_channel_offset(channel_name, base_channel)

adds a secondary channel that can modify the offset of an existing channel

add_channel_thermocouple(channel_name, channel_num, tcouple_type, NPLC=1, disable_autozero=True)

Shortcut method to add thermistor measurement channel and configure in one step.

add_channel_unit(channel_name, base_channel)

adds a secondary channel that can modify the displayed unit (V/A/etc) of an existing channel

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_34972a_34901A_20ch(*args, **kwargs)[source]

Bases: PyICe.lab_instruments.agilent_3497xa_20ch

Extend base class to add module name to class name for compatibility.

add_channel(channel_name, channel_num)

Register a named channel. No configuration takes place. When the channel is read directly, or through read_channels(), an appropriate scanlist will be written to the 34970. channel_num is 1-22 for the 20Ch mux (1-20 no current, 21-22 current only) channel_num is 1-40 for the 40Ch mux

add_channel_ammeter_range(channel_name, base_channel)

Modify ammeter current range shunt.

add_channel_autozero(channel_name, base_channel)

adds a secondary channel that can modify the auto-zero mode of an existing channel. Write channel to True autozero every measurement (doubling measurement time), False for one-time autozero.

add_channel_current_sense(channel_name, channel_num, gain=1, NPLC=10, range='AUTO', resistance=None, delay=None, disable_autozero=True, Rsource=None)

Configure channel to return current measurement by scaling voltage measured across user-supplied sense resistor. Specify either gain or its reciprocal resistance.

add_channel_dc_current(channel_name, channel_num, NPLC=1, range='AUTO', delay=None, disable_autozero=True)

DC current measurement only allowed on 34901A channels 21 and 22

add_channel_dc_voltage(channel_name, channel_num, NPLC=1, range='AUTO', high_z=True, delay=None, disable_autozero=True, Rsource=None)

Shortcut method to add voltage channel and configure in one step.

add_channel_delay(channel_name, base_channel)

adds a secondary channel that can modify the delay of an existing channel

add_channel_gain(channel_name, base_channel)

adds a secondary channel that can modify the gain (span multiplier) of an existing channel

add_channel_input_hiz(channel_name, base_channel)

adds a secondary channel that can modify the input impedance of an existing channel. Write channel to True for >10G mode (<~10V), False for 10Meg mode.

add_channel_nplc(channel_name, base_channel)

adds a secondary channel that can modify the nplc setting of an existing channel.

add_channel_offset(channel_name, base_channel)

adds a secondary channel that can modify the offset of an existing channel

add_channel_thermocouple(channel_name, channel_num, tcouple_type, NPLC=1, disable_autozero=True)

Shortcut method to add thermistor measurement channel and configure in one step.

add_channel_unit(channel_name, base_channel)

adds a secondary channel that can modify the displayed unit (V/A/etc) of an existing channel

beep()

Send a beep command.

clear_status()

Send the *CLS command.

config_freq(channel_name)

Configure a channel to measure frequency.

config_res(channel_name)

DC resistance measurement

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_34972a_34908A_40ch(*args, **kwargs)[source]

Bases: PyICe.lab_instruments.agilent_3497xa_40ch

Extend base class to add module name to class name for compatibility.

add_channel(channel_name, channel_num)

Register a named channel. No configuration takes place. When the channel is read directly, or through read_channels(), an appropriate scanlist will be written to the 34970. channel_num is 1-22 for the 20Ch mux (1-20 no current, 21-22 current only) channel_num is 1-40 for the 40Ch mux

add_channel_autozero(channel_name, base_channel)

adds a secondary channel that can modify the auto-zero mode of an existing channel. Write channel to True autozero every measurement (doubling measurement time), False for one-time autozero.

add_channel_dc_voltage(channel_name, channel_num, NPLC=1, range='AUTO', high_z=True, delay=None, disable_autozero=True, Rsource=None)

Shortcut method to add voltage channel and configure in one step.

add_channel_delay(channel_name, base_channel)

adds a secondary channel that can modify the delay of an existing channel

add_channel_gain(channel_name, base_channel)

adds a secondary channel that can modify the gain (span multiplier) of an existing channel

add_channel_input_hiz(channel_name, base_channel)

adds a secondary channel that can modify the input impedance of an existing channel. Write channel to True for >10G mode (<~10V), False for 10Meg mode.

add_channel_nplc(channel_name, base_channel)

adds a secondary channel that can modify the nplc setting of an existing channel.

add_channel_offset(channel_name, base_channel)

adds a secondary channel that can modify the offset of an existing channel

add_channel_thermocouple(channel_name, channel_num, tcouple_type, NPLC=1, disable_autozero=True)

Shortcut method to add thermistor measurement channel and configure in one step.

add_channel_unit(channel_name, base_channel)

adds a secondary channel that can modify the displayed unit (V/A/etc) of an existing channel

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_3497xa_20ch(*args, **kwargs)[source]

Bases: PyICe.lab_instruments.agilent_3497xa_20ch_40ch

Extends base class to add methods specific to the 20-channel mux that are not appropriate for the 40-channel mux such as frequency, current measurement (internal shunt), and current measurement (external sense resistor).

add_channel(channel_name, channel_num)

Register a named channel. No configuration takes place. When the channel is read directly, or through read_channels(), an appropriate scanlist will be written to the 34970. channel_num is 1-22 for the 20Ch mux (1-20 no current, 21-22 current only) channel_num is 1-40 for the 40Ch mux

add_channel_ammeter_range(channel_name, base_channel)[source]

Modify ammeter current range shunt.

add_channel_autozero(channel_name, base_channel)

adds a secondary channel that can modify the auto-zero mode of an existing channel. Write channel to True autozero every measurement (doubling measurement time), False for one-time autozero.

add_channel_current_sense(channel_name, channel_num, gain=1, NPLC=10, range='AUTO', resistance=None, delay=None, disable_autozero=True, Rsource=None)[source]

Configure channel to return current measurement by scaling voltage measured across user-supplied sense resistor. Specify either gain or its reciprocal resistance.

add_channel_dc_current(channel_name, channel_num, NPLC=1, range='AUTO', delay=None, disable_autozero=True)[source]

DC current measurement only allowed on 34901A channels 21 and 22

add_channel_dc_voltage(channel_name, channel_num, NPLC=1, range='AUTO', high_z=True, delay=None, disable_autozero=True, Rsource=None)

Shortcut method to add voltage channel and configure in one step.

add_channel_delay(channel_name, base_channel)

adds a secondary channel that can modify the delay of an existing channel

add_channel_gain(channel_name, base_channel)

adds a secondary channel that can modify the gain (span multiplier) of an existing channel

add_channel_input_hiz(channel_name, base_channel)

adds a secondary channel that can modify the input impedance of an existing channel. Write channel to True for >10G mode (<~10V), False for 10Meg mode.

add_channel_nplc(channel_name, base_channel)

adds a secondary channel that can modify the nplc setting of an existing channel.

add_channel_offset(channel_name, base_channel)

adds a secondary channel that can modify the offset of an existing channel

add_channel_thermocouple(channel_name, channel_num, tcouple_type, NPLC=1, disable_autozero=True)

Shortcut method to add thermistor measurement channel and configure in one step.

add_channel_unit(channel_name, base_channel)

adds a secondary channel that can modify the displayed unit (V/A/etc) of an existing channel

beep()

Send a beep command.

clear_status()

Send the *CLS command.

config_freq(channel_name)[source]

Configure a channel to measure frequency.

config_res(channel_name)[source]

DC resistance measurement

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_3497xa_20ch_40ch(interface_visa, bay, automatic_monitor=True)[source]

Bases: PyICe.lab_instruments.a3497xa_instrument

Superclass for the 34901A, 34902A and 34908A input measurement multiplexers All functionality common to the 20Ch and 40Ch is implemented here and inherited by the appropriate subclasses.

Capabilities:
34901A, 34902A: Scanning and direct measurement
of temperature, voltage, resistance, frequency, and current (34901A only) using the internal DMM.
34908A: Scanning and direct measurement
of temperature, voltage, and resistance using the internal DMM.
add_channel(channel_name, channel_num)[source]

Register a named channel. No configuration takes place. When the channel is read directly, or through read_channels(), an appropriate scanlist will be written to the 34970. channel_num is 1-22 for the 20Ch mux (1-20 no current, 21-22 current only) channel_num is 1-40 for the 40Ch mux

add_channel_autozero(channel_name, base_channel)[source]

adds a secondary channel that can modify the auto-zero mode of an existing channel. Write channel to True autozero every measurement (doubling measurement time), False for one-time autozero.

add_channel_dc_voltage(channel_name, channel_num, NPLC=1, range='AUTO', high_z=True, delay=None, disable_autozero=True, Rsource=None)[source]

Shortcut method to add voltage channel and configure in one step.

add_channel_delay(channel_name, base_channel)[source]

adds a secondary channel that can modify the delay of an existing channel

add_channel_gain(channel_name, base_channel)[source]

adds a secondary channel that can modify the gain (span multiplier) of an existing channel

add_channel_input_hiz(channel_name, base_channel)[source]

adds a secondary channel that can modify the input impedance of an existing channel. Write channel to True for >10G mode (<~10V), False for 10Meg mode.

add_channel_nplc(channel_name, base_channel)[source]

adds a secondary channel that can modify the nplc setting of an existing channel.

add_channel_offset(channel_name, base_channel)[source]

adds a secondary channel that can modify the offset of an existing channel

add_channel_thermocouple(channel_name, channel_num, tcouple_type, NPLC=1, disable_autozero=True)[source]

Shortcut method to add thermistor measurement channel and configure in one step.

add_channel_unit(channel_name, base_channel)[source]

adds a secondary channel that can modify the displayed unit (V/A/etc) of an existing channel

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_3497xa_40ch(*args, **kwargs)[source]

Bases: PyICe.lab_instruments.agilent_3497xa_20ch_40ch

Implement any methods specific to the 40-channel mux here.

add_channel(channel_name, channel_num)

Register a named channel. No configuration takes place. When the channel is read directly, or through read_channels(), an appropriate scanlist will be written to the 34970. channel_num is 1-22 for the 20Ch mux (1-20 no current, 21-22 current only) channel_num is 1-40 for the 40Ch mux

add_channel_autozero(channel_name, base_channel)

adds a secondary channel that can modify the auto-zero mode of an existing channel. Write channel to True autozero every measurement (doubling measurement time), False for one-time autozero.

add_channel_dc_voltage(channel_name, channel_num, NPLC=1, range='AUTO', high_z=True, delay=None, disable_autozero=True, Rsource=None)

Shortcut method to add voltage channel and configure in one step.

add_channel_delay(channel_name, base_channel)

adds a secondary channel that can modify the delay of an existing channel

add_channel_gain(channel_name, base_channel)

adds a secondary channel that can modify the gain (span multiplier) of an existing channel

add_channel_input_hiz(channel_name, base_channel)

adds a secondary channel that can modify the input impedance of an existing channel. Write channel to True for >10G mode (<~10V), False for 10Meg mode.

add_channel_nplc(channel_name, base_channel)

adds a secondary channel that can modify the nplc setting of an existing channel.

add_channel_offset(channel_name, base_channel)

adds a secondary channel that can modify the offset of an existing channel

add_channel_thermocouple(channel_name, channel_num, tcouple_type, NPLC=1, disable_autozero=True)

Shortcut method to add thermistor measurement channel and configure in one step.

add_channel_unit(channel_name, base_channel)

adds a secondary channel that can modify the displayed unit (V/A/etc) of an existing channel

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_3497xa_actuator(interface_visa, bay)[source]

Bases: PyICe.lab_instruments.a3497xa_instrument

agilent_a34970a_actuator 20 channel general purpose actuator plugin module each channel is a relay which can be toggled from open to closed. note that the physical open button on the unit switches the relay to the NC position.

add_channel(channel_name, channel_num)[source]

channel_num is 1-20

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_3497xa_chassis(interface_visa, automatic_monitor=True)[source]

Bases: PyICe.lab_instruments.a3497xa_instrument

A lab_bench-like container object to speed up operation of the 34970 instrument. If each plugin from the three expansion bays is added individually to the lab_bench, the scanlist must be modified for each plugin to run separate scans on each individual plugin. This object will construct a composite scanlist, then appropriately parse the results back to the individual instruments.

add(new_instrument)[source]

only appropriate to add instantiated 34907 plugin instrument objects to this class (20ch, 40ch, dacs, dig-in, dig-out, etc)

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_3497xa_dacs(interface_visa, bay)[source]

Bases: PyICe.lab_instruments.a3497xa_instrument

control of the two dacs in the multifunction module

add_channel(channel_name, channel_num)[source]

Add named DAC channel to instrument. num is 1-2, mapping to physical channel 4-5.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

write_voltage(internal_address, voltage)[source]

Set named DAC to voltage. Range is +/-12V with 16bit (366uV) resolution.

class PyICe.lab_instruments.agilent_3497xa_dig_in8(interface_visa, bay, ch)[source]

Bases: PyICe.lab_instruments.a3497xa_instrument

agilent_a34970a_dig_in8 8 bit digital input of the 34907A plugin module each multifunction module has 2 8 bit digital ports or 1 16 bit port each 8 bit port may be input or output but not both

add_channel(channel_name, start=0, size=8)[source]

Add channel by name, shifted left by start bits and masked to size bits. ie to create a 3 bit digital channel on bits 1,2,3 add_channel(“channel_name”,1,3)

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_3497xa_dig_out8(interface_visa, bay, ch)[source]

Bases: PyICe.lab_instruments.a3497xa_instrument

agilent_a34970a_dig_out8 8 bit digital output of the 34907A plugin module each multifunction module has 2 8 bit digital ports or 1 16 bit port each 8 bit port may be input or output but not both.

add_channel(channel_name, start=0, size=8)[source]

add channel by channel_name, shifted left by start bits and masked to size bits. ie to create a 3 bit digital channel on bits 1,2,3 add_channel(“channel_name”,1,3)

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_3497xa_totalizer(name, automatic_monitor)[source]

Bases: PyICe.lab_instruments.a3497xa_instrument

Implement this if you need it 26-bit totalizer on physical channel s03 of the 34907A plugin module

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_automatic_monitor(enable)

set to True to enable monitor channel auto-switching after single-channel scanlist read. After first reading, front panel display will continuously update with new results and successive reads will generally be faster without mux switching. set False to force traditional scanlist behavior and manual monitor channel selection via set_monitor and get_monitor_data methods.

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_monitor(monitor_channel_name)

View named channel measurement on the front panel whenever scan is idle

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_35670a(interface_visa)[source]

Bases: PyICe.lab_core.scpi_instrument

Agilent 35670a 100kHz Signal Analyzer This driver is not complete and only supports noise measurements at this time.

add_channel(channel_name, channel_num)[source]

Add named channel to instrument.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channel(channel_num)[source]

Return float representing meter measurement. Units are {} etc depending on meter configuration.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_e3631a(interface_visa)[source]

Bases: PyICe.lab_instruments.agilent_e36xxa

Triple-channel programmable DC power supply

add_channel(channel_name, num, ilim=1, add_sense_channels=True)[source]

Register a named channel with the instrument. channel_name is a user-supplied string num is “P6V”, “P25V”, “N25V”, P50V has been removed, refer to virtual instrument optionally add _isense and _vsense readback channels

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_isense(num)

Query the instrument and return float representing actual measured terminal current.

read_measurement()

Send FETCH? query.

read_vsense(num)

Query the instrument and return float representing actual measured terminal voltage.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_e364xa(interface_visa, resetoutputs=True)[source]

Bases: PyICe.lab_instruments.agilent_e36xxa

Dual-channel programmable DC power supply

add_channel(channel_name, num, ilim=1, add_extended_channels=True)[source]

Register a named channel with the instrument. channel_name is a user-supplied string num must be either “OUT1” or “OUT2” optionally add _ilim, _isense and _vsense channels

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_isense(num)

Query the instrument and return float representing actual measured terminal current.

read_measurement()

Send FETCH? query.

read_vsense(num)

Query the instrument and return float representing actual measured terminal voltage.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_e36xxa(name)[source]

Bases: PyICe.lab_core.scpi_instrument

Generic base class for Agilent programmable DC power supply

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_isense(num)[source]

Query the instrument and return float representing actual measured terminal current.

read_measurement()

Send FETCH? query.

read_vsense(num)[source]

Query the instrument and return float representing actual measured terminal voltage.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_e4433b(interface_visa)[source]

Bases: PyICe.lab_core.instrument

Agilent E4433B Signal Generator

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_e53181a(interface_visa)[source]

Bases: PyICe.lab_core.scpi_instrument

Agilent e53181a frequency counter single channel, only uses channel 1 (front) you may need to set an expected value for autotriggering not recommended below 20hz defaults to 1Meg input R, 10x attenuation

add_channel(channel_name)[source]

Add named channels to instrument.

add_channel_dutycycle(channel_name)[source]

Add named dutycycle channel to instrument

add_channel_freq(channel_name)[source]

Add named frequency channel to instrument

beep()

Send a beep command.

clear_status()

Send the *CLS command.

config_expect(expected_frequency)[source]

specify expected frequency to help with counting very low frequencies.

config_input_attenuation_10x()[source]

set input attenuator to 10x (divide by 10)

config_input_attenuation_1x()[source]

set input attenuator to 1x

config_input_impedance_1Meg()[source]

set input impedance to 1 MegOhm

config_input_impedance_50()[source]

set input impedance to 50 Ohm

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_dutycycle(channel_name)[source]

Return float representing measured duty cycle of named channel.

read_frequency(channel_name)[source]

Return float representing measured frequency of named channel.

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.agilent_n3301(interface_visa)[source]

Bases: PyICe.lab_core.scpi_instrument

Agilent N3301 Electronic Load with two channels This is a minimal class to interface with an Agilent N3301 electronic load. Only immediate constant current mode is supported, which means you can only control setting a constant current load and the new setpoint takes effect right away.

add_channel(channel_name, channel_num, add_sense_channel=True)[source]

add current force writable channel. Optionally add current readback _isense channel

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.bk8500(interface_raw_serial, address=0)[source]

Bases: PyICe.lab_core.instrument

The below license only applies to most of the code in the bk8500 instrument:

Provides the interface to a 26 byte instrument along with utility functions. This is based on provided drivers, minor style changes were made and lab.py fucntions were added. The original license and documentation are included below.

Open Source Initiative OSI - The MIT License:Licensing Tue, 2006-10-31 04:56 - nelson

The MIT License

Copyright (c) 2009 BK Precision

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

This python module provides a functional interface to a B&K DC load through the DCLoad object. This object can also be used as a COM server by running this module as a script to register it. All the DCLoad object methods return strings. All units into and out of the DCLoad object’s methods are in SI units.

See the documentation file that came with this script.

$RCSfile: dcload.py $ $Revision: 1.0 $ $Date: 2008/05/17 15:57:15 $ $Author: Don Peterson $

CalculateChecksum(cmd)[source]

Return the sum of the bytes in cmd modulo 256.

CodeInteger(value, num_bytes=4)[source]

Construct a little endian string for the indicated value. Two and 4 byte integers are the only ones allowed.

CommandProperlyFormed(cmd)[source]

Return 1 if a command is properly formed; otherwise, return 0.

DecodeInteger(str)[source]

Construct an integer from the little endian string. 1, 2, and 4 byte strings are the only ones allowed.

DisableLocalControl()[source]

Disable local control of the load

DumpCommand(bytes)[source]

Print out the contents of a 26 byte command. Example: aa .. 20 01 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. cb

EnableLocalControl()[source]

Enable local control (i.e., key presses work) of the load

GetBatteryTestVoltage()[source]

Gets the battery test voltage

GetCCCurrent()[source]

Gets the constant current mode’s current level

GetCRResistance()[source]

Gets the constant resistance mode’s resistance level

GetCVVoltage()[source]

Gets the constant voltage mode’s voltage level

GetCWPower()[source]

Gets the constant power mode’s power level

GetCommand(command, value, num_bytes=4)[source]

Construct the command with an integer value of 0, 1, 2, or 4 bytes.

GetData(data, num_bytes=4)[source]

Extract the little endian integer from the data and return it.

GetFunction()[source]

Get the function (type of operation) of the load

GetInputValues()[source]

Returns voltage in V, current in A, and power in W, op_state byte, and demand_state byte.

GetIntegerFromLoad(cmd_byte, msg, num_bytes=4)[source]

Construct a command from the byte in cmd_byte, send it, get the response, then decode the response into an integer with the number of bytes in num_bytes. msg is the debugging string for the printout. Return the integer.

GetLoadOnTimer()[source]

Gets the time in seconds that the load will be on

GetLoadOnTimerState()[source]

Gets the load on timer state

GetMaxCurrent()[source]

Returns the maximum current the load will sink

GetMaxPower()[source]

Gets the maximum power the load will allow

GetMaxVoltage()[source]

Gets the maximum voltage the load will allow

GetMode()[source]

Gets the mode (constant current, constant voltage, etc.

GetRemoteSense()[source]

Get the state of remote sensing

GetReserved(num_used)[source]

Construct a string of nul characters of such length to pad a command to one less than the packet size (leaves room for the checksum byte.

GetTransient(mode)[source]

Gets the transient mode settings

GetTriggerSource()[source]

Get how the instrument will be triggered

PrintCommandAndResponse(cmd, response, cmd_name)[source]

Print the command and its response if debugging is on.

RecallSettings(register=0)[source]

Restore instrument settings from a register

ResponseStatus(response)[source]

Return a message string about what the response meant. The empty string means the response was OK.

SaveSettings(register=0)[source]

Save instrument settings to a register

SendCommand(command)[source]

Sends the command to the serial stream and returns the 26 byte response.

SendIntegerToLoad(byte, value, msg, num_bytes=4)[source]

Send the indicated command along with value encoded as an integer of the specified size. Return the instrument’s response status.

SetBatteryTestVoltage(min_voltage)[source]

Sets the battery test voltage

SetCCCurrent(current)[source]

Sets the constant current mode’s current level

SetCRResistance(resistance)[source]

Sets the constant resistance mode’s resistance level

SetCVVoltage(voltage)[source]

Sets the constant voltage mode’s voltage level

SetCWPower(power)[source]

Sets the constant power mode’s power level

SetCommunicationAddress(address=0)[source]

Sets the communication address. Note: this feature is not currently supported. The communication address should always be set to 0.

SetFunction(function='fixed')[source]

Set the function (type of operation) of the load. function is one of “fixed”, “short”, “transient”, or “battery”. Note “list” is intentionally left out for now.

SetLoadOnTimer(time_in_s)[source]

Sets the time in seconds that the load will be on

SetLoadOnTimerState(enabled=0)[source]

Enables or disables the load on timer state

SetLocalControl()[source]

Sets the load to local control

SetMaxCurrent(current)[source]

Sets the maximum current the load will sink

SetMaxPower(power)[source]

Sets the maximum power the load will allow

SetMaxVoltage(voltage)[source]

Sets the maximum voltage the load will allow

SetMode(mode)[source]

Sets the mode (constant current, constant voltage, etc.

SetRemoteControl()[source]

Sets the load to remote control

SetRemoteSense(enabled=0)[source]

Enable or disable remote sensing

SetTransient(mode, A, A_time_s, B, B_time_s, operation='continuous')[source]

Sets up the transient operation mode. mode is one of “CC”, “CV”, “CW”, or “CR”.

SetTriggerSource(source='immediate')[source]

Set how the instrument will be triggered. “immediate” means triggered from the front panel. “external” means triggered by a TTL signal on the rear panel. “bus” means a software trigger (see TriggerLoad()).

TriggerLoad()[source]

Provide a software trigger. This is only of use when the trigger mode is set to “bus”.

TurnLoadOff()[source]

Turns the load off

TurnLoadOn()[source]

Turns the load on

add_channel(channel_name, add_extended_channels=True)[source]

Sortcut function adds CC force channel. if add_extended_channels, additionally add _isense,_vsense,_psense,_mode readback channels Add CV,CW,CR,remote_sense channels separately if you need them.

add_channel_current(channel_name)[source]

add single CC forcing channel and force zero current

add_channel_isense(channel_name)[source]

add single current readback channel

add_channel_mode(channel_name)[source]

read back operating mode (Off, Constant Current, Constant Voltage, Constant Power, Constant Resistance)

add_channel_power(channel_name)[source]

add single CW forcing channel

add_channel_psense(channel_name)[source]

read back computed power dissipated in load

add_channel_remote_sense(channel_name)[source]

Enable/disable remote voltage sense through rear panel connectors

add_channel_resistance(channel_name)[source]

add single CR forcing channel

add_channel_voltage(channel_name)[source]

add single CV forcing channel

add_channel_vsense(channel_name)[source]

add single voltage readback channel

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.bus_pirate_gpio(interface_raw_serial)[source]

Bases: PyICe.lab_core.instrument

bus pirate board as a gpio driver, uses binary mode to control and read up to 5 bits.

add_channel(channel_name, pin_names, output, value=0)[source]

add channel by channel_name, ie to create a 3 bit digital output channel on pins CLK,MISO,MOSI add_channel(“channel_name”,[“CLK”,MISO”,MOSI”],output=1) as always the FIRST pin is the MSB

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.clipboard[source]

Bases: PyICe.lab_core.instrument

Virtual instrument to exchange data with Windows/Linux clipboard for interactive copy and paste with another application.

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_copy(channel_name)[source]

Place data written to channel_name onto clipboard.

add_channel_paste(channel_name)[source]

Place data from clipboard into channel_name.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

register_copy_channel(channel_object, write_copy=True)[source]

Automatically places results on clipboard each time channel_object is read and optionally when channel_object is written.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.data_precision_8200(interface_visa)[source]

Bases: PyICe.lab_core.instrument

Data Precision GPIB controlled precision DC Voltage/Current Source Voltage Ranges are +/- 1V, 10V, 100V, 1000V Current Range is +/- 100mA

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_current(channel_name)[source]

Write channel to switch instrument to current mode and program current between +/-100mA Voltage compliance is +/-10V

add_channel_mode(channel_name)[source]

Channel returns ‘V’ when in Voltage mode and ‘A’ when in current mode

add_channel_voltage(channel_name)[source]

Write channel to switch instrument to voltage mode and program voltage. Default voltage range is +/-10V. Create a vrange channel to adjust range to (0.1,10,100,1000)V +/-100mV range has 0.1uV resolution, output impedance 100 Ohm +/-10V range has 10uV resolution, output impedance 10 mOhm, max current 100mA +/-100V range has 100uV resolution, output impedance 20 mOhm, max current 10mA +/-1000V range specifications are unknown

add_channel_vrange(channel_name)[source]

Write channel to set voltage mode full scale range to +/-(0.1,10,100,1000)V Takes immediate effect when in voltage mode, cached until switch to voltage mode when in current mode

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.delay_loop(strict=False, begin=True, no_drift=True)[source]

Bases: PyICe.lab_utils.delay_loop, PyICe.lab_core.instrument

instrument wrapper for lab_utils.delay_loop enables logging of delay diagnostic variables

achieved_loop_time()[source]

Return previous actual achieved loop time (including any overrun).

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_achieved_loop_time(channel_name)[source]

actual time spent during in last loop iteration possibly longer than requested loop time if user taskes exceeded requested time (overrun).

add_channel_count(channel_name)[source]

total number of times delay() method called

add_channel_delay_margin(channel_name)[source]

time remaining after user’s loop tasks completed to sleep before start of next cycle. Negative if user tasks exceed loop time and no time is left to sleep. Includes any make-up contribution if previous iterations over-ran allocated loop time with no_drift attribute set.

add_channel_total_time(channel_name)[source]

total number of seconds since delay() method first called

begin(offset=0)[source]

make note of begin time for loop measurement. Use offset to adjust the begin time in case of overrun on last cycle.

delay(seconds)[source]

delay extra time to make loop time constant returns actual delay time achieved

delay_margin()[source]

Return extra time remaining (ie sleep time) before last call to delay().

get_count()[source]

returns total number of times delay() method called

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

get_total_time()[source]

returns total number of seconds since first delay

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

time_remaining(loop_time)[source]

Use this in a while loop to perform another function for duration loop_time. Test the result for 0 or less.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.delta_9039(interface_visa)[source]

Bases: PyICe.lab_instruments.temperature_chamber

single channel delta 9039 oven use wait_settle to wait for the soak to complete defaults to window = 1, soak=90 extra data

_sense - the sensed temperature _window - the temperature window _time - the total settling time (including soak) _soak - the programmed soak time
add_channel(channel_name, add_extended_channels=True)

Helper method to add most commonly used channels. channel_name represents temperature setpoint. optionally also adds _sense, _soak, _window, and _soak_settling_time channels.

add_channel_blocking(channel_name)

allow Python to continue immediately for gui/interactive use without waiting for slew/settle

add_channel_enable(channel_name)

channel name represents oven enable/disable setting. Accepts boolean and True enables the oven. Heat and cool only settings also accepted if temperature chamber supports that.

add_channel_sense(channel_name)

channel_name represents primary PID control loop thermocouple readback.

add_channel_settle_time_limit(channel_name)

channel_name represents max time to wait for oven to settle to within window before raising Exception.

add_channel_soak(channel_name)

channel_name represents soak time setpoint in seconds. Soak timer runs while temperature is continuously within ‘window’ and resets to zero otherwise.

add_channel_soak_settling_time(channel_name)

channel_name represents soak timer elapsed time readback.

add_channel_temp(channel_name)

Channel_name represents PID loop forcing temperature setpoint.

add_channel_window(channel_name)

channel_name represents width setpoint of tolerance window to start soak timer. Setpoint is total window width in degrees (temp must be +/-window/2).

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_blocking_mode(blocking)

allow Python to continue immediately for gui/interactive use without waiting for slew/settle

shutdown(shutdown)

separate method to turn off temperature chamber. overload if possible for individual hardware. otherwise, default to disable heating and cooling.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.differencer(init=None)[source]

Bases: PyICe.lab_core.instrument

Virtual differencer instrument. Compute_difference channel is writable and causes computation of first difference from last written value. Read_difference channel is read-only and returns computed difference. A readable channel from a different instrument can be registered with this instrument so that any read of that channel causes its value to be differenced automatically without requiring an explicit call to this instrument’s difference method.

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_compute_difference(channel_name)[source]

Channel write computes difference between previous two values passed to difference method.

add_channel_read_difference(channel_name)[source]

Channel read returns difference between previous two values passed to difference method.

difference(value)[source]

Returns difference between value and value passed in last method call.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

register_difference_channel(channel_object)[source]

Automatically calls difference method each time channel_object is read, for example in logger.log().

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.differentiator[source]

Bases: PyICe.lab_instruments.timer, PyICe.lab_instruments.differencer

Virtual differentiator instrument. Differentiate channel is writable and causes computation of first time derivative between value and last written value. Differentiation channels are read-only and return previously computed time derivative, scaled to appropriate time units. Timer channels are read-only and return elapsed time used to compute derivative, scaled to appropriate time units. A readable channel from a different instrument can be registered with this instrument so that any read of that channel causes its value to be differentiated automatically without requiring an explicit call to this instrument’s differentiate method or channel.

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_compute_difference(channel_name)

Channel write computes difference between previous two values passed to difference method.

add_channel_delta_days(channel_name)

Channel read reports elapsed time since last read with units of days.

add_channel_delta_hours(channel_name)

Channel read reports elapsed time since last read with units of hours.

add_channel_delta_minutes(channel_name)

Channel read reports elapsed time since last read with units of minutes.

add_channel_delta_scale(channel_name, time_div)

Channel read reports elapsed time since last read with user supplied time units. time_div is seconds per user-unit, eg 60 for minutes.

add_channel_delta_seconds(channel_name)

Channel read reports elapsed time since last read with units of seconds.

add_channel_differentiate(channel_name)[source]

Channel write causes time derivative between write value and previous write value to be computed and stored.

add_channel_differentiation_days(channel_name)[source]

Channel read reports derivative value with time units of days.

add_channel_differentiation_hours(channel_name)[source]

Channel read reports derivative value with time units of hours.

add_channel_differentiation_minutes(channel_name)[source]

Channel read reports derivative value with time units of minutes.

add_channel_differentiation_scale(channel_name, time_div)[source]

Channel read reports derivative value with user supplied time units. time_div is seconds per user-unit, eg 60 for minutes.

add_channel_differentiation_seconds(channel_name)[source]

Channel read reports derivative value with time units of seconds.

add_channel_frequency_hz(channel_name)

Channel read reports read frequency in Hz.

add_channel_frequency_scale(channel_name, time_div)

Channel read reports read frequency with user supplied time units. time_div is seconds per user-unit, eg 60 for RPM.

add_channel_read_difference(channel_name)

Channel read returns difference between previous two values passed to difference method.

add_channel_total_days(channel_name)

Channel read reports elapsed time since first read with units of days.

add_channel_total_hours(channel_name)

Channel read reports elapsed time since first read with units of hours.

add_channel_total_minutes(channel_name)

Channel read reports elapsed time since first read with units of minutes.

add_channel_total_scale(channel_name, time_div)

Channel read reports elapsed time since first read with user supplied time units. time_div is seconds per user-unit, eg 60 for minutes.

add_channel_total_seconds(channel_name)

Channel read reports elapsed time since first read with units of seconds.

difference(value)

Returns difference between value and value passed in last method call.

differentiate(value)[source]

Scale value by elapsed time and store to accumulator. Should typically be used through integrate channel above.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

pause_timer()

pause timer . Call resume_timer() to continue counting.

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_delegated_channel_list(channels)[source]

private

register_derivative_channel(channel_object)[source]

Automatically calls difference method each time channel_object is read, for example in logger.log().

register_difference_channel(channel_object)

Automatically calls difference method each time channel_object is read, for example in logger.log().

reset_timer()

Resets timer to 0. Use with caution outside channel framework.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

resume_timer()

resume timer . Call pause_timer() to stop counting again. Can also call resume_timer() at the beginning of time to start the timer.

stop_and_reset_timer()

Halts and resets timer to 0. Timer will begin running after first read, same behavior as after timer object instantiation. Use with caution outside channel framework.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.firmata(serial_port_name)[source]

Bases: PyICe.lab_core.instrument

Firmata is a protocol for communicating with microcontrollers from software on a host computer. The protocol can be implemented in firmware on any microcontroller architecture as well as software on any host computer software package. The Arduino repository described here is a Firmata library for Arduino and Arduino-compatible devices. If you would like to contribute to Firmata, please see the Contributing section below.

Usage The model supported by PyICe is to load a general purpose sketch called StandardFirmata on the Arduino board and then use the host computer exclusively to interact with the Arduino board.

* Arduino/Linduno specific: * StandardFirmata is located in the Arduino IDE in File -> Examples -> Firmata. *** This sketch must be flashed onto the microcontroller board to use this instrument driver.

* Other microcontrollers: * Must flash architechture-specific compiled embedded server.

https://github.com/firmata/protocol/blob/master/README.md

https://github.com/firmata/arduino/blob/master/readme.md

https://github.com/MrYsLab/PyMata/blob/master/README.md

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_analog_input(channel_name, pin)[source]

Analog input pin.

add_channel_analog_latch(channel_name, analog_input_channel, threshold, threshold_type='>')[source]

Latch transient signals on an analog (ADC) input pin. Input pin channel must have been previously configured with firmata.add_channel_analog_input(). Pass channel object instance to analog_input_channel argument. threshold is in Volts, assuming 5V Arduino ADC full scale (1023). Change format setting of _thresold channel to use raw (0-1023) or 3.3V ADC scales. latches high signal levels by default. Set threshold_type=’>=’, ‘<’ or to set latch sensitivity to logic low.

add_channel_digital_input(channel_name, pin, enable_pullup=False)[source]

Digital input pin. Use higher-numbered digital pin aliasing to use analog pins as digital. For Arduno Uno/Linduino: A0=14 A1=15 A2=16 A3=17 A4=18 A5=19

Set enable_pullup=True to enable on-board uC pullups. (~20k in Arduino Uno/Linduino AtMega328P)

add_channel_digital_latch(channel_name, digital_input_channel, threshold_high=True)[source]

Latch transient signals on a digital input pin. Software logic appears to be edge-triggered. Input pin channel must have been previously configured with firmata.add_channel_digital_input(). Pass channel object instance to digital_input_channel argument. latches rising edge by default. Set threshold_high=False to set latch sensitivity to logic low. this doesn’t appear to have access to analog pins (A0-A5) used as digital IO.

add_channel_digital_output(channel_name, pin)[source]

Digital output pin. analog_pin argument doesn’t function. Use higher-numbered digital pin aliasing to use analog pins as digital. For Arduno Uno/Linduino: A0=14 A1=15 A2=16 A3=17 A4=18 A5=19

add_channel_pwm_output(channel_name, pin)[source]

PWM output pin. Arduino UNO (Atmega328) compatible with digital pins 3,5,6,9,10,11.

add_channel_servo(channel_name, pin)[source]

RC servo control (544ms-2400ms PWM) output.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.fluke_45(interface_visa)[source]

Bases: PyICe.lab_core.scpi_instrument

single channel fluke_45 meter defaults to dc voltage, note this instrument currently does not support using multiple measurement types at the same time

add_channel(channel_name)[source]

Add named channel to instrument without configuring measurement type.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

config_ac_current(range='AUTO', rate='S')[source]

Configure meter for AC current measurement. Optionally set range and rate

config_ac_voltage(range='AUTO', rate='S')[source]

Configure meter for AC voltage measurement. Optionally set range and rate

config_dc_current(range='AUTO', rate='S')[source]

Configure meter for DC current measurement. Optionally set range and rate

config_dc_voltage(range='AUTO', rate='S')[source]

Configure meter for DC voltage measurement. Optionally set range and rate

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

read_meter()[source]

Return float representing meter measurement. Units are V,A,Ohm, etc depending on meter configuration.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.hameg_4040(interface_visa)[source]

Bases: PyICe.lab_core.scpi_instrument

Hameg Lab Supply, model HMP 4040 Four channel lab supply with GPIB interface.

This instrument works by selecting the desired output with one command then sending “source” or “measure” commands to that output to set or measure voltage and current.

add_channel(channel_name, num, ilim=1, delay=0.5, add_extended_channels=True)[source]

add voltage forcing channel optionally add voltage force channel, current force channel “_ilim”, enable “_enable”, voltage sense “_vsense” and current sense “_isense” channel_name is channel name, ex: input_voltage num is channel number, allowed values are 1, 2, 3, 4 ilim is optional current limit for this output, defaults to 1 amp.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_retries(retries)[source]

attempt to be robust to communication interface problems

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.hp_3458a(interface_visa)[source]

Bases: PyICe.lab_core.instrument

HP 3458A MULTIMETER

add_channel(channel_name)[source]

Add named channel to instrument. Defaults to DC volts.

config_ac_current(NPLC=50, range=None)[source]

Set meter to measure AC current. Optionally set number of powerline cycles for integration to [0-1000] and set range to [AUTO or 0.12E-6, 1.2E-6, 12E-6, 120E-6, 1.2E-3, 12E-3, 120E-3, 1.2]

config_ac_voltage(NPLC=50, range=None)[source]

Set meter to measure AC volts. Optionally set number of powerline cycles for integration to [0-1000] and set range to [AUTO or 0.012, 0.12, 1.2, 12, 120, 1000]

config_dc_current(NPLC=50, range=None)[source]

Set meter to measure DC current. Optionally set number of powerline cycles for integration to [0-1000] and set range to [AUTO or 0.12E-6, 1.2E-6, 12E-6, 120E-6, 1.2E-3, 12E-3, 120E-3, 1.2]

config_dc_voltage(NPLC=50, range=None)[source]

Set meter to measure DC volts. Optionally set number of powerline cycles for integration to [0-1000] and set range to [AUTO or 0.12, 1.2, 12, 120, 1000]

config_ohmf(NPLC=50, range=None)[source]

Set meter to measure 4 terminal ohm. Optionally set number of powerline cycles for integration to [0-1000] and se t range to [AUTO or 12, 120 1.2e3, 1.2e4, 1.2e5, 1.2e6, 1.2e7, 1.2e8, 1.2e9]

display(message)[source]

Write message to instrument front panel display.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_meter()[source]

return float representing meter measurement.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.hp_3478a(interface_visa)[source]

Bases: PyICe.lab_core.instrument

single channel hp_3478a meter defaults to dc voltage

add_channel(channel_name)[source]

Add named channel to instrument without configuring measurement type.

config_ac_current()[source]

Configure meter for AC current measurement

config_ac_voltage()[source]

Configure meter for AC voltage measurement

config_dc_current()[source]

Configure meter for DC current measurement

config_dc_voltage()[source]

Configure meter for DC voltage measurement

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.hp_4155b(interface_visa)[source]

Bases: PyICe.lab_instruments.semiconductor_parameter_analyzer

Hewlett Packard Semiconductor Parameter Analyzer speaking HP4145 Command Set Set System->MISCELLANEOUS->COMMAND SET = HP4145 Set System->MISCELLANEOUS->DELIMITER = COMMA Set System->MISCELLANEOUS->EOI = ON

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.hp_4195a(interface_visa)[source]

Bases: PyICe.lab_core.scpi_instrument

HP4195A Network Analyzer Current Driver Only Collects Data; no configuration or measurement trigger

add_channel(channel_name, register)[source]

register must be X - frequency A - A register B - B register C - C register D - D register

beep()

Send a beep command.

clear_status()

Send the *CLS command.

config_network(start=0.1, stop=500000000.0, RBW='AUTO', NOP=401, OSCA=-50)[source]

Configure the 4195 for network analysis with start, stop, sweep type and resolution

config_spectrum(start=0.1, stop=500000000.0, RBW='AUTO', NOP=401)[source]

Configure the 4195 for spectrum analysis (noise here) with start, stop, sweep type and resolution

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()[source]

Return the sweep time and trigger once

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.htx9000(interface_visa)[source]

Bases: PyICe.lab_core.scpi_instrument

Single Channel Hypertronix (Steve Martin) HTX9000 400nA < IL < 2.5A, up to 60V, 20W Max on fanless version.

add_channel(channel_name, add_extended_channels=True)[source]

Helper function adds current forcing channel of channel_name optionally also adds _dropout and _readback channels.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.htx9001(interface_visa, interface_twi, calibrating=False)[source]

Bases: PyICe.lab_core.scpi_instrument

HTX9001 Configurator Pro (Steve Martin) Breakout/Edge connector board for ATE Bench, with i2c Supports 4 types of channels: gpio - 10 Channels, Possible values are 0,1(5V),Z (HiZ), P (Weak Pull Up) test_hook - 5 channels, 1,0 pullup to 12V NO CURRENT LIMIT relay - Channels 1-4 and 9-12, correspond to supply numbers, 0 or 1 (1 is supply connected) dvcc - Controls I2C/SMBus DVCC voltage

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_dvcc(channel_name)[source]

Adds a channel controlling the dvcc voltage

add_channel_gpio(channel_name, gpio_list, output=True, pin_state='Z')[source]

Adds a GPIO channel, can be a single bit or a bus of bits channel_name is the name of the channel gpio pins is either a single integer for a single bit or a list of integers ordered msb to lsb valid gpio_numbers are 1-10, valid settings are [{integer},’z’,’Z’,’p’,’P’,’H’,’L’]

add_channel_relay(channel_name, relay_number)[source]

Adds a relay channel, channel_name is the name of the channel, relay_number is the number of the relay (same number as the supply being switched) valid relays are 1-4 and 9-12

add_channel_test_hook(channel_name, test_hook_number)[source]

Adds a test hook channel, channel_name is the name of the channel test_hook_number is the number of the test hook (valid test hooks are 1-5

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.htx9001a(interface_visa, calibrating=False)[source]

Bases: PyICe.lab_instruments.htx9001

HTX9001 Configurator Pro A(Steve Martin) Breakout/Edge connector board for ATE Bench, with i2c Supports 5 types of channels: gpio - 10 Channels, Possible values are 0,1(5V),Z (HiZ), P (Weak Pull Up) test_hook - 5 channels, 1,0 pullup to 12V NO CURRENT LIMIT relay - Channels 1-12, correspond to supply numbers, 0 or 1 (1 is supply connected) ammeter relay - Channels 5-8 dvcc - Controls I2C/SMBus DVCC voltage

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_dvcc(channel_name)

Adds a channel controlling the dvcc voltage

add_channel_gpio(channel_name, gpio_list, output=True, pin_state='Z')

Adds a GPIO channel, can be a single bit or a bus of bits channel_name is the name of the channel gpio pins is either a single integer for a single bit or a list of integers ordered msb to lsb valid gpio_numbers are 1-10, valid settings are [{integer},’z’,’Z’,’p’,’P’,’H’,’L’]

add_channel_irelay(channel_name, irelay_number)[source]

Adds an irelay channel, channel_name is the name of the channel, irelay_number is the number of the irelay (same number as the supply being switched) valid irelays are 5-8

add_channel_relay(channel_name, relay_number)

Adds a relay channel, channel_name is the name of the channel, relay_number is the number of the relay (same number as the supply being switched) valid relays are 1-4 and 9-12

add_channel_test_hook(channel_name, test_hook_number)

Adds a test hook channel, channel_name is the name of the channel test_hook_number is the number of the test hook (valid test hooks are 1-5

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.instrument_humanoid(notification_function=None)[source]

Bases: PyICe.lab_core.instrument

Notification helper to put human control of a manual instrument into an otherwise automated measurement.

add_channel(channel_name)[source]

add new channel named channel_name. Writes to channel_name will send a notification using notification_function and will block until the user acknowledges (in the terminal) that they have intervened as appropriate. Useful for including manual instruments in an otherwise automated setup. To set delay after changing channel, use set_write_delay() method of returned channel.

add_channel_notification_enable(channel_name)[source]

Hook to temporarily suspend notifications, ex for initial setup.

add_notification_function(notification_function)[source]

Add additional notification function to instrument. Ex email and SMS. Notification will be sent to notification_function when a write occurs to any channel in this instrument. The function should take a single string argument and deliver it to the user as appropriate (sms, email, etc). Hint: Use a lambda function to include a subject line in the email: myemail = lab_utils.email(destination='myemail@linear.com‘) notification_function=lambda msg: myemail.send(msg,subject=”LTC lab requires attention!”)

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_notification_enable(enabled)[source]

non-channel hook to enable/disable notifications

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.integrator(init=0)[source]

Bases: PyICe.lab_instruments.accumulator, PyICe.lab_instruments.timer

Virtual integrator instrument. Integrate channel is writable and accumulates value to internally stored total, multiplied by elapsed time since last integrate channel write. Integration channels are read only and return integration total, scaled to appropriate time units. Timer channels are read-only and return elapsed time used to compute time time differential, scaled to appropriate time units. A readable channel from a different instrument can be registered with this instrument so that any read of that channel causes its value to be integrated automatically without requiring an explicit call to this instrument’s integrate method or channel. All channels operate from a common timebase.

accumulate(value)

Adds value to accumulation total. Use with caution outside channel framework.

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_accumulate(channel_name)

Channel writes accumulate value into total previously accumulated quantity.

add_channel_accumulation(channel_name)

Channel reads return total accumulated quantity.

add_channel_delta_days(channel_name)

Channel read reports elapsed time since last read with units of days.

add_channel_delta_hours(channel_name)

Channel read reports elapsed time since last read with units of hours.

add_channel_delta_minutes(channel_name)

Channel read reports elapsed time since last read with units of minutes.

add_channel_delta_scale(channel_name, time_div)

Channel read reports elapsed time since last read with user supplied time units. time_div is seconds per user-unit, eg 60 for minutes.

add_channel_delta_seconds(channel_name)

Channel read reports elapsed time since last read with units of seconds.

add_channel_frequency_hz(channel_name)

Channel read reports read frequency in Hz.

add_channel_frequency_scale(channel_name, time_div)

Channel read reports read frequency with user supplied time units. time_div is seconds per user-unit, eg 60 for RPM.

add_channel_integrate(channel_name)[source]

Writing to this channel causes written value to be added to accumulator scaled by elapsed time since last write.

add_channel_integration_days(channel_name)[source]

Channel read reports integration value with time units of days.

add_channel_integration_hours(channel_name)[source]

Channel read reports integration value with time units of hours.

add_channel_integration_minutes(channel_name)[source]

Channel read reports integration value with time units of minutes.

add_channel_integration_scale(channel_name, time_div)[source]

Channel read reports integration value with user supplied time units. time_div is seconds per user-unit, eg 60 for minutes.

add_channel_integration_seconds(channel_name)[source]

Channel read reports integration value with time units of seconds.

add_channel_total_days(channel_name)

Channel read reports elapsed time since first read with units of days.

add_channel_total_hours(channel_name)

Channel read reports elapsed time since first read with units of hours.

add_channel_total_minutes(channel_name)

Channel read reports elapsed time since first read with units of minutes.

add_channel_total_scale(channel_name, time_div)

Channel read reports elapsed time since first read with user supplied time units. time_div is seconds per user-unit, eg 60 for minutes.

add_channel_total_seconds(channel_name)

Channel read reports elapsed time since first read with units of seconds.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

integrate(value)[source]

Scale value by elapsed time and store to accumulator. Should typically be used through integrate channel above.

merge_in_channel_group(channel_group_object)

merges in a channel group

pause_timer()

pause timer . Call resume_timer() to continue counting.

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_delegated_channel_list(channels)[source]

private

register_integrand_channel(channel_object)[source]

Automatically calls integrate method each time channel_object is read, for example in logger.log().

reset_timer()

Resets timer to 0. Use with caution outside channel framework.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

resume_timer()

resume timer . Call pause_timer() to stop counting again. Can also call resume_timer() at the beginning of time to start the timer.

stop_and_reset_timer()

Halts and resets timer to 0. Timer will begin running after first read, same behavior as after timer object instantiation. Use with caution outside channel framework.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.keithley_4200(interface_visa)[source]

Bases: PyICe.lab_instruments.semiconductor_parameter_analyzer

Keithley Model 4200-SCS Semiconductor Characterization System

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
beep()

Send a beep command.

clear_status()

Send the *CLS command.

configure_slot_smu(slot_number, smu_number)[source]

reconfigure smu instrument in slot_number to act as an smu

configure_slot_vm(slot_number, vmeter_number)[source]

reconfigure smu instrument in slot_number to act as a vm

configure_slot_vs(slot_number, vsource_number)[source]

reconfigure smu instrument in slot_number to act as a vs

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.keithley_7002(interface_visa)[source]

Bases: PyICe.lab_core.scpi_instrument

KEITHLEY 7002 SWITCH SYSTEM Superclass for the 7011S Quad 10 to 1 multiplexers Additional Cards possible in future note - this setup does not change channel types unless a config_ is called

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_relay(channel_name, bay, number)[source]

Add named channel at bay and num bay valid range [1-10] number valid range [1-40] for 7011S Quad 10 to 1 multiplexer card

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

open_all(sync_channels=False)[source]

open all relays, set sync_channels to true to keep the channels synced (no need to do this if shutting down)

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.keithley_7002_meter(interface_visa, multimeter_channel)[source]

Bases: PyICe.lab_instruments.keithley_7002

Combines 7002 switch system and any multimeter instrument into a virtual super 34970.

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_meter(channel_name, bay, num, pre_calls=[], post_calls=[], multimeter_channel=None, delay=0)[source]

add named channel to instrument bay is the switch system plugin bay. Valid range [1-10] num valid range [1-40] for 7011S Quad 10 to 1 multiplexer card pre_calls is a list of functions taking exactly 0 arguments to call after closing channel relay but before triggering multimeter measurement post_calls is a list of functions taking exactly 0 arguments to call after triggering multimeter measurement but before opening channel relay multimeter_channel is a channel with the meter on it, if not specified the instrument meter is used

add_channel_relay(channel_name, bay, number)

Add named channel at bay and num bay valid range [1-10] number valid range [1-40] for 7011S Quad 10 to 1 multiplexer card

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

open_all(sync_channels=False)

open all relays, set sync_channels to true to keep the channels synced (no need to do this if shutting down)

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.kikusui_pbz(interface_visa)[source]

Bases: PyICe.lab_core.scpi_instrument

single channel kikusui_pbz20-20, pbz40-10 bipolar power supply parent class

add_channel(channel_name, ilim=1, delay=0.5, add_extended_channels=True)[source]

Helper channel adds primary voltage forcing channel. Optionally specify channel current limit. Valid range is [???-???] optionally also adds _ilim_source and _ilim_sink limit forcing channels

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.kikusui_pbz20_20(interface_visa)[source]

Bases: PyICe.lab_instruments.kikusui_pbz

Kikusui single channel 20V/20A bipolar power supply.

add_channel(channel_name, ilim=1, delay=0.5, add_extended_channels=True)

Helper channel adds primary voltage forcing channel. Optionally specify channel current limit. Valid range is [???-???] optionally also adds _ilim_source and _ilim_sink limit forcing channels

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.kikusui_pbz40_10(interface_visa)[source]

Bases: PyICe.lab_instruments.kikusui_pbz

Kikusui single channel 40V/10A bipolar power supply.

add_channel(channel_name, ilim=1, delay=0.5, add_extended_channels=True)

Helper channel adds primary voltage forcing channel. Optionally specify channel current limit. Valid range is [???-???] optionally also adds _ilim_source and _ilim_sink limit forcing channels

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.kikusui_plz(interface_visa)[source]

Bases: PyICe.lab_core.scpi_instrument

Kikusui single channel electronic load superclass Instrument Family:

PLZ 164W PLZ 164WA PLZ 334W PLZ 664WA PLZ1004W
add_channel(channel_name, add_sense_channels=True)[source]

Helper function adds primary current forcing channel of channel_name plus _vsense and _isense readback channels.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.kikusui_plz334w(interface_visa)[source]

Bases: PyICe.lab_instruments.kikusui_plz

single channel kikusui_plz334w electronic load

add_channel(channel_name, add_sense_channels=True)

Helper function adds primary current forcing channel of channel_name plus _vsense and _isense readback channels.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.kikusui_plz664wa(interface_visa)[source]

Bases: PyICe.lab_instruments.kikusui_plz

single channel kikusui_plz664wa electronic load

add_channel(channel_name, add_sense_channels=True)

Helper function adds primary current forcing channel of channel_name plus _vsense and _isense readback channels.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.kikusui_pwr(interface_visa, node, ch)[source]

Bases: PyICe.lab_core.scpi_instrument

Kikusui single channel unipolar power supply superclass Instrument Family:

PWR400L PWR400M PWR400H PWR800L PWR800M PWR800H PWR1600L PWR1600M PWR1600H
add_channel(channel_name, ilim=1, delay=0.5, add_extended_channels=True)[source]

Helper function adds primary voltage forcing channel channel_name optionally also adds _ilim forcing channel and _vsense and _isense readback channels.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.kikusui_pwr800l(addr, node, ch)[source]

Bases: PyICe.lab_instruments.kikusui_pwr

single channel kikusui PWR800l electronic load

add_channel(channel_name, ilim=1, delay=0.5, add_extended_channels=True)

Helper function adds primary voltage forcing channel channel_name optionally also adds _ilim forcing channel and _vsense and _isense readback channels.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.krohnhite_523(interface_visa)[source]

Bases: PyICe.lab_core.instrument

Krohn-Hite Model 523 Precision DC Source/Calibrator

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.krohnhite_526(interface_visa)[source]

Bases: PyICe.lab_core.instrument

Krohn-Hite Model 526 Precision DC Source/Calibrator Driver uses 526 protocol (other protocols do not support LAN operation) Voltage Ranges are +/- 0.1V, 1V, 10V, 100V Current Ranges are +/- 10mA, 100mA

CHAR FN ASCII CODE 1 Polarity + = Positive

0 = Crowbar - = Negative

2 MSD 0 to 10 (use ‘J’ for decimal 10) 3 2SD 0 to 10 (use ‘J’ for decimal 10) 4 3SD 0 to 10 (use ‘J’ for decimal 10) 5 4SD 0 to 10 (use ‘J’ for decimal 10) 6 5SD 0 to 10 (use ‘J’ for decimal 10) 7 6SD 0 to 10 (use ‘J’ for decimal 10) 8 Range 0 = 100mV

1 = 1V 2 = 10V 3 = 100V 4 = 10mA 5 = 100mA
9(OPT) Sense 2 = 2-Wire Mode
4 = 4-Wire Mode
add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_current(channel_name)[source]

Write channel to switch instrument to current mode and program current. Default current range is +/-10mA. Create a irange channel to adjust range to (10, 100)mA

add_channel_irange(channel_name)[source]

Write channel to set current mode full scale range to +/-(10,100)mA. Won’t take effect until the current is programmed.

add_channel_vrange(channel_name)[source]

Write channel to set voltage mode full scale range to +/-(0.1,1,10,100)V or +/-(10,100)mA. Won’t take effect until the voltage is programmed.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.powermux(interface_visa)[source]

Bases: PyICe.lab_core.scpi_instrument

Boston Design Center 8x8 crosspoint relay mux + 4 aux channels, this needs an example of how to use AUX channels

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_column(column_name, num)[source]

register named column. num is physical column number. valid range is [1-8] and [0] for auxiliary channels column “aux” is predefined

add_row(row_name, num)[source]

register named row. num is physical row number. valid range is [1-8] and [1-4] for auxiliary channels column “aux” is predefined

beep()

Send a beep command.

clear_status()

Send the *CLS command.

close_relay(column_name, row_name)[source]

close relay at named (column, row)

close_relay_wdelay(delay, relay_list)[source]

close list of relays at named (column, row) with delay between each

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

open_all(sync_channels=False)[source]

open all relays, set sync_channels to true to keep the channels synced (no need to do this if shutting down)

open_relay(column_name, row_name)[source]

open relay at named (column, row)

open_relay_wdelay(delay, relay_list)[source]

open list of relays at named (column, row) with delay between each

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_relay(column_name, row_name, closed)[source]

open and close a relay by row/column names

test()[source]

run the built in test routine

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.ramp_to(verbose=False)[source]

Bases: PyICe.lab_core.instrument

Virtual instrument that changes channel setting incrementally. Useful to minimize impact of overshoot when trying to use power supply as a precision voltage source. This is a crutch. A better option would be to use an SMU if available.

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_binary(channel_name, forcing_channel, abstol=0.001, max_step=None)[source]

Writes binarily decreasing magnitude steps to forcing_channel until within abstol of final voltage. If specified, max_step will bound the step upper magnitude. Use forcing_channel.set_write_delay(seconds) to control ramp rate.

add_channel_linear(channel_name, forcing_channel, step_size=0.01)[source]

Writes constant steps of size step_size (linear_ramp) to forcing_channel until within abstol of final voltage. Use forcing_channel.set_write_delay(seconds) to control ramp rate.

add_channel_overshoot(channel_name, forcing_channel, abstol, estimated_overshoot)[source]

Writes steps to forcing channel_such that peak overshoot magnitude never exceeds written value by more than abstol. estimated_overshoot is specified as a fraction of setting change (peak = final_value + (final_value - previous_value)*estimated_overshoot). For example, to model 10% overshoot (5V to 6V transition hits peak 6.1V), set estimated_overshoot=0.1.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.saleae(host=u'localhost', port=10429)[source]

Bases: PyICe.lab_core.instrument, PyICe.lab_core.delegator

analog DAQ intrument using Saleae Logic Pro hardware. Requires https://pypi.python.org/pypi/saleae Also requires Saleae Logic software GUI to be running to listen on TCP remote control port. Digital channels not supported (yet). (Mixed analog/digital capture file binary unsupported.)

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_scalar(channel_name, channel_number, scaling=1.0)[source]

Add analog scalar (DMM) DAQ channel to instrument. channel_number is 0-7 or 0-15 for Logic Pro 8 and Logic Pro 16 respectively.

add_channel_trace(channel_name, channel_number, scaling=1.0)[source]

Add analog vector trace (scope) DAQ channel to instrument. channel_number is 0-7 or 0-15 for Logic Pro 8 and Logic Pro 16 respectively.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_delegated_channel_list(channels)[source]

private

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_num_samples(num_samples_per_channel)[source]

set number of samples to average and sample rate because valid sample rates change with ???number of configured channels???, may need to call after adding all channels.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.semiconductor_parameter_analyzer(name)[source]

Bases: PyICe.lab_core.scpi_instrument

Generic parameter analyzer speaking HP4145 Command Set in user mode (US page)

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.servo_group(name)[source]

Bases: object

This is a group of servos. It will servo each servo in that group until all are in regulation or up to servo_group.tries times

add_servo(servo_inst)[source]

Add a servo virtual instrument to the servo_group

servo()[source]

run each servo in turn until all are in regulation.

class PyICe.lab_instruments.sorensen_lhp_100_10(interface_visa)[source]

Bases: PyICe.lab_instruments.sorensen_generic_supply

single channel sorensen_lhp_100_10

add_channel(channel_name, ilim=1, add_extended_channels=True)

Helper method adds primary voltage forcing channel channe_name. optionally also adds _ilim forcing channel and _vsense and _isense readback channels.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.sorensen_xt_250_25(interface_visa)[source]

Bases: PyICe.lab_instruments.sorensen_generic_supply

single channel sorensen_xt_250_25

add_channel(channel_name, ilim=1, add_extended_channels=True)

Helper method adds primary voltage forcing channel channe_name. optionally also adds _ilim forcing channel and _vsense and _isense readback channels.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.sun_ec0x(interface_visa)[source]

Bases: PyICe.lab_instruments.sun_ecxx

sun ec0 oven use wait_settle to wait for the soak to complete defaults to window = 1, soak=90 extra data

_sense - the sensed temperature _window - the temperature window _time - the total settling time (including soak) _soak - the programmed soak time
add_channel(channel_name, add_extended_channels=True)

Helper method to add most commonly used channels. channel_name represents temperature setpoint. optionally also adds _sense, _soak, _window, and _soak_settling_time channels.

add_channel_blocking(channel_name)

allow Python to continue immediately for gui/interactive use without waiting for slew/settle

add_channel_enable(channel_name)

channel name represents oven enable/disable setting. Accepts boolean and True enables the oven. Heat and cool only settings also accepted if temperature chamber supports that.

add_channel_sense(channel_name)

channel_name represents primary PID control loop thermocouple readback.

add_channel_settle_time_limit(channel_name)

channel_name represents max time to wait for oven to settle to within window before raising Exception.

add_channel_soak(channel_name)

channel_name represents soak time setpoint in seconds. Soak timer runs while temperature is continuously within ‘window’ and resets to zero otherwise.

add_channel_soak_settling_time(channel_name)

channel_name represents soak timer elapsed time readback.

add_channel_temp(channel_name)

Channel_name represents PID loop forcing temperature setpoint.

add_channel_window(channel_name)

channel_name represents width setpoint of tolerance window to start soak timer. Setpoint is total window width in degrees (temp must be +/-window/2).

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_blocking_mode(blocking)

allow Python to continue immediately for gui/interactive use without waiting for slew/settle

shutdown(shutdown)

separate method to turn off temperature chamber. overload if possible for individual hardware. otherwise, default to disable heating and cooling.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.sun_ec1x(interface_visa)[source]

Bases: PyICe.lab_instruments.sun_ecxx

sun ec1x oven use wait_settle to wait for the soak to complete defaults to window = 1, soak=90 extra data

_sense - the sensed temperature _window - the temperature window _time - the total settling time (including soak) _soak - the programmed soak time

upper_temp_limit (default 165) and lower_temp_limit (default -65) can be modified as properties of the sun_ec1x object outside the PyICe channel framework

add_channel(channel_name, add_extended_channels=True)

Helper method to add most commonly used channels. channel_name represents temperature setpoint. optionally also adds _sense, _soak, _window, and _soak_settling_time channels.

add_channel_blocking(channel_name)

allow Python to continue immediately for gui/interactive use without waiting for slew/settle

add_channel_enable(channel_name)

channel name represents oven enable/disable setting. Accepts boolean and True enables the oven. Heat and cool only settings also accepted if temperature chamber supports that.

add_channel_sense(channel_name)

channel_name represents primary PID control loop thermocouple readback.

add_channel_settle_time_limit(channel_name)

channel_name represents max time to wait for oven to settle to within window before raising Exception.

add_channel_soak(channel_name)

channel_name represents soak time setpoint in seconds. Soak timer runs while temperature is continuously within ‘window’ and resets to zero otherwise.

add_channel_soak_settling_time(channel_name)

channel_name represents soak timer elapsed time readback.

add_channel_temp(channel_name)

Channel_name represents PID loop forcing temperature setpoint.

add_channel_user_sense(channel_name)[source]

channel_name represents secondary non-control thermocouple readback.

add_channel_window(channel_name)

channel_name represents width setpoint of tolerance window to start soak timer. Setpoint is total window width in degrees (temp must be +/-window/2).

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_blocking_mode(blocking)

allow Python to continue immediately for gui/interactive use without waiting for slew/settle

shutdown(shutdown)[source]

turn entire temp controller on or off. This is different than enabling/disabling the heat and cool outputs

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.sun_ecxx(interface_visa)[source]

Bases: PyICe.lab_instruments.temperature_chamber

sun ecXx oven instrument base class implements all methods common to sun ec0x and ec1x ovens

add_channel(channel_name, add_extended_channels=True)

Helper method to add most commonly used channels. channel_name represents temperature setpoint. optionally also adds _sense, _soak, _window, and _soak_settling_time channels.

add_channel_blocking(channel_name)

allow Python to continue immediately for gui/interactive use without waiting for slew/settle

add_channel_enable(channel_name)

channel name represents oven enable/disable setting. Accepts boolean and True enables the oven. Heat and cool only settings also accepted if temperature chamber supports that.

add_channel_sense(channel_name)

channel_name represents primary PID control loop thermocouple readback.

add_channel_settle_time_limit(channel_name)

channel_name represents max time to wait for oven to settle to within window before raising Exception.

add_channel_soak(channel_name)

channel_name represents soak time setpoint in seconds. Soak timer runs while temperature is continuously within ‘window’ and resets to zero otherwise.

add_channel_soak_settling_time(channel_name)

channel_name represents soak timer elapsed time readback.

add_channel_temp(channel_name)

Channel_name represents PID loop forcing temperature setpoint.

add_channel_window(channel_name)

channel_name represents width setpoint of tolerance window to start soak timer. Setpoint is total window width in degrees (temp must be +/-window/2).

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_blocking_mode(blocking)

allow Python to continue immediately for gui/interactive use without waiting for slew/settle

shutdown(shutdown)

separate method to turn off temperature chamber. overload if possible for individual hardware. otherwise, default to disable heating and cooling.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.tektronix_3054(interface_visa, force_trigger=True)[source]

Bases: PyICe.lab_core.scpi_instrument, PyICe.lab_core.delegator

Tek 4-channel DSO

add_channel(channel_name, scope_channel_number)[source]

Add named channel to instrument. num is 1-4.

beep()

Send a beep command.

clear_status()

Send the *CLS command.

display_clear()

Clear the instrument display

display_off()

Turn the instrument display off

display_on()

Turn the instrument display on

display_text(text='')

Display text on instrument front panel

enable_serial_polling()

Enable the instrument to report operation complete via serial polling

error()

Get error message.

fetch()

Send FETCH? query.

get_error()

Return the first error from the SCPI instrument. +0 is the errorcode for no error

get_errors()

Return a list of all accumulated SCPI instrument errors.

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

identify()

Send the *IDN? command.

init()

Send INIT command.

initiate_measurement(enable_polling=False)

Initiate a measurement

merge_in_channel_group(channel_group_object)

merges in a channel group

operation_complete()

query if current operation is done blocks i/o until operation is complete or timeout this method retries query until a character is returned in cas of premature timeout EDIT - delet retry for now

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_measurement()

Send FETCH? query.

reset()

Send the *RST command.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

trigger()

Send the *TRG command.

trigger_force()[source]

Creates a trigger event. If TRIGger:STATE is set to READy, the acquisition will complete. Otherwise, this command will be ignored.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.temperature_chamber[source]

Bases: PyICe.lab_core.instrument

generic temperature chamber parent class to handle common tasks

add_channel(channel_name, add_extended_channels=True)[source]

Helper method to add most commonly used channels. channel_name represents temperature setpoint. optionally also adds _sense, _soak, _window, and _soak_settling_time channels.

add_channel_blocking(channel_name)[source]

allow Python to continue immediately for gui/interactive use without waiting for slew/settle

add_channel_enable(channel_name)[source]

channel name represents oven enable/disable setting. Accepts boolean and True enables the oven. Heat and cool only settings also accepted if temperature chamber supports that.

add_channel_sense(channel_name)[source]

channel_name represents primary PID control loop thermocouple readback.

add_channel_settle_time_limit(channel_name)[source]

channel_name represents max time to wait for oven to settle to within window before raising Exception.

add_channel_soak(channel_name)[source]

channel_name represents soak time setpoint in seconds. Soak timer runs while temperature is continuously within ‘window’ and resets to zero otherwise.

add_channel_soak_settling_time(channel_name)[source]

channel_name represents soak timer elapsed time readback.

add_channel_temp(channel_name)[source]

Channel_name represents PID loop forcing temperature setpoint.

add_channel_window(channel_name)[source]

channel_name represents width setpoint of tolerance window to start soak timer. Setpoint is total window width in degrees (temp must be +/-window/2).

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

set_blocking_mode(blocking)[source]

allow Python to continue immediately for gui/interactive use without waiting for slew/settle

shutdown(shutdown)[source]

separate method to turn off temperature chamber. overload if possible for individual hardware. otherwise, default to disable heating and cooling.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.temptronic_4310(interface_visa, en_compressor=True)[source]

Bases: PyICe.lab_core.instrument

single channel temptronic_4310 thermostream special methods: set_window(air_window), set_soak(soak_time), off() use wait_settle to wait for the soak to complete defaults to window = 3, soak=30 extra data

_sense - the sensed temperature _window - the temperature window _time - the total settling time (including soak) _soak - the programmed soak time
add_channel(channel_name, add_extended_channels=True)[source]

Helper method to add most commonly used channels. channel_name represents temperature setpoint. optionlayy also adds _sense_dut, _sense_air, _soak, _window, and _soak_settling_time channels.

add_channel_max_air(channel_name)[source]

channel_name represents maximum airflow temperature setting.

add_channel_max_air2dut(channel_name)[source]

channel_name represents maximum allowed temperature difference between airflow and dut setting.

add_channel_sense_air(channel_name)[source]

channel_name represents secondary air stream thermocouple readback.

add_channel_sense_dut(channel_name)[source]

channel_name represents primary PID control loop thermocouple readback.

add_channel_soak(channel_name)[source]

channel_name represents soak time setpoint in seconds. Soak timer runs while temperature is continuously within ‘window’ and resets to zero otherwise.

add_channel_soak_settling_time(channel_name)[source]

channel_name represents soak timer elapsed time readback.

add_channel_temp(channel_name)[source]

Channel_name represents PID loop forcing temperature setpoint.

add_channel_window(channel_name)[source]

channel_name represents width setpoint of tolerance window to start soak timer. Setpoint is total window width in degrees (temp must be +/-window/2).

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

off()[source]

Turn off airflow and compressor, lift head, reset limits

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.threshold_finder(comparator_input_force_channel, comparator_output_sense_channel, minimum, maximum, abstol, comparator_input_sense_channel=None, forcing_overshoot=0, output_threshold=None, verbose=False)[source]

Bases: PyICe.lab_core.instrument, PyICe.lab_core.delegator

virtual instrument Does not automatically find threshold unless auto_find is enabled from add_channel. Otherwise, you must call threshold_finder.find(), or .find_linear()

The channels used with this instrument may want to be virtual instruments. For example the comparator_input_channel_force could be used to clear a latched output before a new value is set, or the comparator_output_sense_channel could interpret complex comparator outputs that are not direct measurements.

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_abstol(channel_name)[source]

Maximum two-sided uncertainty range (window width) for binary search, or step size for linear search. Relative to comparator_input_force_channel.

add_channel_algorithm(channel_name)[source]

Search method used to determine threshold.

add_channel_all(channel_name, auto_find=False)[source]

shortcut method adds the following channels: threshold (Average of rising and falling thresolds. Relative to comparator_input_sense_channel.) rising threshold (Average of measurments at low and high endpoints of rising threshold uncertainty window. Relative to comparator_input_sense_channel.) falling threshold (Average of measurments at low and high endpoints of falling threshold uncertainty window. Relative to comparator_input_sense_channel.) tries (Number of binary search steps required to reduce uncertainty window to within abstol, or number of abstol-sized steps required to find threshold with linear search.) hysteresis (Difference between rising and falling thresholds. Relative to comparator_input_sense_channel.) abstol (Maximum two-sided uncertainty range (window width) for binary search, or step size for linear search. Relative to comparator_input_force_channel.) rising uncertainty (Achieved one-sided additive rising threshold uncertainty range for binary or linear search. Relative to comparator_input_sense_channel.) falling uncertainty (Achieved one-sided additive falling threshold uncertainty range for binary or linear search. Relative to comparator_input_sense_channel.) rising relative uncertainty (Achieved one-sided multiplicative rising threshold uncertainty range for binary or linear search. Relative to comparator_input_sense_channel.) falling relative uncertainty (Achieved one-sided multiplicative falling threshold uncertainty range for binary or linear search. Relative to comparator_input_sense_channel.) forced rising threshold (Average of low and high forced endpoints of rising threshold uncertainty window. Relative to comparator_input_force_channel.) forced falling threshold (Average of low and high forced endpoints of falling threshold uncertainty window. Relative to comparator_input_force_channel.) output_threshold (Calculated or specified digitization threshold for comparator_output_sense_channel.)

if auto_find is ‘linear’, automatically call find_linear() when channel is read. if auto_find is ‘geometric’, automatically call find_geometric() when channel is read. if auto_find is any other true value, automatically call find() when channel is read.

add_channel_falling(channel_name)[source]

Average of measurments at low and high endpoints of falling threshold uncertainty window. Relative to comparator_input_sense_channel.

add_channel_forced_falling(channel_name)[source]

Average of low and high forced endpoints of falling threshold uncertainty window. Relative to comparator_input_force_channel.

add_channel_forced_rising(channel_name)[source]

Average of low and high forced endpoints of rising threshold uncertainty window. Relative to comparator_input_force_channel.

add_channel_hysteresis(channel_name)[source]

Difference between rising and falling thresholds. Relative to comparator_input_sense_channel.

add_channel_output_threshold(channel_name)[source]

Digitization threshold for comparator_output_sense_channel.

add_channel_relative_uncertainty(channel_name)[source]

Single sided relative meatured threshold uncertainty at termination of search. i.e threshold_rising * (1 - relative_uncertainty_rising) < {true rising threshold} < threshold_rising * (1 + relative_uncertainty_rising) and

threshold_falling * (1 - relative_uncertainty_falling) < {true falling threshold} < threshold_falling * (1 + relative_uncertainty_falling)

With comparator_input_sense_channel defined, uncertainty will be relative to measured rather than forced inputs and may be scaled differently than forcing (abstol) units.

add_channel_rising(channel_name)[source]

Average of measurments at low and high endpoints of rising threshold uncertainty window. Relative to comparator_input_sense_channel.

add_channel_threshold(channel_name, auto_find=False)[source]

Average of rising and falling thresholds found by last call to find() method. Relative to comparator_input_sense_channel. if auto_find is ‘linear’, automatically call find_linear() when channel is read. if auto_find is ‘geometric’, automatically call find_geometric() when channel is read. if auto_find is any other true value, automatically call find() when channel is read.

add_channel_tries(channel_name)[source]

Number of binary search steps required to reduce uncertainty window to within abstol, or number of abstol-sized steps required to find threshold with linear search.

add_channel_uncertainty(channel_name)[source]

Single sided measured threshold uncertainty at termination of search. i.e (threshold_rising - uncertainty_rising) < {true rising threshold} < (threshold_rising + uncertainty_rising) and

(threshold_falling - uncertainty_falling) < {true falling threshold} < (threshold_falling + uncertainty_falling).

For binary search with comparator_input_sense_channel=None, will be between 0.5*abstol and 0.25*abstol. For linear sweep with comparator_input_sense_channel=None, will be 0.5*abstol.

With comparator_input_sense_channel defined, uncertainty will be relative to measured rather than forced inputs and may be scaled differently than forcing (abstol) units.

find(cautious=False)[source]

Hysteresis-aware double binary search. Returns dictionary of results. if cautious, perform extra measurment at each step to ensure hsyteresis flips and search region has not been corrupted.

find_geometric(decades=None)[source]

Perform repeated linear searches for rising and falling thresholds with 10x increase in resolution each iteration. Final resolution is abstol Optionally specify decades argment to control how many searches are performed. Defaults to as many as possible for given min/max range and abstol. No steps are ever made toward the thresold with magnitude largee than current search’s resolution in case of overshoot.

find_hybrid(linear_backtrack=None)[source]

Perform course binary search, then approach rising and falling thresholds from correct direction with linear search. Both binary and linear searches will be performed to abstol forcing tolerance. The linear search will be started linear_backtrack distance away from expected threshold, with default of 5 * reltol. Each of the two linear sweeps will take approximatley (linear_backtrack / reltol) steps toward threshold. Steps toward threshold are of max magnitude max_step.

find_linear()[source]

Hysteresis aware linear sweep. Returns dictionary of results

find_no_hysteresis()[source]

Hysteresis-unaware single binary search. Returns dictionary of results.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

measure_input(input_sense_channel)[source]

Measure input sense (Kelvin) channel manually after completion of search algorithm. This may be somewhat less accurate than measuring sense channel during search. It exposes possibly non-ideal hysteresis or gain/offset drift of the forcing instrument by uncorrelating measurements in time.

Typically used with comparator_input_sense_channel=None to speed up search at each point. Updates and returns internal results dictionary.

merge_in_channel_group(channel_group_object)

merges in a channel group

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_delegated_channel_list(channels)[source]

private

reconfigure(comparator_input_force_channel, comparator_output_sense_channel, comparator_input_sense_channel, output_threshold=None, minimum=None, maximum=None, abstol=None, forcing_overshoot=None)[source]

Reconfigure channel settings to use a single threshold finder instrument with multiplexed DUT channels. Required arguments: comparator_input_force_channel - DUT comparator input forcing channel object. comparator_output_sense_channel - DUT comparator output measurement channel object. comparator_input_sense_channel - optionally specify a channel object to read back actual (Kelvin) input to DUT from comparator_input_force_channel. Set to None to disable.

Optional argument (set to automatic if unspecified): output_threshold - optional digitization level threshold for comparator_output_sense_channel. If unspecified, will be calculated from mean of comparator_output_sense_channel reading with comparator_input_channel_force set to minimum and maximum.

Optional arguments (unchanged if unspecified): minimum - minimum forced input to the DUT comparator via comparator_input_force_channel. maximum - maximum forced input to the DUT comparator via comparator_input_force_channel. abstol - resolution of search. Relative to comparator_input_channel_force, not comparator_input_sense_channel.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name

class PyICe.lab_instruments.timer[source]

Bases: PyICe.lab_core.instrument, PyICe.lab_core.delegator

Virtual timer instrument. All channels are read only and return time since either last read or first read, scaled to appropriate time units. All channels operate from a common timebase.

add_channel(channel_name)
Usage: Add channel name to instrument. For multi-channel instruments,
typically also takes a second argument representing the physical channel of the instrument. May also take channel configuration arguments specific to the instrument.

Operation: This method should create the channel object then call self._add_channel(channel) to add it to the internal channel group

Method must be overloaded by each instrument driver.
add_channel_delta_days(channel_name)[source]

Channel read reports elapsed time since last read with units of days.

add_channel_delta_hours(channel_name)[source]

Channel read reports elapsed time since last read with units of hours.

add_channel_delta_minutes(channel_name)[source]

Channel read reports elapsed time since last read with units of minutes.

add_channel_delta_scale(channel_name, time_div)[source]

Channel read reports elapsed time since last read with user supplied time units. time_div is seconds per user-unit, eg 60 for minutes.

add_channel_delta_seconds(channel_name)[source]

Channel read reports elapsed time since last read with units of seconds.

add_channel_frequency_hz(channel_name)[source]

Channel read reports read frequency in Hz.

add_channel_frequency_scale(channel_name, time_div)[source]

Channel read reports read frequency with user supplied time units. time_div is seconds per user-unit, eg 60 for RPM.

add_channel_total_days(channel_name)[source]

Channel read reports elapsed time since first read with units of days.

add_channel_total_hours(channel_name)[source]

Channel read reports elapsed time since first read with units of hours.

add_channel_total_minutes(channel_name)[source]

Channel read reports elapsed time since first read with units of minutes.

add_channel_total_scale(channel_name, time_div)[source]

Channel read reports elapsed time since first read with user supplied time units. time_div is seconds per user-unit, eg 60 for minutes.

add_channel_total_seconds(channel_name)[source]

Channel read reports elapsed time since first read with units of seconds.

get_error()

Return the first error from the instrument. Overload in scpi_instrument or the actual instrument class

get_errors()

Return a list of all errors from the instrument. Overload in scpi_instrument or the actual instrument class

get_flat_channel_group(name=None)

returns a channel_group directly containing all channels this one can resolve

merge_in_channel_group(channel_group_object)

merges in a channel group

pause_timer()[source]

pause timer . Call resume_timer() to continue counting.

read_all_channels(categories=None, exclusions=[])

read all readable channels in channel group and return orderd dictionary of results. Optionally filter by list of categories.

read_channels(item_list)

item list is a list of channel objects, names or channel_groups

read_delegated_channel_list(channels)[source]

private

reset_timer()[source]

Resets timer to 0. Use with caution outside channel framework.

resolve_channel_list(item_list)

takes a list of channels, channel_names, or channel_groups and produces a single channel group

resume_timer()[source]

resume timer . Call pause_timer() to stop counting again. Can also call resume_timer() at the beginning of time to start the timer.

stop_and_reset_timer()[source]

Halts and resets timer to 0. Timer will begin running after first read, same behavior as after timer object instantiation. Use with caution outside channel framework.

write_html(file_name=None, verbose=True, sort_categories=False)

return html document string and optionally write to file_name if verbose, include tables of presets and attributes for each channel if sort_categories, group channel names first by category before alphabetical sort of channel name