[Etherlab-dev] State Machine Error - Bug?
Hafner, Itzhak
itzhak.hafner at servotronix.com
Wed Aug 23 13:15:42 CEST 2023
Hello,
I'm encountering something that may seem like a bug.
I have a slave device (I/O) that is in some kind of an error mode.
The device itself might not be working well - this should be very clear.
However, when I open a terminal and try to reg_read from the device, the etherlab master seems to be stuck in a wait loop.
While checking also with Wireshark, it is clear that the master is not even sending the reg_read request.
After investigating I have learned this:
The etherlab code does in fact detected some error and print:
" EtherCAT ERROR 0-main-1: Failed to set state INIT: "
And the slave device is in fact in some error mode.
However when you use the "reg_read" function. The appropriate ioctl function is activated.
And gets stuck in the wait function.
I believe the following is happening:
1. During boot up the master recognizes the slave.
2. Trying to place the slave in PREOP mode.
3. Failes due to what I guess is bad communication - since the error message seems to come from a working counter that isn't progeressing.
4. Places the slave state machine into the function "ec_fsm_change_state_error"
5. Every time the master is activating the state machine per slave - this slave is in an empty error function doing nothing.
6. Ioctl function still works from terminal and gets stuck in a loop for the slave to change state - which won't happen.
I would like obviously to not get stuck and have it timed out - any thoughts?
Thanks in advance
Best Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-dev/attachments/20230823/debbc68b/attachment.htm>
More information about the Etherlab-dev
mailing list