Skip to main content

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)

Metadata

Release files for somanet-test-suite 1.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for somanet-test-suite 1.1.5
File Size Uploaded Provenance Actions
somanet_test_suite-1.1.5.tar.gz 59.2 kB Without provenance Details for somanet_test_suite-1.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for somanet-test-suite 1.1.5
File Interpreter ABI Platform Actions
somanet_test_suite-1.1.5-py3-none-any.whl Python 3 none any Details for somanet_test_suite-1.1.5-py3-none-any.whl

Total release size: 123.4 kB

Release files / somanet_test_suite-1.1.5.tar.gz

Download URL somanet_test_suite-1.1.5.tar.gz
Size 59.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5c37eeef0e947071bad63e984d13dbaad54feb5897c33666345087dc15f6b8a2
BLAKE2b-256 checksum
How to use checksums
1b15194d7352d95e9ba13e2a142c2bafb4ba25817be5ce127eac84aa7fbe1860
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release files / somanet_test_suite-1.1.5-py3-none-any.whl

Download URL somanet_test_suite-1.1.5-py3-none-any.whl
Size 64.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8d721f8d3addb8227f80c98822edd328104cbfca1eeabcb5ab40503e219ba52
BLAKE2b-256 checksum
How to use checksums
f33a4002dffc7e2a77274e061e28518fcf3de246f9d7d929811c13d0d5054729
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Security for somanet-test-suite 1.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page