[etherlab-users] ecrt_slave_config_reg_pdo_entry() returns "No such file or directory"

Gavin Lambert gavin.lambert at tomra.com
Tue Sep 10 01:55:42 CEST 2019

You will receive that error if you specify a PDO index/subindex that does not exist in the slave, according to the configuration that Etherlab is aware of at the time.

This either requires a slave to already be present in the network and scanned with that PDO already included in its default PDO set, or it requires you to have previously called ecrt_slave_config_pdos() with the slave's current/desired SM layout.

It's recommended to do the latter, as it also works when the slaves are not yet online -- and it gives you the ability to select PDOs which are not in the slave's default set.  Although of course some slaves have restrictions on which PDOs you can select together, and others do not let you change the default PDO set -- but you can still explicitly specify it via ecrt_slave_config_pdos() so that you can create a configuration without needing the slaves to be online.

See the example apps.  Also see the code generated by "ethercat cstruct".

Gavin Lambert
Senior Software Developer


COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New Zealand
Switchboard: +49 2630 96520 | https://www.tomra.com

The information contained in this communication and any attachment is confidential and may be legally privileged. It should only be read by the person(s) to whom it is addressed. If you have received this communication in error, please notify the sender and delete the communication.
-----Original Message-----
From: Gary Grobe
Sent: Tuesday, 10 September 2019 11:24
To: etherlab-users at etherlab.org
Subject: [etherlab-users] ecrt_slave_config_reg_pdo_entry() returns "No such file or directory"

I'm working a new userspace app with etherlab and have managed to discover slaves and configure PDO's and am now at the point of doing mass registrations of PDO's.

In domain.c is the ecrt_domain_reg_pdo_entry_list() function which iterates through an array of ec_pdo_entry_reg_t's. As it iterates through the array, the call stack is roughly ...


The first of seven ec_pdo_entry_reg_t objects in the array was successful. However, on the second iteration of the input array, the result (errno) from the call to ioctl() in
ecrt_slave_config_reg_pdo_entry() of slave_config.c is failing with "No such file or directory".

I've triple checked the inputs which appear to be correct, but recall reading somewhere's that there may be checks to the capabilities of
ioctl() calls handling a device which I'm not clear on. I was hoping someone might be able to comment or explain if this is the case or have other ideas as to what might be going on?

The exact message is:
     "Failed to register PDO entry: No such file or directory"

_The contents of this email message and any attachments are intended solely for the addressee(s).  This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. The information is intended to be for the use of the individual or entity designated above. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments.  _Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited. __ _______________________________________________
etherlab-users mailing list
etherlab-users at etherlab.org

More information about the Etherlab-users mailing list