KeysightElectrometerCommandFactory#

class lsst.ts.electrometer.KeysightElectrometerCommandFactory#

Bases: ElectrometerCommandFactory

Format Keysight-specific SCPI commands for RS-232 control.

This class includes commands that differ from the Keithley command set.

Methods Summary

acquire_data()

Returns the command to start acquiring data

activate_filter(mode, filter_type, active)

Build a command that enables or disables a digital filter.

always_read()

Return always read buffer.

clear_array()

Return clear buffer.

discharge_capacitor()

Discharges the capacitor.

enable_temperature_reading(enable)

Return enable temperature reading.

enable_zero_correction(enable)

Return enable zero correction.

format_trac([timestamp, temperature, ...])

Return format data stored to the buffer.

get_filter_status(mode, filter_type)

Return filter status.

get_last_error()

Return get last error.

get_trace_format()

Returns the format of the trace.

get_voltage_source_status()

Return a command to query voltage source status.

init_buffer()

Return start storing readings into the buffer.

integration_time(mode[, time])

Return integration time.

next_read()

Return the latest measurement data from buffer

output_trigger_line()

Sets output trigger line

perform_zero_calibration(mode, auto, ...)

Build the command sequence for zero calibration.

read_buffer()

Return read buffer.

set_infinite_triggers()

Return take infinite measurements

set_mode(mode)

Return set mode.

set_timer(mode, value)

Return set time command string.

stop_taking_data()

Stops taking measurements

toggle_voltage_source(enable)

Return a command to enable or disable the voltage source.

Methods Documentation

acquire_data()#

Returns the command to start acquiring data

Returns:

command – The generated command string

Return type:

str

activate_filter(mode, filter_type, active)#

Build a command that enables or disables a digital filter.

Parameters:
  • mode (UnitMode) – Measurement unit for the filter to activate.

  • filter_type (Filter) – Filter type to activate.

  • active (int) – Whether to activate the filter.

Returns:

command – The generated command string.

Return type:

str

always_read()#

Return always read buffer.

Returns:

command – The generated command string. An array of all data in the buffer.

Return type:

str

clear_array()#

Return clear buffer.

Returns:

command – The generated command string.

Return type:

str

discharge_capacitor()#

Discharges the capacitor.

Returns:

command – The generated command string.

Return type:

str

enable_temperature_reading(enable)#

Return enable temperature reading.

Parameters:

enable (bool) – Whether to enable temperature reading.

Returns:

command – The generated command string.

Return type:

str

enable_zero_correction(enable)#

Return enable zero correction.

Parameters:

enable (bool) – Whether to enable zero correction.

Returns:

command – The generated command string.

Return type:

str

format_trac(timestamp=True, temperature=False, voltage=False, set_mode=False, mode='VOLT', channel=False)#

Return format data stored to the buffer.

Parameters:
  • timestamp (bool) – Whether to store timestamp data.

  • temperature (bool) – Whether to store temperature data.

  • voltage (bool) – Whether to store voltage-source data.

  • set_mode (bool) – Whether to store data for a specified measurement mode.

  • mode (str) – Measurement mode to store when set_mode is true.

  • channel (bool) – Whether to store channel data.

Returns:

command – The generated command string.

Return type:

str

get_filter_status(mode, filter_type)#

Return filter status.

Parameters:
  • mode (UnitMode) – The unit of the filter to check

  • filter_type (Filter) – The type of the filter to check.

Returns:

command – The generated command string.

Return type:

str

get_last_error()#

Return get last error.

Returns:

command – The generated command string.

Return type:

str

get_trace_format()#

Returns the format of the trace.

Returns:

command – The generated command string.

Return type:

str

get_voltage_source_status()#

Return a command to query voltage source status.

init_buffer()#

Return start storing readings into the buffer.

Returns:

command – The generated command string.

Return type:

str

integration_time(mode, time=0.001)#

Return integration time.

Parameters:
  • mode (UnitMode) – The unit of the aperture to set.

  • time (float, optional) – The integration time of the aperture. Defaults to 0.001 seconds.

Returns:

command – The generated command string.

Return type:

str

next_read()#

Return the latest measurement data from buffer

Returns:

command – The generated command string.

Return type:

str

output_trigger_line()#

Sets output trigger line

Returns:

command – The generated command string.

Return type:

str

perform_zero_calibration(mode, auto, range_value, int_time)#

Build the command sequence for zero calibration.

Required when setting mode to volts or amps to cancel internal offsets. See page 4-10 of the user manual for the sequence.

Parameters:
  • mode (UnitMode) – Measurement unit for the device.

  • auto (bool) – Whether auto range is activated.

  • range_value (float) – The range of the values.

  • int_time (float) – Integration time to use for the calibration.

Returns:

command – Generated command string.

Return type:

str

read_buffer()#

Return read buffer.

Returns:

command – The generated command string.

Return type:

str

set_infinite_triggers()#

Return take infinite measurements

Returns:

command – The generated command string.

Return type:

str

set_mode(mode)#

Return set mode.

Parameters:

mode (UnitMode) – The unit to switch to.

Returns:

command – The generated command string.

Return type:

str

set_timer(mode, value)#

Return set time command string.

Parameters:
  • mode (str or enums.UnitMode) – Measurement mode.

  • value (float) – Timer value in power-line cycles.

Returns:

command – The generated command string.

Return type:

str

stop_taking_data()#

Stops taking measurements

Returns:

command – The generated command string.

Return type:

str

toggle_voltage_source(enable)#

Return a command to enable or disable the voltage source.