[Etherlab-users] IL EC BK ethercat modules configuration seems to prevent going to SAFEOP
Jonas Vantilt
jonas.vantilt at frsrobotics.com
Thu Mar 23 09:49:46 CET 2023
Hi Wilhelm,
It seems I indeed incorrectly understood the commandline tool as I tried to put
the slave into Operational. I tried to use the commandline tool to find out what
steps were missing in order to get the slave to operational. I am using the ethercat
library inside orocos, here is the gitlab repository:
https://gitlab.kuleuven.be/rob/rob-hardware/igh-ethercat-orocos
The ethercat cstruct generated using the commandline tool did not allow me to
operate the slave:
/* Master 0, Slave 0, "IL EC BK"
* Vendor ID: 0x00000084
* Product code: 0x00293cab
* Revision number: 0x00000001
*/
ec_sync_info_t slave_0_syncs[] = {
{0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
{1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
{2, EC_DIR_OUTPUT, 0, NULL, EC_WD_ENABLE},
{3, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
{0xff}
};
However, I have found the issue and I was able to resolve it. I needed to assign the
PDOs as this slave has configurable PDOs, see beckhoff website:
https://infosys.beckhoff.com/english.php?content=../content/1033/el6695/1317558667.html&id=
As I mentioned, the slave detected the correct modules connected to it:
SDO 0x1600, "Module 01 RxPDO-Mapping". The missing step is that you need to
assign the RxPDO's to the output (in the commandline):
ethercat download 0x1c12 0x00 0x01
ethercat download 0x1c12 0x01 0x1600
This module has no TxPDOs so there is nothing to assign for the TxPDOs. Note that
the bus coupler itself has some TxPDOs 0x1aff which are added automatically. After
rescanning the master, I got:
/* Master 0, Slave 0, "IL EC BK"
* Vendor ID: 0x00000084
* Product code: 0x00293cab
* Revision number: 0x00000001
*/
ec_pdo_entry_info_t slave_0_pdo_entries[] = {
{0x7000, 0x01, 4}, /* SubIndex 001 */
{0x10f3, 0x03, 1}, /* Newest Acknowledged Message */
{0x18ff, 0x09, 2}, /* InputUpdateCounter */
{0x0000, 0x00, 5}, /* Res. */
{0x0000, 0x00, 8}, /* Res. */
{0xf100, 0x01, 16}, /* State */
{0xf100, 0x02, 16}, /* Parameter */
{0xf100, 0x03, 16}, /* Ext. Parameter */
};
ec_pdo_info_t slave_0_pdos[] = {
{0x1600, 1, slave_0_pdo_entries + 0}, /* Module 01 RxPDO-Mapping */
{0x1aff, 7, slave_0_pdo_entries + 1}, /* Bus coupler TxPDO-Mapping */
};
ec_sync_info_t slave_0_syncs[] = {
{0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
{1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
{2, EC_DIR_OUTPUT, 1, slave_0_pdos + 0, EC_WD_ENABLE},
{3, EC_DIR_INPUT, 1, slave_0_pdos + 1, EC_WD_DISABLE},
{0xff}
};
Including this cstruct in the orocos component (see gitlab repo) and altering the code
in accordance to the pdos in the cstruct, allows me to properly use the slave with the
etherlab library!
The "assign pdo step" might be straightforward for experienced users, but I hope
sharing this on the mailing list might help others in the future.
with kind regards,
Jonas
More information about the Etherlab-users
mailing list