Comments (3)
I've pretty much figured this out now, mostly through lot's of trial-and-error.
So in a nutshell: the PDO input and output is packed in a way I can't deduce from the EL7041 documentation, but I can copy the information from the TwinCAT project.
When clicking on an entry, e.g. "Sync Error", there is the "address" field. For this entry the address "40.7". The .7
indicates bit number 7 is being used (the last bit, because counting starts at 0). The 40
indicates the byte number, although it starts at an offset. The lowest address value is 39, so I'm considering address 39 as byte 0
, 40 as byte 1
, etc. So we can follow this to determine the entire PDO entry.
ctypes.Structure
bit fields are well suited to this. See https://docs.python.org/3/library/ctypes.html#bit-fields-in-structures-and-unions
A complete example can be found in my comment here: #135 (comment)
from pysoem.
Nice job, this is great example.
Can we close this issue?
from pysoem.
Yeah, we can close this. I'm assuming there is not a less tedious and manual approach to this that I don't know.
from pysoem.
Related Issues (20)
- Ethercat Ring Topology HOT 1
- How to install soem to raspberry pi 4 ? HOT 1
- IAI Motor Controller (PCON-CB) - Not Getting to OP State Correctly HOT 6
- config_init append slaves to CdefMaster slaves attribute, but never clean it HOT 1
- IO-Link Ethercat module (EL6224) HOT 2
- Returning PDO frame late (Windows) HOT 2
- Handle Safety HOT 2
- ConnectionError: could not open interface on Ubuntu HOT 3
- Motion control HOT 1
- read and write PDOS question HOT 2
- Add meaning of 'network adapter ID' to documentation HOT 2
- Script crashes when Python debugger inspects `CdefSlave`
- OD version bug HOT 1
- maybe a BUGm needs deeg in HOT 1
- Open function returns always None HOT 2
- slave.write_eeprom() bug? HOT 2
- Transfer `pysoem` into the `OpenEtherCATsociety` Github group HOT 2
- Code completion / Intellisense not working for HOT 2
- Setuptool version clash
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysoem.