Model 155 Precision Current and Voltage Source

The Lake Shore 155 is a low noise, high precision current and voltage source.

More information about the instrument can be found on our website including the manual which has a list of all SCPI commands and queries.

Example Scripts

Below are a few example scripts for the Model 155 that use the Lake Shore Python driver.

Model 155 Sweep Example

from lakeshore import PrecisionSource

# The purpose of this script is to sweep frequency, amplitude, and offset of an output signal using
# a Lake Shore AC/DC 155 Precision Source

# Create a new instance of the Lake Shore 155 Precision Source.
# It will connect to the first instrument it finds via serial USB
my_source = PrecisionSource()

# Define a custom list of frequencies to sweep through
frequency_sweep_list = ['1', '10', '100', '250', '500', '750', '1000', '2000', '5000', '10000']

# Sweep frequency in voltage mode. Wait 1 second at each step
my_source.sweep_voltage(1, frequency_values=frequency_sweep_list)


# Creates a list of whole number offset values between -5V and 5V.
offset_sweep_list = range(-5, 6)
# Creates a list of amplitudes between 0 and 5V incrementing by 100mV
amplitude_sweep_list = [value/10 for value in range(0, 51)]
# Creates a list of frequencies starting with 0.1 Hz and increasing by powers of ten up to 10 kHz
frequency_sweep_list = [10**exponent for exponent in range(-1, 5)]

# Use the lists defined above to sweep across all combinations of the lists.
# For each combination, wait 10ms before moving to the next one.
# Note that the dwell time will be limited by the response time of the serial communication.
my_source.sweep_voltage(0.01,
                        offset_values=offset_sweep_list,
                        amplitude_values=amplitude_sweep_list,
                        frequency_values=frequency_sweep_list)

Classes and methods

Instrument methods

class lakeshore.model_155.PrecisionSource(serial_number=None, com_port=None, baud_rate=115200, flow_control=False, timeout=2.0, ip_address=None, tcp_port=7777, **kwargs)

A class object representing a Lake Shore 155 precision I/V source

sweep_voltage(dwell_time, offset_values=None, amplitude_values=None, frequency_values=None)

Sweep source output voltage parameters based on list arguments.

Args:
dwell_time (float):
The length of time in seconds to wait at each parameter combination. Note that the update rate will be limited by the SCPI communication response time. The response time is usually on the order of 10-30 milliseconds.
offset_values (list):
DC offset values in volts to sweep over
amplitude_values (list):
Peak to peak values in volts to sweep over
frequency_values (list):
Frequency values in Hertz to sweep over
sweep_current(dwell_time, offset_values=None, amplitude_values=None, frequency_values=None)

Sweep the source output current parameters based on list arguments

Args:
dwell_time (float):
The length of time in seconds to wait at each parameter combination. Note that the update rate will be limited by the SCPI communication response time. The response time is usually on the order of 10-30 milliseconds.
offset_values (list):
DC offset values in volts to sweep over
amplitude_values (list):
Peak to peak values in volts to sweep over
frequency_values (list):
Frequency values in Hertz to sweep over
enable_output()

Turns on the source output.

disable_output()

Turns off the source output.

set_output(output_on)

Configure the source output on or off.

Args:
output_on (bool):
Turns the source output on when True, off when False.
route_terminals(output_connections_location='REAR')

Configures whether the source output is routed through the front or rear connections.

Args:
output_connections_location (str):
  • Valid options are:
  • “REAR” (Output is routed out the rear connections)
  • “FRONT” (Output is routed out the front connections)
output_sine_current(amplitude, frequency, offset=0.0, phase=0.0)

Configures and enables the source output to be a sine wave current source.

Args:
amplitude (float):
The peak current amplitude value in amps.
frequency (float):
The source frequency value in hertz.
offset (float):
The DC offset current in amps.
phase (float):
Shifts the phase of the output relative to the reference out. Must be between -180 and 180 degrees.
output_sine_voltage(amplitude, frequency, offset=0.0, phase=0.0)

Configures and enables the source output to be a sine wave voltage source.

Args:
amplitude (float):
The peak voltage amplitude value in volts.
frequency (float):
The source frequency value in hertz.
offset (float):
The DC offset voltage in volts.
phase (float):
Shifts the phase of the output relative to the reference out. Must be between -180 and 180 degrees.
output_dc_current(current_level)

Configures the source output to be a DC current source.

Args:
current_level (float):
The output current level in amps.
output_dc_voltage(voltage_level)

Configures the source output to be a DC current source.

Args:
voltage_level (float):
The output voltage level in volts.
get_output_settings()

Returns a dictionary of the output settings.

enable_autorange()

Enables the instrument to automatically select the best range for the given output parameters.

disable_autorange()

Enables the instrument to automatically select the best range for the given output parameters.

set_current_range(current_range='100E-3')

Manually sets the current range when autorange is disabled.

Args:
current_range (str):
  • The range in amps. Valid ranges are:
  • “100E-3”
  • “10E-3”
  • “1E-3”
  • “100E-6”
  • “10E-6”
  • “1E-6”
set_voltage_range(voltage_range='10')

Manually sets the voltage range when autorange is disabled.

Args:
voltage_range (str):
  • The range in volts. Valid ranges are:
  • “100”
  • “10”
  • “1”
  • “0.1”
  • “0.01”
