SOMANET Test Suite
==================
All modules to make successful and complete testing of SOMANET modules possible.
Even though this suite is written for Linux, at least the Elektronik Automation Power Supply Driver also runs under Windows.
Installation
------------
1) Install non-python tools (only Linux)
``sudo ./install.sh -a -m <MAC_OF_ETHERCAT_INTERFACE>``
This will install:
- IgH EtherCAT Master
- UDEV rules for power supplies
- LabJack driver and Kipling
- SOEM EtherCAT Master
If one of these tools are already installed, the script will skip the installation
and continue with the next tool.
Call "-h" to show the help text.
2) Install python script
``python setup.py install``
Usage
-----
1. PSU
^^^^^^
Import module
"""""""""""""
``import somanet_test_suite as sts``
Create object
"""""""""""""
To connect to a specific PSU, you can call
Linux: ``psu = sts.PsuEA(comport='ttyACM0')`` or ``psu = sts.PsuEA(comport='usb-EA_Elektro-Automatik_PS_2042-10B_2815450332-if00')``
Windows: ``psu = sts.PsuEA(comport='COM1')`` or as com port description: ``psu = sts.PsuEA(comport='PS 2000 B')``
If you added the device rule and you connected only one PSU, there is no need to provide a device name:
``psu = sts.PsuEA()``
Also possible is:
``psu = sts.PsuEA(comport='ea-ps-20xx-xx-0')``
| If there is more then one PSU connected to the host, the script will connect to the first device found.
| It is also possible to take the S/N written on the back of the PSU and call:
``psu = sts.PsuEA(sn='0123456789')``
or to use the device designator:
``psu = sts.PsuEA(desi='PS 2142-10B')``
Dis/connect to power supply for controlling
"""""""""""""""""""""""""""""""""""""""""""
``psu.remote_on()``
``psu.remote_off()``
For multi output devices most functions provide an additional output argument:
``psu.remote_on(output_num=0)``
``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, output_num=0)``
``psu.set_current(0.5, output_num=0)``
``psu.set_ovp(30, output_num=0)``
``psu.set_ocp(8, output_num=0)``
The script will always set the maximum possible values in dependency of the nominal power.
| For example:
| Nominal power = 160 W
| When you set the voltage to 40 V, it's not possible to set a higher current than 4 A (=160W/40V),
| regardless of the maximum current output of the device.
| If you want to set a higher current, you must first reduce the voltage.
| Also this script treats voltage with a higher priority.
| It will decrease the current, if the maximum power is reached.
| For example:
| Nominal power = 160 W, set current = 10 A
| When you set the voltage to 32 V, it'll results in a maximum current of 5 A.
Get parameters
""""""""""""""""""""""""""
Return argument: float.
``psu.get_voltage(output_num: int)``
``psu.get_current(output_num: int)``
``psu.get_power(output_num: int)``
Maximum sampling rate is ~10 Hz.
Nominal values:
If update is true, the value will be pulled directly from the device.
``psu.get_nominal_voltage(output_num: int, update: bool)``
``psu.get_nominal_current(output_num: int, update: bool)``
``psu.get_nominal_power(output_num: int, update: bool)``
Reset error
"""""""""""""
If an overcurrent, overvoltage, overpower or overtemperature protection error happens,
you can reset the error with:
``psu.reset_error(output_num: int)``
Tracking
"""""""""""""
(Only 3-port devices).
Tracking disables the controlling of output 2. Output 1 controls then also output 2.
``psu.tracking_on()``
``psu.tracking_off()``
Get status
"""""""""""""
Return argument: dictionary
``psu.get_status(update: bool)``
List of dictionary containing the following keys (index is output number):
- 'output' (int)
- 'remote on' (bool)
- 'output on' (bool)
- 'controller state' ('CV', 'CC')
- 'tracking active' (bool)
- 'OVP activ' (bool)
- 'OCP activ' (bool)
- 'OPP activ' (bool)
- 'OTP activ' (bool)
- 'act voltage' (float)
- 'act current' (float)
Get device description
""""""""""""""""""""""""""
Return argument: tuple (name, SN)
``psu.get_device_description(update : bool)``
Close connection
""""""""""""""""""""""""""
To close the connection, call:
``psu.close()``
This will just stop the communication, the PSU outputs will remain in their current states.
2. SANSSOUCI - So(manet) Se(nsor) Si(mulator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A framework to simulate different sensors (Hall, QEI, ...).
Currently only velocity is supported for Hall and QEI.
Preperation
""""""""""""""""""""""""""
What you need:
- LabJack
- SN75174 Differential Line Driver (for RS-422 communication and as level shifter 3.3V -> 5V)
Connection
""""""""""""""""""""""""""
See also: https://doc.synapticon.com/hardware/drive/drive_1000/d3/docs/index.html#encoder-port-1
+--------------+------------------+
| Pin SN75174 | Encoder/Labjack |
+==============+==================+
| 1 | LJ: FIO0 |
+--------------+------------------+
| 2 | A+ |
+--------------+------------------+
| 3 | A- |
+--------------+------------------+
| 4 | Connect with |
| | 10kOhm to Vcc |
| | or NC |
+--------------+------------------+
| 5 | B- |
+--------------+------------------+
| 6 | B+ |
+--------------+------------------+
| 7 | LJ: FIO01 |
+--------------+------------------+
| 8 | GND of LJ and |
| | Encoder |
+--------------+------------------+
| 9 | LJ: FIO2 |
+--------------+------------------+
| 10 | I+ |
+--------------+------------------+
| 11 | I- |
+--------------+------------------+
| 12 | Connect with |
| | 10kOhm to Vcc |
| | or NC |
+--------------+------------------+
| 13 | N.C. |
+--------------+------------------+
| 14 | N.C. |
+--------------+------------------+
| 15 | N.C. |
+--------------+------------------+
| 16 | Vcc (5V) |
+--------------+------------------+
Usage
""""""""""""""""""""""""""
**Hall**
``sensor = Sanssouci(printer.write, 'HALL', pole_pairs=7)``
``sensor.set_velocity(20)``
**QEI**
``sensor = Sanssouci(printer.write, 'QEI', resolution=100)``
``sensor.set_velocity(20)``
Raw data
{
"_id": null,
"home_page": "",
"name": "somanet-test-suite",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "power supply unit,psu,daq,Labjack,Elektro-Automation,EtherCAT,IgH,Synapticon,CANopen,CANSOEM",
"author": "Synapticon GmbH",
"author_email": "hstroetgen@synapticon.com",
"download_url": "https://files.pythonhosted.org/packages/ae/ef/a50c66431be44278cfc0f9be4ad31db242ee5bc46fb48895d94159898797/somanet_test_suite-1.1.3.tar.gz",
"platform": null,
"description": "SOMANET Test Suite\n==================\n\nAll modules to make successful and complete testing of SOMANET modules possible.\n\nEven though this suite is written for Linux, at least the Elektronik Automation Power Supply Driver also runs under Windows.\n\nInstallation\n------------\n\n1) Install non-python tools (only Linux)\n ``sudo ./install.sh -a -m <MAC_OF_ETHERCAT_INTERFACE>``\n\n This will install:\n - IgH EtherCAT Master\n - UDEV rules for power supplies\n - LabJack driver and Kipling\n - SOEM EtherCAT Master\n\n If one of these tools are already installed, the script will skip the installation\n and continue with the next tool.\n Call \"-h\" to show the help text.\n\n2) Install python script\n ``python setup.py install``\n\n\nUsage\n-----\n\n1. PSU\n^^^^^^\nImport module\n\"\"\"\"\"\"\"\"\"\"\"\"\"\n ``import somanet_test_suite as sts``\n\nCreate object\n\"\"\"\"\"\"\"\"\"\"\"\"\"\nTo connect to a specific PSU, you can call\n\nLinux: ``psu = sts.PsuEA(comport='ttyACM0')`` or ``psu = sts.PsuEA(comport='usb-EA_Elektro-Automatik_PS_2042-10B_2815450332-if00')``\n\nWindows: ``psu = sts.PsuEA(comport='COM1')`` or as com port description: ``psu = sts.PsuEA(comport='PS 2000 B')``\n\nIf you added the device rule and you connected only one PSU, there is no need to provide a device name:\n\n ``psu = sts.PsuEA()``\n\nAlso possible is:\n\n ``psu = sts.PsuEA(comport='ea-ps-20xx-xx-0')``\n\n| If there is more then one PSU connected to the host, the script will connect to the first device found.\n| It is also possible to take the S/N written on the back of the PSU and call:\n\n ``psu = sts.PsuEA(sn='0123456789')``\n\nor to use the device designator:\n\n ``psu = sts.PsuEA(desi='PS 2142-10B')``\n\n\nDis/connect to power supply for controlling\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n ``psu.remote_on()``\n\n ``psu.remote_off()``\n\nFor multi output devices most functions provide an additional output argument:\n\n ``psu.remote_on(output_num=0)``\n\n ``psu.remote_on(output_num=1)``\n\n| It's only necessary to call ``remote_on()``, when you want to control the PSU.\n| If you just want to read device information, you don't need to.\n\nPower on and off output\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n ``psu.output_on()``\n\n ``psu.output_off()``\n\nor\n\n ``psu.output_on(output_num=1)``\n\n ``psu.output_off(output_num=1)``\n\nSet parameters\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nArguments can be int or float.\n\n ``psu.set_voltage(24, output_num=0)``\n\n ``psu.set_current(0.5, output_num=0)``\n\n ``psu.set_ovp(30, output_num=0)``\n\n ``psu.set_ocp(8, output_num=0)``\n\nThe script will always set the maximum possible values in dependency of the nominal power.\n\n| For example:\n| Nominal power = 160 W\n| When you set the voltage to 40 V, it's not possible to set a higher current than 4 A (=160W/40V),\n| regardless of the maximum current output of the device.\n| If you want to set a higher current, you must first reduce the voltage.\n\n| Also this script treats voltage with a higher priority.\n| It will decrease the current, if the maximum power is reached.\n| For example:\n| Nominal power = 160 W, set current = 10 A\n| When you set the voltage to 32 V, it'll results in a maximum current of 5 A.\n\n\nGet parameters\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nReturn argument: float.\n\n ``psu.get_voltage(output_num: int)``\n\n ``psu.get_current(output_num: int)``\n\n ``psu.get_power(output_num: int)``\n\nMaximum sampling rate is ~10 Hz.\n\n\nNominal values:\n\nIf update is true, the value will be pulled directly from the device.\n\n ``psu.get_nominal_voltage(output_num: int, update: bool)``\n\n ``psu.get_nominal_current(output_num: int, update: bool)``\n\n ``psu.get_nominal_power(output_num: int, update: bool)``\n\n\nReset error\n\"\"\"\"\"\"\"\"\"\"\"\"\"\nIf an overcurrent, overvoltage, overpower or overtemperature protection error happens,\nyou can reset the error with:\n\n ``psu.reset_error(output_num: int)``\n\n\nTracking\n\"\"\"\"\"\"\"\"\"\"\"\"\"\n(Only 3-port devices).\nTracking disables the controlling of output 2. Output 1 controls then also output 2.\n\n ``psu.tracking_on()``\n\n ``psu.tracking_off()``\n\n\nGet status\n\"\"\"\"\"\"\"\"\"\"\"\"\"\nReturn argument: dictionary\n\n ``psu.get_status(update: bool)``\n\nList of dictionary containing the following keys (index is output number):\n\n- 'output' (int)\n- 'remote on' (bool)\n- 'output on' (bool)\n- 'controller state' ('CV', 'CC')\n- 'tracking active' (bool)\n- 'OVP activ' (bool)\n- 'OCP activ' (bool)\n- 'OPP activ' (bool)\n- 'OTP activ' (bool)\n- 'act voltage' (float)\n- 'act current' (float)\n\n\nGet device description\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nReturn argument: tuple (name, SN)\n\n ``psu.get_device_description(update : bool)``\n\n\nClose connection\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nTo close the connection, call:\n\n ``psu.close()``\n\nThis will just stop the communication, the PSU outputs will remain in their current states.\n\n\n\n2. SANSSOUCI - So(manet) Se(nsor) Si(mulator)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nA framework to simulate different sensors (Hall, QEI, ...).\nCurrently only velocity is supported for Hall and QEI.\n\nPreperation\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nWhat you need:\n - LabJack\n - SN75174 Differential Line Driver (for RS-422 communication and as level shifter 3.3V -> 5V)\n\nConnection\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nSee also: https://doc.synapticon.com/hardware/drive/drive_1000/d3/docs/index.html#encoder-port-1\n\n+--------------+------------------+\n| Pin SN75174 | Encoder/Labjack |\n+==============+==================+\n| 1 | LJ: FIO0 |\n+--------------+------------------+\n| 2 | A+ |\n+--------------+------------------+\n| 3 | A- |\n+--------------+------------------+\n| 4 | Connect with |\n| | 10kOhm to Vcc |\n| | or NC |\n+--------------+------------------+\n| 5 | B- |\n+--------------+------------------+\n| 6 | B+ |\n+--------------+------------------+\n| 7 | LJ: FIO01 |\n+--------------+------------------+\n| 8 | GND of LJ and |\n| | Encoder |\n+--------------+------------------+\n| 9 | LJ: FIO2 |\n+--------------+------------------+\n| 10 | I+ |\n+--------------+------------------+\n| 11 | I- |\n+--------------+------------------+\n| 12 | Connect with |\n| | 10kOhm to Vcc |\n| | or NC |\n+--------------+------------------+\n| 13 | N.C. |\n+--------------+------------------+\n| 14 | N.C. |\n+--------------+------------------+\n| 15 | N.C. |\n+--------------+------------------+\n| 16 | Vcc (5V) |\n+--------------+------------------+\n\nUsage\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n**Hall**\n\n ``sensor = Sanssouci(printer.write, 'HALL', pole_pairs=7)``\n\n ``sensor.set_velocity(20)``\n\n**QEI**\n\n ``sensor = Sanssouci(printer.write, 'QEI', resolution=100)``\n\n ``sensor.set_velocity(20)``\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A collection of different scripts and drivers (PSU, EtherCAT, Labjack,...)",
"version": "1.1.3",
"project_urls": null,
"split_keywords": [
"power supply unit",
"psu",
"daq",
"labjack",
"elektro-automation",
"ethercat",
"igh",
"synapticon",
"canopen",
"cansoem"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2671ac9961674eaba4a96d59107ad211eead952e830c402a50ab50c10bc40a38",
"md5": "ea43aa8abd8602d5ae160d32bd94b6c9",
"sha256": "06f96e06f431848628b2eb289a571a939c79b44c765bf266551368a531dc03d6"
},
"downloads": -1,
"filename": "somanet_test_suite-1.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ea43aa8abd8602d5ae160d32bd94b6c9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 64128,
"upload_time": "2024-01-31T13:21:32",
"upload_time_iso_8601": "2024-01-31T13:21:32.969137Z",
"url": "https://files.pythonhosted.org/packages/26/71/ac9961674eaba4a96d59107ad211eead952e830c402a50ab50c10bc40a38/somanet_test_suite-1.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "aeefa50c66431be44278cfc0f9be4ad31db242ee5bc46fb48895d94159898797",
"md5": "12be6d12d83275554ffc28fad03f0304",
"sha256": "5071ef20748600d8461084880bc596de71d9db17acd8d848fa724e28e6263699"
},
"downloads": -1,
"filename": "somanet_test_suite-1.1.3.tar.gz",
"has_sig": false,
"md5_digest": "12be6d12d83275554ffc28fad03f0304",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 59192,
"upload_time": "2024-01-31T13:21:34",
"upload_time_iso_8601": "2024-01-31T13:21:34.447105Z",
"url": "https://files.pythonhosted.org/packages/ae/ef/a50c66431be44278cfc0f9be4ad31db242ee5bc46fb48895d94159898797/somanet_test_suite-1.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-31 13:21:34",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "somanet-test-suite"
}