[etherlab-users] Error flag after requesting SAFEOP

Mohsen Alizadeh Noghani m.alizad3h at gmail.com
Wed Sep 26 12:32:29 CEST 2018


Hello everyone.

When I request SAFEOP state for my slave (Mecapion L7N) using shell command

$ ethercat state --position 0 SAFEOP

the slave's flag changes from + to E, and the state stays at PREOP.

*Additional Info:*
In a previous project, I used SOEM library and had to deal with the same
issue, which was fixed by manually enabling sync managers 2 & 3.

ec_slave[1].SM[2].SMflags |= 0x00010000;
ec_slave[2].SM[3].SMflags |= 0x00010000;

I tried to do the same by the adding following lines in my a simple code

ret1 = erct_slave_config_sync_manager(sc, 2, EC_DIR_INPUT, EC_WD_ENABLE)
ret2 =  erct_slave_config_sync_manager(sc, 3, EC_DIR_OUTPUT, EC_WD_ENABLE)

Both function calls are successful (ret1=ret2=0) but the slave won't reach
SAFEOP.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20180926/a01fc851/attachment-0002.htm>


More information about the Etherlab-users mailing list