Code Monkey home page Code Monkey logo

pyecm's Introduction

pyecm

An EtherCAT MainDevice in Python, fully free and open source.

Priority Goal Status
1 Fully functional and complete python bindings for the Simple Open EtherCAT Master SOEM (originally written in C) using nanobind work in progress
2 Configuration of the MainDevice and SubDevices via an EtherCAT Network Information (ENI) file. not started
3 Software-in-the-loop (SiL) network simulation capability. not started
4 Async API. not started

Warnings

This library is extremely early in development.

We will follow semantic versioning. Expect drastic changes to the API prior to v1.0.0.

Installation

Windows / Mac OSX compatibility is intended for developer convenience only. The intended targets are linux with PREEMPT_RT patches. Typically, the easiest to work with is Debian since pre-compiled patches are available from the repositories.

pip install pyecm

Windows

Windows requires installation of an additional dependency npcap. https://npcap.com/

Please install it in winpcap compatibility mode (I believe this is the default configuration.)

Usage

On a typical windows system:

C:\repos\pyecm>python examples/soem/simple_test.py --ifname "\Device\NPF_{6F17F41B-E756-4470-B7B8-74A3504B4F7B}"

will output something like:

C:\repos\pyecm>python examples/soem/simple_test.py --ifname "\Device\NPF_{6F17F41B-E756-4470-B7B8-74A3504B4F7B}"
simple_test.py args=Namespace(ifname='\\Device\\NPF_{6F17F41B-E756-4470-B7B8-74A3504B4F7B}', if2name=None)
ecx_init succeeded.
found 5 subdevices:
network summary:
position|configadr|aliasadr|name ---|manufacturer|product|revision
       0|main device
       1|0x1001   |0x0     |EK1100                  |0x2       |0x44c2c52 |0x100000  
       2|0x1002   |0x0     |EL3314                  |0x2       |0xcf23052 |0x120000  
       3|0x1003   |0x0     |EL2088                  |0x2       |0x8283052 |0x110000  
       4|0x1004   |0x0     |EL3681                  |0x2       |0xe613052 |0x120000  
       5|0x1005   |0x0     |EL3204                  |0x2       |0xc843052 |0x110000  
reached state: 2
successfully configured iomap. iomap size: 66
distrubuted clocks configured
reached state: 4
reached state: OPERATIONAL
started main operation
iomap:  [0 0 0 ... 0 0 0]

Development

  1. clone repo (and submodules)

    use git clone <repo clone url> --recursive

  2. install vscode

  3. install docker desktop

  4. install vscode dev containers extension

  5. open vscode in repo

  6. click reopen in container

  7. open new terminal

  8. run pip install . && pytest

pyecm's People

Contributors

kj4tmp avatar

Stargazers

Burak Orpak avatar Michael avatar Chris avatar Matthias Seehauser avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.