Registering 0x6000:11 doesn’t work because the actual value is at 0x6000:0x11. (Note hex vs. decimal.)
Registering 0x6000:2 doesn’t work because the value is not at bit 0, so you have to pass a non-NULL pointer as the final parameter to receive the bit offset of the value, which you must then pass into EC_READ_BIT or similar bit-aware code. From: etherlab-users [mailto:etherlab-users-boun...@etherlab.org] On Behalf Of William Rifenburgh Sent: Friday, 11 September 2015 18:30 To: etherlab-users@etherlab.org Subject: [etherlab-users] Failed to register PDO entry: No such file or directory 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
_______________________________________________ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users