The tenma module¶
Autogenerated API documentation for tenma¶
Complete serial driver for the Tenma 72-2535, *72-2540, *72-2545, *72-2550, 72-2930 and *72-2940 (see details below)
Note
* The driver has not been tested on the models with a *. However, the two models that has been tested, seems like are built from the same template, so there is a very high probability that the generic
TenmaBase
driver will work with those as well.
Implemented according to “Series Protocol V2.0 of Remote Control” (referred to in inline comments as the spec) which can be downloaded from the link below.
Manual and specification can be downloaded from here: https://www.element14.com/community/ docs/DOC-75108/l/protocol-information-for-tenma-72-2550-and-tenma-72-2535-qa-window- driver
-
class
PyExpLabSys.drivers.tenma.
TenmaBase
(device, sleep_after_command=0.1)[source]¶ Bases:
serial.serialposix.Serial
Serial driver for the Tenma 72-2535, *72-2540, *72-2545, *72-2550, 72-2930 and *72-2940 power supplies
Note
* The driver has not been tested on the models with a *. However, the two models that has been tested, seems like are built from the same template, so there is a very high probability that the generic
TenmaBase
driver will work with those as well.-
com
(command, decode_reply=True)[source]¶ Send command to the device and possibly return reply
Parameters:
-
set_current
(current)[source]¶ Sets the current setpoint
Parameters: current (float) – The current to set
-
set_voltage
(voltage)[source]¶ Sets the voltage setpoint
Parameters: voltage (float) – The voltage to set
-
get_actual_current
()[source]¶ Return the actual_current
Returns: The actual current Return type: float
-
get_actual_voltage
()[source]¶ Return the actual voltage
Returns: The actual coltage Return type: float
-
status
()[source]¶ Return the status
The output is a dict with the following keys and types:
status = { 'channel1_mode': 'CV', # or 'CC' for constand current of voltage 'channel2_mode': 'CV', # or 'CC' for constand current of voltage 'beep_on': True, 'lock_on': False, 'output_on': True, 'tracking_status: 'Independent', # or 'Series' or 'Parallel' }
Returns: See fields specification above Return type: dict
-
get_identification
()[source]¶ Return the device identification
Returns: E.g: ‘TENMA 72-2535 V2.0’ Return type: str
-
recall_memory
(memory_number)[source]¶ Recall memory of panel settings
Note
Recalling memory will automaticall disable output
Parameters: number (int) – The number of the panel settings memory to recall Raises: ValueError
– On invalid memory_number
-
save_memory
(memory_number)[source]¶ Recall memory of panel settings
Note
Saving to a memory slot seems to only be available for the memory slot currently active
Parameters: number (int) – The number of the panel settings memory to recall Raises: ValueError
– On invalid memory_number
-
-
class
PyExpLabSys.drivers.tenma.
Tenma722535
(device, sleep_after_command=0.1)[source]¶ Bases:
PyExpLabSys.drivers.tenma.TenmaBase
Driver for the Tenma 72-2535 power supply
-
class
PyExpLabSys.drivers.tenma.
Tenma722550
(device, sleep_after_command=0.1)[source]¶ Bases:
PyExpLabSys.drivers.tenma.TenmaBase
Driver for the Tenma 72-2550 power supply
-
class
PyExpLabSys.drivers.tenma.
Tenma722930
(device, sleep_after_command=0.1)[source]¶ Bases:
PyExpLabSys.drivers.tenma.TenmaBase
Driver for the Tenma 72-2930 power supply