Comments (7)
- To write SDO i found this example
slave.sdo_write(0x8001, 2, struct.pack('B', 1))
onbasic_example.py
file, but I don't know how you got there, and the reason of params.
from pysoem.
For now, apart from the examples, there is no more documentation. The interactive help is also not to much of a help.
But thanks four your list, I think this lists the things a user may want to know.
I`ll take this into account when creating documentation.
from pysoem.
In the example of sdo_wirte: slave.sdo_write(0x8001, 2, struct.pack('B', 1))
. The first parameter is the index(0x8001), the second parameter is the subindex(2) and then third parameter is the data to be written to the object. The data parameter is always a bytes
object.
from pysoem.
Hi @bnjmnp thanks for your answer... can i help build that doc ? i sent messages on Gitter chat, i understood now how to write in SDO.
This library is a Cython wrapper from EtherCAT Master Library
, and that library we have a function to list PDO Mapping.
In folder examples
i guess that read_sdo_info.py
will show SDO Mapping right ?
There is some function to list all PDO Mapping ? If yes... can you send me here an example ?
from pysoem.
Your screenshoot is the terminal output of the slaveinfo example from the SOEM tests. When you take a closer look to the source code (slaveinfo.c) you will see (within function si_map_sdo
) that there is not directly a SOEM library function that prints the PDO mappings. They use a bunch of ec_SDOread
s.
You could do something similar with PySOEMs sdo_read
. Unfortunately the read_sdo_info.py
is not printing the PDO mappings.
from pysoem.
@bnjmnp thanks for your answer, i really appreciate.
I'm studying the sdo_read
function here, but i still got some difficult about it. Can you provide some example about to get PDO map using this function ?
from pysoem.
First you need to known the EtherCAT PDO mapping concept. Unfortunately that is not very easy to explain, and I cannot do it in every detail.
You already know thees CoE objects, you are trying to read with sdo_read
, I guess. Each object can be addressed by it's index (0 to 0xFFFF) and subindex (0 to 255). These objects are used for settings of a device. For example if you have a temperatur sensor device you could have a unit object witch is used to switch the unit of the output from degree Celsius to Fahrenheit scale.
Within these objects there are a bunch of standard objects, which have special meanings. For example the object with the index 0x1018, that gives a master the identity info of a device. Here is a nice example of the available standard objects of a Beckoff EP4174.
The PDO mapping can also be read out of the standard objects. Most important are the objects 0x1C12 for output PDO and 0x1C13 for input PDO. And then all objects in the range of 0x1600 to 0x 17FF and 0x1A00 to 0x1B00 are from interest.
Try to read out the content of both objects 0x1C12 and 0x1c13 with sdo_read
. Or in an earlier step try to read out some of the standard objects in the range of 0x1000 to 0x1018 to get familiar with sdo_read
.
Take also a look at my comment in issue #18 where I explain what sdo_read
returns.
from pysoem.
Related Issues (20)
- 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 3
- Script crashes when Python debugger inspects `CdefSlave` HOT 3
- OD version bug HOT 1
- maybe a BUGm needs deeg in HOT 1
- How to pack / unpack single `BIT`s in PDO `input` / `output` HOT 3
- 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 HOT 3
- Setuptool version clash HOT 1
- no SDO info for slave device
- no SDO info for slave device
- ReadTheDocs documentation is not updating
- Servo State Change
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.