inspy.instrument.powersupply
Power supply interfaces.
- class inspy.instrument.powersupply.PsuAimTTIPL303P(visa_address=None, transport=None)[source]
Bases:
PsuAimTTiBasePower Supply instrument class for the Aim TTi PL303P.
AimTTiPSUBase was created for this instrument, this class inherits all methods It adds checks for single channel and adds two new method (set_current_range, get_current_range)
This power supply has 1 channel
- auto_log_level: int = 20
The log level used for automatic logging of method calls.
To disable logging set to logging.NOTSET.
- await_completion()
Wait for the power supply to complete its operation.
- Return type:
None
- channel_error_message = 'Valid channel(s): '
- channels: list[int] = [1]
- connect()
Connect to instrument using the transport layer.
- Return type:
None
- disconnect()
- Return type:
None
- get_channel_state(channel=1)
Get info on whether a channel is on or off.
- Return type:
bool
- get_current(channel=1)
Get the current of the power supply.
- Return type:
float
- get_current_range(channel=1)[source]
Get the current range of the channel.
- Parameters:
channel (
int) – Channel to get range of.- Raises:
ValueError – Invalid value for current range
- Return type:
str- Returns:
Current range (Low or High)
- get_id()
Identification Query.
- Return type:
str- Returns:
Instrument Identification String.
- get_output_current_trip_point(channel=1)
Get the output current value at which to trip the power supply.
This is for a specific channel.
- Return type:
float
- get_output_voltage_trip_point(channel=1)
Get the output voltage value for tripping the power supply.
This is for a specific channel.
- Return type:
float
- get_voltage(channel=1)
Set the voltage of the power supply.
- Return type:
float
- is_connected: bool
- logger: logging.Logger
- measure_current(channel=1)
Get the measured output current of the power supply on a specific channel.
- Return type:
float
- measure_voltage(channel=1)
Get the measured output voltage of the power supply on a specific channel.
- Return type:
float
- reset()
Reset the power supply.
- Return type:
None
- reset_timeout = 5.0
- set_channel_state(enable=True, channel=1)
Set a specific channel on or off.
- Return type:
None
- set_current(current, channel=1)
Set the current of the power supply.
- Return type:
None
- set_current_range(current_range, channel=1)[source]
Set the current range of the channel.
Requires channel to be switched off before changing.
- Parameters:
current_range (
Literal['Low','High']) – Low current range or high current rangechannel (
int) – Channel to set range of.
- Raises:
Exception – Changing current range requires channel to be disabled!
ValueError – Invalid value for range
- Return type:
None
- set_output_current_trip_point(current, channel=1)
Set the output current value at which to trip the power supply.
This is for a specific channel.
- Return type:
None
- set_output_voltage_trip_point(voltage, channel=1)
Set the output voltage value at which to trip the power supply.
This is for a specific channel.
- Return type:
None
- set_voltage(voltage, channel=1)
Set the voltage of the power supply.
- Return type:
None
- transport: PyVisaTransport
- class inspy.instrument.powersupply.PsuAimTTiPL303QMDP(visa_address=None, transport=None)[source]
Bases:
PsuAimTTiBasePower Supply instrument class for the Aim TTi PL303QMDP.
This class inherits all methods from AimTTiPSUBase. It adds two new mthods (set_current_range, get_current_range)
This power supply has 2 channels.
CAUTION! The channels have been swapped to match all other standard power supplies: Left hand side = Channel 1, Right hand side = Channel 2 The SCPI programming manual will state CH1 -> Master which is on the right hand side. Due to confusion we have resolved this by applying a conversion for this Class.
- auto_log_level: int = 20
The log level used for automatic logging of method calls.
To disable logging set to logging.NOTSET.
- await_completion()
Wait for the power supply to complete its operation.
- Return type:
None
- channel_error_message = 'Valid channel(s): '
- channels: list[int] = [1, 2]
- connect()
Connect to instrument using the transport layer.
- Return type:
None
- disconnect()
- Return type:
None
- get_current_range(channel=1)[source]
Get the current range of the channel.
- Parameters:
channel (
int) – Channel to get range of.- Raises:
ValueError – Invalid value for current range
- Return type:
str- Returns:
Current range (Low or High)
- get_id()
Identification Query.
- Return type:
str- Returns:
Instrument Identification String.
- get_output_current_trip_point(channel=1)[source]
Get the output current value at which to trip the power supply.
This is for a specific channel.
- Return type:
float
- get_output_voltage_trip_point(channel=1)[source]
Get the output voltage value for tripping the power supply.
This is for a specific channel.
- Return type:
float
- is_connected: bool
- logger: logging.Logger
- measure_current(channel=1)[source]
Get the measured output current of the power supply on a specific channel.
- Return type:
float
- measure_voltage(channel=1)[source]
Get the measured output voltage of the power supply on a specific channel.
- Return type:
float
- reset()
Reset the power supply.
- Return type:
None
- reset_timeout = 5.0
- set_channel_state(enable=True, channel=1)[source]
Set a specific channel on or off.
- Return type:
None
- set_current_range(current_range, channel=1)[source]
Set the current range of the channel.
Requires channel to be switched off before changing.
- Parameters:
current_range (
Literal['Low','High']) – Low current range or high current rangechannel (
int) – Channel to set range of.
- Raises:
Exception – Changing current range requires channel to be disabled!
ValueError – Invalid value for range
- Return type:
None
- set_output_current_trip_point(current, channel=1)[source]
Set the output current value at which to trip the power supply.
This is for a specific channel.
- Return type:
None
- set_output_voltage_trip_point(voltage, channel=1)[source]
Set the output voltage value at which to trip the power supply.
This is for a specific channel.
- Return type:
None
- swap = {1: 2, 2: 1}
- transport: PyVisaTransport
- class inspy.instrument.powersupply.PsuKeysightE36312A(visa_address=None, transport=None)[source]
Bases:
PsuKeysightBasePower Supply instrument class for the Keysight E36312A.
This power supply has 3 channels
Channels 1,2,3 refer to P6V, P25V, and N25V respectively # Voltage trip limits: 6.6V,27.5V,27.5V # Current Limits: 5A,1A,1A
- auto_log_level: int = 20
The log level used for automatic logging of method calls.
To disable logging set to logging.NOTSET.
- await_completion()
Wait for all operations to complete.
- Return type:
None
- channel_error_message = 'Valid channel(s): '
- channels: list[int] = [1, 2, 3]
- connect()
Connect to instrument using the transport layer.
- Return type:
None
- disconnect()
- Return type:
None
- get_channel_state(channel=1)
Get channel on/off state.
- Parameters:
channel (
int) – Channel to get.- Return type:
bool- Returns:
Channel state, True(on) or False(off)
- get_current(channel=1)
Get current limit on channel.
- Parameters:
channel (
int) – Channel to get limit on.- Return type:
float- Returns:
Current limit on the channel.
- get_current_protection_state(channel=1)
Check if current protection is enabled.
- Parameters:
channel (
int) – Channel to check trip status on.- Return type:
bool- Returns:
Overcurrent protection occured boolean.
- get_current_trip_status()
Indicate wheter an overcurrent protection event occurred.
- Parameters:
channel – Channel to check trip status on.
- Return type:
bool- Returns:
Overcurrent protection occured boolean.
- get_id()
Identification Query.
- Return type:
str- Returns:
Instrument Identification String.
- get_output_voltage_trip_point(channel=1)
Get the output voltage value at which to trip the power supply.
- Parameters:
channel (
int) – Channel to set.- Return type:
float- Returns:
Output voltage trip point setting.
- get_voltage(channel=1)
Get channel voltage setting.
- Parameters:
channel (
int) – Channel to get voltage setting from.- Return type:
float- Returns:
Channel voltage setting
- get_voltage_trip_status()
Indicate whether an overvoltage protection occurred.
Delays by TRIP_STATE_DELAY to ensure overvoltage status has updated.
- Parameters:
channel – Channel to check(might not be used).
- Return type:
bool- Returns:
Overvoltage protection occured boolean.
- is_connected: bool
- logger: logging.Logger
- measure_current(channel=1)
Measure output current on a specific channel.
- Parameters:
channel (
int) – Channel to measure current on.- Return type:
float- Returns:
Measured current.
- measure_voltage(channel=1)
Get the measured output voltage of the power supply on a specific channel.
- Parameters:
channel (
int) – Channel to measure voltage on.- Return type:
float- Returns:
Measured voltage.
- reset()
Reset instrument to factory settings.
Includes clearing status register and protection events.
- Return type:
None
- reset_current_trip_with_disable(channel=1)
Clear overcurrent protection event. Disables channel.
- Parameters:
channel (
int) – Channel to clear overcurrent protection on.- Return type:
None
- reset_voltage_trip_with_disable(channel=1)
Clear overvoltage protection event. Disables channel.
- Parameters:
channel (
int) – Channel to clear.- Return type:
None
- set_channel_state(enable=True, channel=1)
Set channel on or off.
- Parameters:
channel (
int) – Channel to enable/disable.enable (
bool) – True(on) or False(off).
- Return type:
None
- set_current(current, channel=1)
Set current limit on channel.
- Parameters:
current (
float) – Current limit setting.channel (
int) – Channel to set limit on.
- Return type:
None
- set_current_protection_state(enable=True, channel=1)
Set current protection on a specific channel.
Trips the channel after 0.05s in current limit mode.
- Parameters:
enable (
bool) – Enable (True) or disable (False) current protection.channel (
int) – Channel to set.
- Return type:
None
- set_output_voltage_trip_point(voltage, channel=1)
Set the output voltage value at which to trip the power supply.
- Parameters:
voltage (
float) – Voltage trip point.channel (
int) – Channel to set.
- Return type:
None
- set_voltage(voltage, channel=1)
Set channel voltage.
- Parameters:
voltage (
float) – Voltage setting.channel (
int) – Channel to set voltage on.
- Return type:
None
- transport: PyVisaTransport