Controller for Elektro-Automatik power supplies
Project description
SOMANET Test Suite - Control for EA PSUs
Optional Step
Move 99-ea-psu.rules
to /etc/udev/rules.d/
and restart udev
with sudo service udev restart
.
This rule will create devices, that look like this ea-ps-20xx-xx-0
or ea-ps-23xx-xx-0
with an increasing counter for every
connected device.
Before start
To use ttyACMx
devices without sudo, add your user to the group dialout
:
sudo adduser your_user dialout
Create object
If you added the device rule and you connected only one PSU, there is no need to provide a device name:
psu = PsuEA()
If there is more then one PSU connected to the host, the script will connect to the first device found. To connect to a particular PSU, you can call
psu = PsuEA(comport='ttyACM0')
or take the S/N from the back of the PSU and call:
psu = PsuEA(sn='0123456789')
Dis/connect to power supply for controlling
psu.remote_on()
psu.remote_off()
For multi output devices most functions provide a additional output argument:
psu.remote_on(output_num=0)
or psu.remote_on(output_num=1)
It's only necessary to call remote_on()
, when you want to control the PSU.
If you just want to read device information, you don't need to.
Power on and off output
psu.output_on()
psu.output_off()
or
psu.output_on(output_num=1)
psu.output_off(output_num=1)
Set parameters
Arguments can be int or float.
psu.set_voltage(24)
psu.set_current(0.5)
psu.set_ovp(30)
psu.set_ocp(8)
Get parameters
Return argument: float.
psu.get_voltage()
psu.get_current()
Get status
Return argument: dictionary
psu.get_status()
Dict contains following keys:
- 'remote on'
- 'output on'
- 'controller state' (CV=0, CC=2)
- 'tracking active'
- 'OVP activ'
- 'OCP activ'
- 'OPP activ'
- 'OTP activ'
Get device description
Return argument: tuple (name, SN)
psu.get_device_description()
Close connection
To close the connection, call:
psu.close(remote=False, output=False)
Set both arguments to True to turn off the output and remote control
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for ea_psu_controller-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b53fd62063d26d3dd25c4855529e58b236b4b7e85ab1529d67ec71ee5f34d15 |
|
MD5 | 633e17afdd61de616ad70b41497c30ce |
|
BLAKE2b-256 | ac51749214dbb051213c9442689f4eeaa8ad1065867844e019995c989ec43a04 |