Experimental XML config generator

More
07 Jun 2025 17:59 #329890 by farmer_mike
Replied by farmer_mike on topic Experimental XML config generator
Thanks for the help everyone. I decided to move my project to a Raspberry Pi 4, so I made sure to use the latest versions of LinuxCNC and Ethercat. I think I have the experimental XML config working now. I am a little unsure what to do with the output file. 

I'll paste two files below. The first file is the ethercat-conf.xml from my CNC project when I had a single axis using an Rtelligent ECT 60 stepper motor.The single axis worked, so I have since bought two Rtelligent RS750E AC Servo drives. All I have done with the RS750E drives is power them up and connect the Ethernet. I haven't done any onboard parameter programming yet.

The experimental XML config generator recognized all three drives in order.

Is the output from the experimental XML config generator meant to be used to create the ethercat-conf.xml file?
<masters>
  <master idx="0" appTimePeriod="1000000" refClockSyncCycles="1">
    <!-- Joint 0 -->
    <slave idx="0" type="generic" vid="00000a88" pid="0a880002" configPdos="true">
      <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
      <sdoConfig idx="2000" subIdx="0"><sdoDataRaw data ="88 13"/></sdoConfig>  <!-- Max motor current (5.0) -->
      <sdoConfig idx="2007" subIdx="6"><sdoDataRaw data ="05"/></sdoConfig>     <!-- Input 6 - Emergency Stop -->
      <sdoConfig idx="2007" subIdx="5"><sdoDataRaw data ="05"/></sdoConfig>     <!-- Input 3 - Home Function -->
      <sdoConfig idx="2011" subIdx="0"><sdoDataRaw data ="01 00"/></sdoConfig>  <!-- Closed loop -->
      <sdoConfig idx="6098" subIdx="0"><sdoDataRaw data ="11 00"/></sdoConfig>  <!-- Home mode 17 -->
      <sdoConfig idx="607C" subIdx="0"><sdoDataRaw data ="00 00"/></sdoConfig>  <!-- Home offset 0  -->
      <sdoConfig idx="609A" subIdx="0"><sdoDataRaw data ="F4 01"/></sdoConfig>  <!-- Home accelleration 500 -->
      <sdoConfig idx="6099" subIdx="01"><sdoDataRaw data ="C4 09"/></sdoConfig>  <!-- Home fast speed 2500-->
      <sdoConfig idx="6099" subIdx="02"><sdoDataRaw data ="F4 01"/></sdoConfig>  <!-- Home slow speed 500 -->
      <syncManager idx="2" dir="out">
        <pdo idx="1600">
          <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
          <pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
          <!-- Target Position -->
          <pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
          <!-- Target Velocity -->
          <pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
          <!-- Digtial Outputs (manufacturer's extension ECT86/ECT60)-->
          <pdoEntry idx="204A" subIdx="0" bitLen="16" halType="complex">
            <complexEntry bitLen="1" halPin="out-1" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-2" halType="bit"/>
            <complexEntry bitLen="14"/>
          </pdoEntry>
        </pdo>
      </syncManager>
      <syncManager idx="3" dir="in">
        <pdo idx="1a00">
          <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
          <pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
          <pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
          <pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
          <pdoEntry idx="6077" subIdx="00" bitLen="32" halPin="actual-torque" halType="s32"/>
          <!-- Digtial_inputs (cia402 compatible) -->
          <pdoEntry idx="60FD" subIdx="0" bitLen="32" halType="complex">
            <complexEntry bitLen="1" halPin="CW-limit" halType="bit"/>
            <complexEntry bitLen="1" halPin="CCW-limit" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-home" halType="bit"/>
            <complexEntry bitLen="13"/>
            <complexEntry bitLen="1" halPin="in-1" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-2" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-3" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-4" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-5" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-6" halType="bit"/>
            <complexEntry bitLen="10"/>
          </pdoEntry>          
        </pdo>
      </syncManager>
    </slave>
 
    
   </master>
</masters>


<masters>
  <master idx="0">
    <slave idx="0" type="ECT60" name="D1">
      <!-- Enable support for Cyclic Synchronous Position mode. -->
      <modParam name="enableCSP" value="true"/>
      
      <!-- Enable support for Cyclic Synchronous Velocity mode. -->
      <modParam name="enableCSV" value="false"/>
      
      <!-- Maximum stepper Amps. -->
      <modParam name="peakCurrent_amps" value="6.0"/>
      
      <!-- Operation mode: openloop, closedloop, or foc. -->
      <modParam name="controlMode" value="closedloop"/>
      
      <!-- Number of encoder steps per revolution. -->
      <modParam name="encoderResolution" value="4000"/>
      
      <!-- Output 1 use: general, alarm, brake, in-place. -->
      <modParam name="output1Func" value="alarm"/>
      
      <!-- Output 2 use: general, alarm, brake, in-place. -->
      <modParam name="output2Func" value="brake"/>
      
      <!-- Input 3 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 -->
      <modParam name="input3Func" value="cw-limit"/>
      
      <!-- Input 4 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 -->
      <modParam name="input4Func" value="ccw-limit"/>
      
      <!-- Input 5 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 -->
      <modParam name="input5Func" value="home"/>
      
      <!-- Input 6 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 -->
      <modParam name="input6Func" value="motor-offline"/>
      
    </slave>
    <slave idx="1" type="basic_cia402" vid="0x00000a88" pid="0x0a880013" name="D2">
      <!--RS750E(COE)-->
      <modParam name="ciaRxPDOEntryLimit" value="9"/>
      <modParam name="ciaTxPDOEntryLimit" value="9"/>
      <modParam name="enablePP" value="true"/>
      <modParam name="enablePV" value="true"/>
      <modParam name="enableTQ" value="true"/>
      <modParam name="enableHM" value="true"/>
      <modParam name="enableCSP" value="true"/>
      <modParam name="enableCSV" value="true"/>
      <modParam name="enableCST" value="true"/>
      <modParam name="enableActualFollowingError" value="true"/>
      <modParam name="enableActualTorque" value="true"/>
      <modParam name="enableDigitalInput" value="true"/>
      <modParam name="digitalInChannels" value="16"/>
      <modParam name="enableDigitalOutput" value="true"/>
      <modParam name="digitalOutChannels" value="16"/>
      <modParam name="enableErrorCode" value="true"/>
      <modParam name="enableFollowingErrorTimeout" value="true"/>
      <modParam name="enableFollowingErrorWindow" value="true"/>
      <modParam name="enableHomeAccel" value="true"/>
      <modParam name="enableMaximumCurrent" value="true"/>
      <modParam name="enableMaximumTorque" value="true"/>
      <modParam name="enablePolarity" value="true"/>
      <modParam name="enablePositionDemand" value="true"/>
      <modParam name="enablePositioningTime" value="true"/>
      <modParam name="enablePositioningWindow" value="true"/>
      <modParam name="enableProbeStatus" value="true"/>
      <modParam name="enableProfileAccel" value="true"/>
      <modParam name="enableProfileDecel" value="true"/>
      <modParam name="enableProfileMaxVelocity" value="true"/>
      <modParam name="enableProfileVelocity" value="true"/>
      <modParam name="enableTargetTorque" value="true"/>
      <modParam name="enableTorqueDemand" value="true"/>
      <modParam name="enableTorqueSlope" value="true"/>
      <modParam name="enableVelocityErrorTime" value="true"/>
      <modParam name="enableVelocityErrorWindow" value="true"/>
    </slave>
    <slave idx="2" type="basic_cia402" vid="0x00000a88" pid="0x0a880013" name="D3">
      <!--RS750E(COE)-->
      <modParam name="ciaRxPDOEntryLimit" value="9"/>
      <modParam name="ciaTxPDOEntryLimit" value="9"/>
      <modParam name="enablePP" value="true"/>
      <modParam name="enablePV" value="true"/>
      <modParam name="enableTQ" value="true"/>
      <modParam name="enableHM" value="true"/>
      <modParam name="enableCSP" value="true"/>
      <modParam name="enableCSV" value="true"/>
      <modParam name="enableCST" value="true"/>
      <modParam name="enableActualFollowingError" value="true"/>
      <modParam name="enableActualTorque" value="true"/>
      <modParam name="enableDigitalInput" value="true"/>
      <modParam name="digitalInChannels" value="16"/>
      <modParam name="enableDigitalOutput" value="true"/>
      <modParam name="digitalOutChannels" value="16"/>
      <modParam name="enableErrorCode" value="true"/>
      <modParam name="enableFollowingErrorTimeout" value="true"/>
      <modParam name="enableFollowingErrorWindow" value="true"/>
      <modParam name="enableHomeAccel" value="true"/>
      <modParam name="enableMaximumCurrent" value="true"/>
      <modParam name="enableMaximumTorque" value="true"/>
      <modParam name="enablePolarity" value="true"/>
      <modParam name="enablePositionDemand" value="true"/>
      <modParam name="enablePositioningTime" value="true"/>
      <modParam name="enablePositioningWindow" value="true"/>
      <modParam name="enableProbeStatus" value="true"/>
      <modParam name="enableProfileAccel" value="true"/>
      <modParam name="enableProfileDecel" value="true"/>
      <modParam name="enableProfileMaxVelocity" value="true"/>
      <modParam name="enableProfileVelocity" value="true"/>
      <modParam name="enableTargetTorque" value="true"/>
      <modParam name="enableTorqueDemand" value="true"/>
      <modParam name="enableTorqueSlope" value="true"/>
      <modParam name="enableVelocityErrorTime" value="true"/>
      <modParam name="enableVelocityErrorWindow" value="true"/>
    </slave>
  </master>
</masters>

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

More
11 Jun 2025 07:17 #330126 by Hakan
Replied by Hakan on topic Experimental XML config generator
I would say the output of lcec_configgen is syntactically correct for an ethercat-conf.xml file.
And if you only use recognized devices you can use the generated output directly.
You may still want to change the name"Dx" parameter to something sensible and possibly more.
So it is a really good starting point.

The challenge comes with devices/slaves that are not recognized by lcec and the generic driver is used.
The output from lcec_configgen is syntactically correct as mentioned but it lacks context. It doesn't know
which PDO should be connected to which linuxcnc module and pin. The work to look in the manual
and see what the PDOs actually do remains. With cia402 drives there are boiler-plate examples usually
with great success. Again, a starting point that fixes the syntax of the config file, but the work to understand
how to use the unit still remains.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum