Thanks, Rod, but that 'software enable' signal is not a hal pin that I can just connect. It's a virtual signal referenced in the enable logic Kollmorgen displays in its workbench app.
That said, my guess is that enabling my AKD drive will be 'easy' once communication is established. Getting pos_fb to change when I turn the motor rotor would be a start.
I'm pretty sure I've got a better chance of getting help if I stick to the generic driver, rather than rolling my own, so I started from scratch again and, in the xml below, the group of sdoconfig's at the top exactly match the sequence shown in Twincat's driver startup tab, and the pdos in the syncManager section match that sequence. This corresponds to the 'premapping over .xml' method suggested by Foxington on 9/12 in this thread.
Code:
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1000">
<!-- trying to get AKD working-->
<slave idx="0" type="generic" vid="0x6a" pid="0x00414B44" configPdos="true" name="hip"> <!-- vid 0x6a=106=akd 1546=pronet -->
<sdoConfig idx="1C12" subIdx="00"><sdoDataRaw data="00"/></sdoConfig> <!-- clear SM pdos 1C12 -->
<sdoConfig idx="1C13" subIdx="00"><sdoDataRaw data="00"/></sdoConfig> <!-- clear SM pdos 1C13 -->
<sdoConfig idx="1A00" subIdx="00"><sdoDataRaw data="00"/></sdoConfig> <!-- clear PDO 1A00 entries -->
<sdoConfig idx="1A00" subIdx="01"><sdoDataRaw data="10 00 41 60"/></sdoConfig> <!-- PDO entry -->
<sdoConfig idx="1A00" subIdx="00"><sdoDataRaw data="01"/></sdoConfig> <!-- set PDO 1A00 entries -->
<sdoConfig idx="1A01" subIdx="00"><sdoDataRaw data="00"/></sdoConfig> <!-- clear PDO 1A01 entries -->
<sdoConfig idx="1A02" subIdx="00"><sdoDataRaw data="00"/></sdoConfig> <!-- clear PDO 1A02 entries -->
<sdoConfig idx="1A02" subIdx="01"><sdoDataRaw data="10 00 41 60"/></sdoConfig> <!-- PDO entry -->
<sdoConfig idx="1A02" subIdx="02"><sdoDataRaw data="20 00 64 60"/></sdoConfig> <!-- PDO entry -->
<sdoConfig idx="1A02" subIdx="03"><sdoDataRaw data="10 00 77 60"/></sdoConfig> <!-- PDO entry -->
<sdoConfig idx="1A02" subIdx="00"><sdoDataRaw data="03"/></sdoConfig> <!-- set PDO 1A02 entries -->
<sdoConfig idx="1A03" subIdx="00"><sdoDataRaw data="00"/></sdoConfig> <!-- clear PDO 1A03 entries -->
<sdoConfig idx="1600" subIdx="00"><sdoDataRaw data="00"/></sdoConfig> <!-- clear PDO 1600 entries -->
<sdoConfig idx="1600" subIdx="01"><sdoDataRaw data="10 00 40 60"/></sdoConfig> <!-- PDO entry -->
<sdoConfig idx="1600" subIdx="00"><sdoDataRaw data="01"/></sdoConfig> <!-- set PDO 1600 entries -->
<sdoConfig idx="1601" subIdx="00"><sdoDataRaw data="00"/></sdoConfig> <!-- clear PDO 1601 entries -->
<sdoConfig idx="1602" subIdx="00"><sdoDataRaw data="00"/></sdoConfig> <!-- clear PDO 1602 entries -->
<sdoConfig idx="1602" subIdx="01"><sdoDataRaw data="10 00 40 60"/></sdoConfig> <!-- PDO entry -->
<sdoConfig idx="1602" subIdx="02"><sdoDataRaw data="20 00 7A 60"/></sdoConfig> <!-- PDO entry -->
<sdoConfig idx="1602" subIdx="03"><sdoDataRaw data="10 00 B2 60"/></sdoConfig> <!-- PDO entry -->
<sdoConfig idx="1602" subIdx="00"><sdoDataRaw data="03"/></sdoConfig> <!-- set PDO 1602 entries -->
<sdoConfig idx="1603" subIdx="00"><sdoDataRaw data="00"/></sdoConfig> <!-- clear PDO 1603 entries -->
<sdoConfig idx="1C12" subIdx="01"><sdoDataRaw data="02 16"/></sdoConfig> <!-- clear SM pdos 1C12 -->
<sdoConfig idx="1C12" subIdx="00"><sdoDataRaw data="01"/></sdoConfig> <!-- set PDO count 1C12 -->
<sdoConfig idx="1C13" subIdx="01"><sdoDataRaw data="02 1A"/></sdoConfig> <!-- clear SM pdos 1C13 -->
<sdoConfig idx="1C13" subIdx="00"><sdoDataRaw data="01"/></sdoConfig> <!-- set PDO count 1C13 -->
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="0" dir="out"/>
<syncManager idx="1" dir="in"/>
<syncManager idx="2" dir="out">
<pdo idx="1602">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="control" halType="bit"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="pos-cmd" halType="s32"/>
<pdoEntry idx="60B2" subIdx="00" bitLen="16" halPin="torq-offset" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1A02">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="status" halType="bit"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="pos-act" halType="S32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="16" halPin="torq-act" halType="S32"/>
</pdo>
</syncManager>
<sdoConfig idx="6060" subIdx="00"><sdoDataRaw data="08"/></sdoConfig> <!-- opmode 8-csp -->
</slave>
</master>
</masters>
When I start linuxcnc, here is (part of) what dmesg gives me (with ethercat debug 1). You can see that the index, subindex, and size columns correspond to the sdoconfigs, but the data column seems wildly wrong.
Code:
[276816.051747] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1C12, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051750] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1C13, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051753] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1A00, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051755] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1A00, subindex = 0x01, data = 0x000000006f725719, size = 4)
[276816.051758] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1A00, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051760] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1A01, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051762] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1A02, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051765] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1A02, subindex = 0x01, data = 0x000000006f725719, size = 4)
[276816.051767] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1A02, subindex = 0x02, data = 0x000000006f725719, size = 4)
[276816.051769] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1A02, subindex = 0x03, data = 0x000000006f725719, size = 4)
[276816.051771] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1A02, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051774] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1A03, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051776] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1600, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051778] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1600, subindex = 0x01, data = 0x000000006f725719, size = 4)
[276816.051780] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1600, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051783] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1601, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051785] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1602, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051787] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1602, subindex = 0x01, data = 0x000000006f725719, size = 4)
[276816.051789] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1602, subindex = 0x02, data = 0x000000006f725719, size = 4)
[276816.051792] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1602, subindex = 0x03, data = 0x000000006f725719, size = 4)
[276816.051794] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1602, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051797] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1603, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051799] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1C12, subindex = 0x01, data = 0x000000006f725719, size = 2)
[276816.051801] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1C12, subindex = 0x00, data = 0x000000006f725719, size = 1)
[276816.051804] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1C13, subindex = 0x01, data = 0x000000006f725719, size = 2)
[276816.051806] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sdo(sc = 0x0000000062016c10, index = 0x1C13, subindex = 0x00, data = 0x000000006f725719, size = 1)
The dmesg listing ends with the following, and I'd like to ask, again, if the 'slave did not sync' message is worth worrying about.
Code:
[278877.196732] EtherCAT DEBUG 0-0: Sync after 4992 ms: 3433498 ns
[278877.197730] EtherCAT DEBUG 0-0: Sync after 4992 ms: 3433498 ns
[278877.198730] EtherCAT DEBUG 0-0: Sync after 4992 ms: 3433498 ns
[278877.199730] EtherCAT DEBUG 0-0: Sync after 4996 ms: 3433498 ns
[278877.200730] EtherCAT DEBUG 0-0: Sync after 4996 ms: 3433498 ns
[278877.201729] EtherCAT DEBUG 0-0: Sync after 4996 ms: 3433498 ns
[278877.202730] EtherCAT DEBUG 0-0: Sync after 4996 ms: 3433498 ns
[278877.203732] EtherCAT WARNING 0-0: Slave did not sync after 5000 ms.
[278877.203733] EtherCAT DEBUG 0-0: ref_time=748754634520539000
[278877.203734] EtherCAT DEBUG 0-0: app_time=748754640099714290
[278877.203734] EtherCAT DEBUG 0-0: start_time=748754640199714290
[278877.203735] EtherCAT DEBUG 0-0: cycle=1000000
[278877.203736] EtherCAT DEBUG 0-0: shift_time=0
[278877.203737] EtherCAT DEBUG 0-0: remainder=175290
[278877.203738] EtherCAT DEBUG 0-0: start=748754640200539000
[278877.203739] EtherCAT DEBUG 0-0: Setting DC cyclic operation start time to 748754640200539000.
[278877.204732] EtherCAT DEBUG 0-0: Setting DC AssignActivate to 0x0300.
[278877.210731] EtherCAT 0: Domain 0: Working counter changed to 2/3.
[278877.212733] EtherCAT DEBUG 0-0: Now in SAFEOP.
[278877.222730] EtherCAT DEBUG 0-0: Now in OP. Finished configuration.
[278877.231305] EtherCAT 0: Slave states on main device: OP.
[278878.211729] EtherCAT 0: Domain 0: Working counter changed to 3/3.
After linuxcnc starts up, ethercat slaves gives:
0 0:0 OP + AKD EtherCAT Drive (CoE)
Finally, can someone comment on the use of the "configPdos=true" token in the <slave> line?
It seems to me that, when I configure the PDOs explicitly using sdoconfigs, it should be redundant to configure them -again- in the <syncManager> section.
(when I changed it, it didn't make a difference)
Thanks,
Reid