Mohsen Alizadeh Noghani
2018-09-26 10:32:29 UTC
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.
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.