Comments (9)
I can't really tell. For now I can't even think on how to do this nateivly with the SOEM API itself. Maybe you could find something about this in the SOEM issue list.
from pysoem.
Thank you for your reply.
To solve the problem fundamentally, I would like to add a process in my program that performs a PDO update cycle.
I referred to this issue: OpenEtherCATsociety/SOEM/issues/405.
According to this discussion, SOEM is designed to be thread-safe except for PDO.
Therefore, I think this issue can be resolved by adding a process for the PDO update cycle.
Locking other functions will prevent the PDO update cycle from being interrupted.
However, I find it difficult to implement the PDO update cycle process myself.
This is because pysoem.Master is not picklable and cannot be shared by functions in python's multiprocessing module.
Therefore, I think the process of PDO update cycle should be implemented inside pysoem.
If that is not possible, simply making the timeout arguments for sdo_read and sdo_write adjustable may alleviate this problem.
It is currently given an immutable value, EC_TIMEOUTRXM = 700,000 us = 700 ms, which is too long to run at the same time as the PDO update cycle.
from pysoem.
Putting PDO update cycle in a process inside pysoem, sounds good to me. But to figure out how to implement this, I need to take a closer look at things. You still need a way to update the PDO data, synchronized with the PDO process.
Making the SDO timeouts adjustable is much more a short term issue, and is already on my todo list. Here I think of a Master.sdo_timeout
property that is applied to the SOEM SDO read and write. But maybe this only possible on a per device basis.
from pysoem.
Hi @tanakarei256 ,
I have same problem right now.
I read your comments and this issue OpenEtherCATsociety/SOEM/issues/405
And mostly understand problem but ı dont know how to do it really. Can i solve problem with pysoem ? And can you explain me little bit more ?
Thank you.
from pysoem.
I'm not familiar with SOEM or EtherCAT, so I don't know how to implement it.
For my purposes, I think it's enough to have a function that waits for the next PDO update for synchronization.
However, more features may be needed for other uses.
from pysoem.
Hi @tanakarei256,
at least the SDO timeouts are now configurable. Check out pysoem.Master.sdo_read_timeout and pysoem.Master.sdo_write_timeout. This will be availabel in the latest version of pysoem (1.0.2) installed via pip from PyPI.
from pysoem.
Thanks for the improvement.
I think that shortening the timeout for SDO communication has reduced the problem.
from pysoem.
Can I control motor drive ?
Can I move motor ?
please give me a sample code
from pysoem.
Hi @jinkumak,
with pysoem you should be able to control any EtherCAT actor device, or retrive data from any EtherCAT sensor device.
You could have a look at issue #30 as a starting point, there is an example for a CiA 402 device profile based motor drive.
Please open a new issue for any further discussion.
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.