Comments (6)
the commented out code was other things I tried based on other examples. however I'm 99.9% sure that most of the other motor controller code won't cross over to this PCON.
from pysoem.
Hi @kfechter,
to go into SafeOP state you should only use the config_map()
function. If your PDO mapping is fixed this is good, less options to do something wrong.
You might want to use the code from the minimal_example.py to go into OP state.
self._master.state = pysoem.OP_STATE
self._master.write_state()
self._master.state_check(pysoem.OP_STATE, 50000)
if self._master.state != pysoem.OP_STATE:
self._master.read_state()
for slave in self._master.slaves:
if not slave.state == pysoem.OP_STATE:
print('{} did not reach OP state'.format(slave.name))
print('al status code {} ({})'.format(hex(slave.al_status),
pysoem.al_status_code_to_string(slave.al_status)))
raise Exception('not all slaves reached OP state')
The "al status code" might give you a hint on what went wrong.
Same state_check()
on SAFEOP_STATE
you should actually also do after the config_map()
function call.
from pysoem.
Thank you for the reply! I will try the minimal example the next time I have access to the equipment. I know using the examples from the base SOEM, it at least seems to get to OP State so I'm most likely doing something wrong. I'm also learning ethercat at the same time so its a bit of a process.
from pysoem.
definitely getting further, so that's nice. With the example, I get to safe_op properly, however during the transition to op state, the alarm status code is 0x1b (Sync Manager Watchdog). through my research it seems to have to do with dc_sync, just gotta figure out where the values come from.
from pysoem.
making some more progress. If i do a master.send_processdata() and a master.recieve_processdata(timeout=2000) before calling op state, everything seems to get to op.
from pysoem.
ill close this one, since my new problem isnt related to getting to OP
from pysoem.
Related Issues (20)
- [HELP] Is there a redundancy function? HOT 3
- Issue waiting until slaves are connected HOT 1
- pysoem ImportError: DLL load failed HOT 1
- Help needed with reading SDO & Uploading SDO map HOT 3
- Failed to write pdo? HOT 3
- Creating a link between master and slave HOT 2
- Ethercat Ring Topology HOT 1
- How to install soem to raspberry pi 4 ? HOT 1
- 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 3
- Script crashes when Python debugger inspects `CdefSlave` HOT 3
- OD version bug HOT 1
- maybe a BUGm needs deeg in HOT 1
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.