Hi
I am working on a device with ethercat communication. It is a custom made board.
I have the XML file to map the correct inputs and outputs. I used the SOEM beckhoff
drivers as an examples to write a driver for this device.
When i deploy the driver in orocos using the test.ops script, the slave is detected,
configured and put in pre-op state without problems.
However when I start the master there are 3 possible outcomes:
1) the slave does not reach operational state
Master [S]> start
10.315 [ Info ][Logger] Request safe-operational state for all slaves, state is now:4
10.316 [ Info ][Logger] Safe operational state reached for all slaves, state=4
10.316 [ Info ][Logger] Request operational state for all slaves
10.316 [ Info ][Logger] Test1: 1 Test2: 0
10.316 [ Info ][Logger] STATE 4
12.298 [ ERROR ][Logger] Not all slaves reached operational state. State = 4
12.298 [ ERROR ][Logger] Slave 1 State= 4 StatusCode=0 : Unknown
= false
2) the slave gets in state 14 and displays "Sync manager watchdog"
Master [S]> start
26.315 [ Info ][Logger] Request safe-operational state for all slaves, state is now:14
26.315 [ ERROR ][Logger] Not all slaves reached safe operational state.
26.315 [ ERROR ][Logger] Slave 0 State= 14 StatusCode=27 : Sync manager watchdog
26.316 [ ERROR ][Logger] Slave 1 State= 14 StatusCode=27 : Sync manager watchdog
26.316 [ Info ][Logger] Request operational state for all slaves
26.316 [ Info ][Logger] Test1: 1 Test2: 0
26.316 [ Info ][Logger] STATE 14
28.297 [ ERROR ][Logger] Not all slaves reached operational state. State = 14
28.297 [ ERROR ][Logger] Slave 1 State= 14 StatusCode=27 : Sync manager watchdog
= false
3) the slave reaches operational state but does not receive data (warnings)
Master [S]> start
38.316 [ Info ][Logger] Request safe-operational state for all slaves, state is now:4
38.316 [ Info ][Logger] Safe operational state reached for all slaves, state=4
38.316 [ Info ][Logger] Request operational state for all slaves
38.316 [ Info ][Logger] Test1: 1 Test2: 0
38.316 [ Info ][Logger] STATE 4
38.318 [ Info ][Logger] Operational state reached for all slaves. State = 4
= true
Master [R]> 38.323 [ Warning][Master] receiving data failed
My guess is the slave never gets in operational state (= state 8). When i look at the data with
Wireshark in operational state the data length is 30 bytes (as it should be) but the data is static
and doesn't change (data includes encoders on links, which i move). So the slave doesn't
write data and also doesn't seem to receive data.
The function "ec_receive_processdata" always returns 0.
I am new in the field of ethercat (and orocos as well) . Did i overlook something? Any hints
were to start looking to solve the problem of receiving data?
kind regards
Jonas