[etherlab-users] SDO dictionary upload "Input/output error"

Gavin Lambert gavin.lambert at tomra.com
Wed Feb 26 00:39:16 CET 2020


You should also mention which version of the unofficial patchset you're using -- and you must be using it, since this function doesn't exist in the mainline release.

Setting "ethercat debug 1" prior to running "ethercat sdos" and then observing the syslog output might shed some more light on it.  If that's not enough, then observing the EtherCAT traffic with Wireshark or another method may also provide more insight.

Doing this from your master application is very strongly non-recommended, though -- the whole point of making the SDO dictionary upload not occur automatically any more in the patchset is that in almost no case (other than initial interactive commissioning, when you're deciding which PDOs you should code into your master application) should you actually need the dictionary data.  And as you've noted yourself, it's very slow.


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, 25 February 2020 11:47
To: etherlab-users at etherlab.org
Subject: [etherlab-users] SDO dictionary upload "Input/output error"

I'm trying to upload the SDO dictionary in order to compare user configurations against the dictionary before activating the master. 
Using Etherlab 1.5.2 with 4.19.90-rt35.

An SDO upload usually takes 10-15 seconds (Elmo's have large
dictionaries) and only after that time does the error get issued. 
Running the command again would quickly succeed and then continue on to the next slave. I get the feeling the second time around it would find that it already uploaded (cached in the master?) and then move on to the next slave. But lately it's gotten worse. I can issue commands via the ethercat tool just fine, with exception to "sdos." My app and the ethercat tool give the same results.

"Failed to upload dictionary: Input/output error"

In the past when working with /dev handles, an error such as this would cause me to look at hardware, but I'm just not seeing anything wrong w/ my connections.

I'm aware of the different ways of doing SDO transfers (e.g.,
ecrt_master_sdo_upload() for a single SDO, and others to configure or get after having activated the master). But what I'm doing is very similar to how the ethercat tool does it's uploads, via the ioctl interface and the results are the same.

     device_name = "/dev/EtherCAT";
     // ...

     if ((fd = ::open(device_name.c_str(), flags)) == -1) { /* ... */ }

     // mod info ... ioctl interface vers. ...

     // get master
     if (ioctl(fd, EC_IOCTL_MASTER, data.get()) < 0) { /* ... */ }

     // discovery happening here ...

     // upload SDO dictionary
     if (si->coe_details.enable_sdo_info) {
         // ...

         if (upload_sdo_dictionary(dict_upload) < 0)
             return nullptr;
     }

int EthercatDiscovery::upload_sdo_dictionary(
     std::shared_ptr<ec_ioctl_slave_dict_upload_t> data) {
     if (ioctl(fd, EC_IOCTL_SLAVE_DICT_UPLOAD, data.get()) < 0) {
         std::cerr << "Error: failed to upload dictionary: " <<
             strerror(errno) << std::endl;

         // The errno here will result in "Input/output error"

         return -1;
     }

     return 0;
}

So it would appear that the master is aborting the SDO upload. Can anyone offer advice as to what might be happening here?






-- 
_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
https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-users&data=02%7C01%7Cgavin.lambert%40tomra.com%7Cf6eb9a0831a04acd097b08d7b97b85b8%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637181812484365122&sdata=f%2B%2Bi%2B8tCLJiYFsyv%2B5g92xgRwMUxpv0QYPzoWSFChi4%3D&reserved=0


More information about the Etherlab-users mailing list