set_current_limit(current_limit)

Sets the highest settable current output value when in current mode.

Args:
current_limit (float):
The maximum settable current in amps. Must be between 0 and 100 milliamps.
set_voltage_limit(voltage_limit)

Sets the highest settable voltage output value when in voltage mode.

Args:
voltage_limit (float):
The maximum settable voltage in amps. Must be between 0 and 100 volts.
set_current_mode_voltage_protection(max_voltage)

Sets the maximum voltage level permitted by the instrument when sourcing current.

Args:
max_voltage (float):
The maximum permissible voltage. Must be between 1 and 100 volts.
set_voltage_mode_current_protection(max_current)

Sets the maximum current level permitted by the instrument when sourcing voltage.

Args:
max_current (float):
The maximum permissible voltage. Must be between 1 and 100 volts.
enable_ac_high_voltage_compliance()

Configures the current mode compliance voltage to be 100V in AC output modes.

disable_ac_high_voltage_compliance()

Configures the current mode compliance voltage to be 10V in AC output modes.

command(*commands, **kwargs)

Send a SCPI command or multiple commands to the instrument

Args:
commands (str):
Any number of SCPI commands.
Kwargs:
check_errors (bool):
Chooses whether to query the SCPI error queue and raise errors as exceptions. True by default.
connect_tcp(ip_address, tcp_port, timeout)

Establishes a TCP connection with the instrument on the specified IP address

connect_usb(serial_number=None, com_port=None, baud_rate=None, data_bits=None, stop_bits=None, parity=None, timeout=None, handshaking=None, flow_control=None)

Establish a serial USB connection

disconnect_tcp()

Disconnect the TCP connection

disconnect_usb()

Disconnect the USB connection

factory_reset()

Resets all system information such as settings, wi-fi connections, date and time, etc.

get_operation_event_enable_mask()

Returns the names of the operation event enable register bits and their values. These values determine which operation bits propagate to the operation event register.

get_operation_events()

Returns the names of operation event status register bits that are currently high. The event register is latching and values are reset when queried.

get_present_operation_status()

Returns the names of the operation status register bits and their values

get_present_questionable_status()

Returns the names of the questionable status register bits and their values

get_questionable_event_enable_mask()

Returns the names of the questionable event enable register bits and their values. These values determine which questionable bits propagate to the questionable event register.

get_questionable_events()

Returns the names of questionable event status register bits that are currently high. The event register is latching and values are reset when queried.

get_service_request_enable_mask()

Returns the named bits of the status byte service request enable register. This register determines which bits propagate to the master summary status bit

get_standard_event_enable_mask()

Returns the names of the standard event enable register bits and their values. These values determine which bits propagate to the standard event register

get_standard_events()

Returns the names of the standard event register bits and their values

get_status_byte()

Returns named bits of the status byte register and their values

modify_operation_register_mask(bit_name, value)

Gets the operation condition register mask, changes a bit, and sets the register

Args:
bit_name (str):
The name of the bit to modify.
value (bool):
Determines whether the bit masks (false) or passes (true) the corresponding state.
modify_questionable_register_mask(bit_name, value)

Gets the questionable condition register mask, changes a bit, and sets the register

Args:
bit_name (str):
The name of the bit to modify.
value (bool):
Determines whether the bit masks (false) or passes (true) the corresponding state.
modify_service_request_mask(bit_name, value)

Gets the service request enable mask, changes a bit, and sets the register.

Args:
bit_name (str):
The name of the bit to modify.
value (bool):
Determines whether the bit masks (false) or passes (true) the corresponding state.
modify_standard_event_register_mask(bit_name, value)

Gets the standard event register mask, changes a bit, and sets the register

Args:
bit_name (str):
The name of the bit to modify.
value (bool):
Determines whether the bit masks (false) or passes (true) the corresponding state.
query(*queries, **kwargs)

Send a SCPI query or multiple queries to the instrument and return the response(s)

Args:
queries (str):
Any number of SCPI queries or commands.
Kwargs:
check_errors (bool):
Chooses whether to query the SCPI error queue and raise errors as exceptions. True by default.
Returns:
The instrument query response as a string.
reset_measurement_settings()

Resets measurement settings to their default values.

reset_status_register_masks()

Resets status register masks to preset values

set_operation_event_enable_mask(register_mask)

Configures the values of the operation event enable register bits. These values determine which operation bits propagate to the operation event register.

Args:
register_mask ([Instrument]OperationRegister):
An instrument specific OperationRegister class object with all bits configured true or false.
set_questionable_event_enable_mask(register_mask)

Configures the values of the questionable event enable register bits. These values determine which questionable bits propagate to the questionable event register.

Args:
register_mask ([Instrument]QuestionableRegister):
An instrument specific QuestionableRegister class object with all bits configured true or false.
set_service_request_enable_mask(register_mask)

Configures values of the service request enable register bits. This register determines which bits propagate to the master summary bit

Args:
register_mask (StatusByteRegister):
A StatusByteRegister class object with all bits configured true or false.
set_standard_event_enable_mask(register_mask)

Configures values of the standard event enable register bits. These values determine which bits propagate to the standard event register

Args:
register_mask (StandardEventRegister):
A StandardEventRegister class object with all bits configured true or false.