Welcome to PySOEM’s documentation!

PySOEM enables basic system testing of EtherCAT slave devices with Python.

PySOEM is a wrapper around the Simple Open EtherCAT Master (SOEM). Unlike plain C Library wrappers, PySOEM tries to provide an API that can already be used in a more pythonic way.

One of the simplest examples to get a EtherCAT network up looks like this.

import pysoem

master = pysoem.Master()

master.open('Your network adapters ID')

if master.config_init() > 0:
    for device in master.slaves:
        print(f'Found Device {device.name}')
else:
    print('no device found')

master.close()

With this script the name of every device in the network will be printed.

Getting Started

API Documentation