Comments (4)
Hi lemmi25,
I think your example slave implementation uses fixed PDO mapping so you don't need to do anything in the setup function of your device. Thus you don't even need one.
If you only have the XMC board at you master system something like the following should work:
import pysoem
master = pysoem.Master()
master.open('<put in you network id here!>')
master.config_init()
assert len(master.slaves) == 1
assert master.slaves[0].name == 'XMC_ESC'
master.config_map()
assert master.state_check(pysoem.SAFEOP_STATE, 50000) == pysoem.SAFEOP_STATE
for _ in range(1000):
print(master.slaves[0].input)
master.state = pysoem.INIT_STATE
master.write_state()
master.close()
(Please don't use thees asserts in production code, it's just for the purpose of this demonstration)
You should see some bit changes in the printed input values if you push the button on the XMC board, like described in the Infineon PDF on page 56.
If you got there you may easily figure out how to wire outputs to turn on end off the LED on the board. Therefore take a look at the minimal_example.py or basic_example.py, as my example above dose not show how to bring the slave into operational (OP) state.
from pysoem.
Hi,
many thanks for the detailed answer. I still have one problem if I use your example I see nothing as blank lines. Even if I push a button.
If I use the minimal_example.py
I can not get the Slave into operation mode (can send code later, maybe your first answer will resolve my problem).
Many thanks again.
from pysoem.
Did you find out anything new?
Maybe (I was wrong and) the XMC example uses selectable PDO mapping instead of fixed PDO mapping. If so you need to write to object 0x1C12 and 0x1C13 before calling config_map()
.
How are objects 0x1C12 and 0x1C13 define?
from pysoem.
Closed due to inactivity of the original author on this topic.
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.