initCmds examples?

More
15 Aug 2025 06:08 #333455 by Kieran
initCmds examples? was created by Kieran
Does anyone have examples of initCmds or sdoconfig? i want to try sending my drives SDOs to set some parameters but am struggling to figure out how exactly to create a proper XML to call using initCmds, or alternatively how to format/add some lines with sdoConfig in my main XML. the whole index/ sub index thing also confuses me (like how does one know what syncmanager idx it should be Ect...) . If anyone has a dummys guide to how all the ethercat address stuff works LMK. It seems linuxcnc uses its own special formatting compared to "normal" ethercat XML? anyway, I want to try setting my servos to absolute mode (i have batteries on the encoders) through the SDO. 

Please Log in or Create an account to join the conversation.

More
15 Aug 2025 06:37 - 15 Aug 2025 06:39 #333456 by Hakan
Replied by Hakan on topic initCmds examples?
Follow the last line here github.com/linuxcnc-ethercat/linuxcnc-et...uration-reference.md
Example of sdoconfig

    <slave idx="0" name="X" type="generic" vid="00000a88" pid="0a880002" configPdos="true">
      <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
      <sdoConfig idx="2000" subIdx="0"><sdoDataRaw data ="a0 0f"/></sdoConfig>  <!-- Max motor current (3.0A=b80b 4.0=a00f 5.0=8813) Rated=4.0A -->
      <sdoConfig idx="2003" subIdx="0"><sdoDataRaw data ="64 00"/></sdoConfig>  <!-- Standby current percentage (100%) -->
      <sdoConfig idx="2011" subIdx="0"><sdoDataRaw data ="01 00"/></sdoConfig>  <!-- Closed loop -->
      <sdoConfig idx="2023" subIdx="1"><sdoDataRaw data ="a0 0f"/></sdoConfig>  <!-- Kp=4000 (def=2000) -->
      <syncManager idx="2" dir="out">

 
What's tricky is the byte order of the data. LSB first, so "1" becomes "01 00" and so on.
Last edit: 15 Aug 2025 06:39 by Hakan.
The following user(s) said Thank You: Kieran

Please Log in or Create an account to join the conversation.

Time to create page: 0.102 seconds
Powered by Kunena Forum