Strangely, this index and subindex does exist in a slave that is online
and I have previously called ecrt_slave_config_pdos() according to the
slaves current SM layout. I've compared my code to that generated by
"ethercat cstruct" and it is the same.
On 9/9/19 6:55 PM, Gavin Lambert wrote:
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@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 ...
ecrt_domain_reg_pdo_entry_list()
ecrt_master_slave_config()
ec_master_add_slave_config()
ecrt_slave_config_reg_pdo_entry()
ioctl()
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@etherlab.org
https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-users&data=02%7C01%7Cgavin.lambert%40tomra.com%7C223e112ada8d4970aeb408d7357cd7d9%7C4308d118edd143008a37cfeba8ad5898%7C0%7C1%7C637036682624195995&sdata=3E5W5i5ZTQXthvKg%2Fi9iWylTvHsK3rzUOFy%2FE2bQLuA%3D&reserved=0
--
_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@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users