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
- 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)
.
- 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)
- get_status()[source]
Get device status.
Return tuple
(mode, ovp, ocp, opp, otp)
, wheremode
is the output mode ("cv"
or"cc"
) and the rest of the values show if the corresponding protection is tripped.
- 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, settinginclude=-10
queries all available variables, which is equivalent toinclude="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, settinginclude=-10
queries all available variables, which is equivalent toinclude="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, settinginclude=-10
queries all available variables, which is equivalent toinclude="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
- unlock()
Unlock the access to the device from other threads/processes (isn’t necessarily implemented)