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@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to