[etherlab-users] Failed to register PDO entry: No such file or directory

William Rifenburgh wmrifenburgh at gmail.com
Fri Sep 11 08:29:52 CEST 2015


Hello Etherlab experts,

I can't register a PDO entry at index 6000:11 that the 'ethercat cstruct'
command tells me should be possible for a Beckhoff EL3356-0010:

/* Master 0, Slave 2, "EL3356-0010"
 * Vendor ID:       0x00000002
 * Product code:    0x0d1c3052
 * Revision number: 0x0013000a
 */

static ec_pdo_entry_info_t EL3356_pdo_entries[] = {
    {0x7000, 0x01, 1}, /* Start calibration */
    {0x7000, 0x02, 1}, /* Disable calibration */
    {0x7000, 0x03, 1}, /* Input freeze */
    {0x7000, 0x04, 1}, /* Sample mode */
    {0x7000, 0x05, 1}, /* Tare */
    {0x0000, 0x00, 11}, /* Gap */
    {0x0000, 0x00, 1}, /* Gap */
    {0x6000, 0x02, 1}, /* Overrange */
    {0x0000, 0x00, 1}, /* Gap */
    {0x6000, 0x04, 1}, /* Data invalid */
    {0x0000, 0x00, 2}, /* Gap */
    {0x6000, 0x07, 1}, /* Error */
    {0x6000, 0x08, 1}, /* Calibration in progress */
    {0x6000, 0x09, 1}, /* Steady state */
    {0x0000, 0x00, 4}, /* Gap */
    {0x1c32, 0x20, 1}, /* Sync error */
    {0x0000, 0x00, 1}, /* Gap */
    {0x1800, 0x09, 1},
    {0x6000, 0x11, 32}, /* Value */
};

static ec_pdo_info_t EL3356_pdos[] = {
    {0x1600, 6, EL3356_pdo_entries + 0}, /* RMB RxPDO-Map Control */
    {0x1a00, 12, EL3356_pdo_entries + 6}, /* RMB TxPDO-Map Status */
    {0x1a01, 1, EL3356_pdo_entries + 18}, /* RMB TxPDO-Map Value (INT32) */
};

static ec_sync_info_t EL3356_syncs[] = {
    {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
    {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
    {2, EC_DIR_OUTPUT, 1, EL3356_pdos + 0, EC_WD_DISABLE},
    {3, EC_DIR_INPUT, 2, EL3356_pdos + 1, EC_WD_DISABLE},
    {0xff}
};

I use the following code to try to register it:

 if (!(el3356_ana_in_sc = ecrt_master_slave_config(master, EL3356Pos,
Beckhoff_EL3356))) {
        fprintf(stderr, "Failed to get slave configuration.\n");
        return -1;
    }

    printf("Attempting to register the pain-in-the-ass PDO entry\n");
    off_el3356_value = ecrt_slave_config_reg_pdo_entry(el3356_ana_in_sc,
            0x6000, 11, domain1, NULL);
    if (off_el3356_value < 0)
    fprintf(stderr, "Failed to register PDO entry 0x6000 0x11.");
        return -1;

and I get:

Failed to register PDO entry: No such file or directory

When I try 0x6000:02 I get:

PDO entry 0x6000:02 does not byte-align in config 0:2.


I have triple checked to make sure all fields in my code snippet are
correct. How is it still failing to register? Could my SII be corrupted?

I have attached full code to this email.
I have also attached the SII.bin and xml output from using etherlab
sii_read and xml commands

Thanks for the help!
-Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20150911/ba6d3d01/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: text/x-csrc
Size: 10932 bytes
Desc: not available
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20150911/ba6d3d01/attachment-0003.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SII.bin
Type: application/octet-stream
Size: 1310 bytes
Desc: not available
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20150911/ba6d3d01/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: el3356.xml
Type: text/xml
Size: 4519 bytes
Desc: not available
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20150911/ba6d3d01/attachment-0003.xml>


More information about the Etherlab-users mailing list