pylablib.devices.ElektroAutomatik package

Submodules

pylablib.devices.ElektroAutomatik.base module

exception pylablib.devices.ElektroAutomatik.base.ElektroAutomatikError[source]

Bases: DeviceError

Generic Elektro Automatik device error

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception pylablib.devices.ElektroAutomatik.base.ElektroAutomatikBackendError(exc)[source]

Bases: ElektroAutomatikError, DeviceBackendError

Generic Elektro Automatik backend communication error

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class pylablib.devices.ElektroAutomatik.base.TDeviceInfo(model, manufacturer, serial_no, article_no, sw_ver)

Bases: tuple

article_no
manufacturer
model
serial_no
sw_ver
class pylablib.devices.ElektroAutomatik.base.TOutputLimits(voltage, current, power)

Bases: tuple

current
power
voltage
class pylablib.devices.ElektroAutomatik.base.TStatus(enabled, mode, ovp, ocp, opp, otp)

Bases: tuple

enabled
mode
ocp
opp
otp
ovp
class pylablib.devices.ElektroAutomatik.base.PS2000B(conn, remote_mode='force')[source]

Bases: ICommBackendWrapper

Elektro Automatik PS2000B series power supply.

Parameters:
  • conn – serial connection parameters (usually, COM-port address)

  • remote_mode – approach to setting the remote mode; can be "force" (enable on connection, disable on disconnection) or "manual" (do nothing about it, should be enabled or disabled automatically). In the remote mode the device is controlled from the PC (front panel controls are disabled), while in the local mode it can only be queried remotely, but not changed.

Error

alias of ElektroAutomatikError

class TTelegram(obj, data, dnode)

Bases: tuple

data
dnode
obj
open()[source]

Open the backend

close()[source]

Close the backend

query(obj, dlen, dnode=0, kind='raw')[source]

Query value of the given object.

dlen specifies the value length and dnode sets the device node (only relevant for multi-source models). kind specifies the result kind; can be "raw" (raw bytes), "str" (string), "int" (2-byte integer) or "float" (r-byte float).

comm(obj, value, dnode=0, kind='int')[source]

Set value of the given object.

dnode sets the device node (only relevant for multi-source models). kind specifies the value kind; can be "raw" (raw bytes), or "int" (2-byte integer).

get_device_info()[source]

Get device information.

Return tuple (model, manufacturer, serial_no, article_no, sw_ver).

get_output_limits()[source]

Get nominal output limits.

Return tuple (voltage, current, power).

is_remote_enabled()[source]

Check if the remote-control mode is enabled (if it is disabled, output and limit values can be read but not set)

enable_remote(enable=True)[source]

Enable or disable the remote-control mode (if it is disabled, output and limit values can be read but not set)

is_output_enabled()[source]

Check if the output is enabled

enable_output(enable=True)[source]

Enable or disable the output

get_status()[source]

Get device status.

Return tuple (mode, ovp, ocp, opp, otp), where mode is the output mode ("cv" or "cc") and the rest of the values show if the corresponding protection is tripped.

get_voltage_setpoint()[source]

Get output voltage setpoint

get_voltage()[source]

Get the actual output voltage

set_voltage(value)[source]

Set output voltage setpoint

get_current_setpoint()[source]

Get output current setpoint

get_current()[source]

Get the actual output current

set_current(value)[source]

Set output current setpoint

get_ovp_threshold()[source]

Get over-voltage protection threshold

set_ovp_threshold(value)[source]

Set over-voltage protection threshold

get_ocp_threshold()[source]

Get over-current protection threshold

apply_settings(settings)

Apply the settings.

settings is the dict {name: value} of the device available settings. Non-applicable settings are ignored.

get_device_variable(key)

Get the value of a settings, status, or full info parameter

get_full_info(include=0)

Get dict {name: value} containing full device information (including status and settings).

include specifies either a list of variables (only these variables are returned), a priority threshold (only values with the priority equal or higher are returned), or "all" (all available variables). Since the lowest priority is -10, setting include=-10 queries all available variables, which is equivalent to include="all".

get_full_status(include=0)

Get dict {name: value} containing the device status (including settings).

include specifies either a list of variables (only these variables are returned), a priority threshold (only values with the priority equal or higher are returned), or "all" (all available variables). Since the lowest priority is -10, setting include=-10 queries all available variables, which is equivalent to include="all".

get_settings(include=0)

Get dict {name: value} containing all the device settings.

include specifies either a list of variables (only these variables are returned), a priority threshold (only values with the priority equal or higher are returned), or "all" (all available variables). Since the lowest priority is -10, setting include=-10 queries all available variables, which is equivalent to include="all".

is_opened()

Check if the device is connected

lock(timeout=None)

Lock the access to the device from other threads/processes (isn’t necessarily implemented)

locking(timeout=None)

Context manager for lock & unlock

set_device_variable(key, value)

Set the value of a settings parameter

set_ocp_threshold(value)[source]

Set over-current protection threshold

unlock()

Unlock the access to the device from other threads/processes (isn’t necessarily implemented)

Module contents