Experimental XML config generator

More
27 Feb 2024 02:16 - 09 Mar 2024 01:08 #294568 by scottlaird
As of linuxcnc-ethercat v1.20.3, there's a new tool included in the .debs that may be helpful for some people: lcec_configgen.  It tries to auto-generate an XML config based on data from `ethercat slaves`, `ethercat sdos`, `ethercat pdos`, and an `ethercat upload` or two.

Here's what it knows how to do today:
  1. Recognize all EtherCAT devices with compiled drivers and create `<slave ... type="EL1008".../>` configs for them.
  2. Recognize CiA 402 devices and create a `<slave ... type="basic_cia402" .../>` config for them including modParams that describe the device's capabilities and which optional CiA 402 SDOs are present on the device.
    • Generate not-quite-right generic configs for all remaining unidentified devices.

      It *certainly* isn't ready to turn loose on new users.  Among other issues, it doesn't handle gap entries in generic device PDOs correctly today, and it makes no attempt to generate unique pin names.  On the other hand, sometimes it comes kind of close:


          <slave idx="13" type="generic" vid="0x00000002" pid="0x0e613052" name="D14">
            <!--EL3681 Digital multimeter terminal-->
            <syncManager idx="0" dir="in"/>
            <syncManager idx="1" dir="out"/>
            <syncManager idx="2" dir="out">
              <pdo idx="1600">
                <pdoEntry idx="7000" subIdx="01" bitLen="1" halPin="disable-autorange" halType="bit"/>
                <pdoEntry idx="7000" subIdx="02" bitLen="1" halPin="start-calibration" halType="bit"/>
                <pdoEntry idx="0000" subIdx="00" bitLen="2" halPin="gap" halType="bit"/>
                <pdoEntry idx="7000" subIdx="05" bitLen="4" halPin="mode" halType="bit"/>
                <pdoEntry idx="7000" subIdx="09" bitLen="8" halPin="range" halType="s32"/>
              </pdo>
            </syncManager>
            <syncManager idx="3" dir="in">
              <pdo idx="1a00">
                <pdoEntry idx="6000" subIdx="01" bitLen="1" halPin="underrange" halType="bit"/>
                <pdoEntry idx="6000" subIdx="02" bitLen="1" halPin="overrange" halType="bit"/>
                <pdoEntry idx="6000" subIdx="03" bitLen="1" halPin="extended-range" halType="bit"/>
                <pdoEntry idx="6000" subIdx="04" bitLen="1" halPin="data-invalid" halType="bit"/>
                <pdoEntry idx="6000" subIdx="05" bitLen="1" halPin="range-invalid" halType="bit"/>
                <pdoEntry idx="6000" subIdx="06" bitLen="1" halPin="autorange-disabled" halType="bit"/>
                <pdoEntry idx="6000" subIdx="07" bitLen="1" halPin="error" halType="bit"/>
                <pdoEntry idx="6000" subIdx="08" bitLen="1" halPin="calibration-in-progress" halType="bit"/>
                <pdoEntry idx="0000" subIdx="00" bitLen="6" halPin="gap" halType="bit"/>
                <pdoEntry idx="6000" subIdx="0f" bitLen="1" halPin="txpdo-state" halType="bit"/>
                <pdoEntry idx="6000" subIdx="10" bitLen="1" halPin="txpdo-toggle" halType="bit"/>
                <pdoEntry idx="6000" subIdx="11" bitLen="32" halPin="value" halType="s32"/>
              </pdo>
              <pdo idx="1a01">
                <pdoEntry idx="0000" subIdx="00" bitLen="4" halPin="gap" halType="bit"/>
                <pdoEntry idx="6001" subIdx="05" bitLen="4" halPin="mode" halType="bit"/>
                <pdoEntry idx="6001" subIdx="09" bitLen="8" halPin="range" halType="s32"/>
              </pdo>
            </syncManager>
          </slave>
      
      
      If you're up to upgrading to 1.20.3 (or compiling it yourself), then I'd love to get a bit of feedback.  It should be safe to run -- it just prints the config to stdout and won't overwrite anything.
      
      My big motivator for this is to make "basic_cia402" work better.  Here's what a Leadshine 2CS3E-D507 looks like:
      
      
      [code]    <slave idx="21" type="basic_cia402" vid="0x00004321" pid="0x00002100" name="D22">
            <!--2CL3-EC507(COE)-->
            <modParam name="ciaChannels" value="2"/>
            <modParam name="ch1enablePP" value="true"/>
            <modParam name="ch1enablePV" value="true"/>
            <modParam name="ch1enableHM" value="true"/>
            <modParam name="ch1enableCSP" value="true"/>
            <modParam name="ch1enableActualCurrent" value="true"/>
            <modParam name="ch1enableActualFollowingError" value="true"/>
            <modParam name="ch1enableActualTorque" value="true"/>
            <modParam name="ch1enableActualVelocitySensor" value="true"/>
            <modParam name="ch1enableActualVoltage" value="true"/>
            <modParam name="ch1enableFollowingErrorTimeout" value="true"/>
            <modParam name="ch1enableFollowingErrorWindow" value="true"/>
            <modParam name="ch1enableHomeAccel" value="true"/>
            <modParam name="ch1enableInterpolationTimePeriod" value="true"/>
            <modParam name="ch1enableMaximumAcceleration" value="true"/>
            <modParam name="ch1enableMaximumCurrent" value="true"/>
            <modParam name="ch1enableMaximumDeceleration" value="true"/>
            <modParam name="ch1enableMaximumMotorRPM" value="true"/>
            <modParam name="ch1enableMaximumTorque" value="true"/>
            <modParam name="ch1enableMotorRatedCurrent" value="true"/>
            <modParam name="ch1enableMotorRatedTorque" value="true"/>
            <modParam name="ch1enablePolarity" value="true"/>
            <modParam name="ch1enableProfileAccel" value="true"/>
            <modParam name="ch1enableProfileDecel" value="true"/>
            <modParam name="ch1enableProfileEndVelocity" value="true"/>
            <modParam name="ch1enableProfileMaxVelocity" value="true"/>
            <modParam name="ch1enableProfileVelocity" value="true"/>
            <modParam name="ch1enableTargetTorque" value="true"/>
            <modParam name="ch1enableTorqueDemand" value="true"/>
            <modParam name="ch1enableTorqueProfileType" value="true"/>
            <modParam name="ch1enableTorqueSlope" value="true"/>
            <modParam name="ch1enableVelocityDemand" value="true"/>
            <modParam name="ch1enableVelocityErrorTime" value="true"/>
            <modParam name="ch1enableVelocityErrorWindow" value="true"/>
            <modParam name="ch1enableVelocitySensorSelector" value="true"/>
            <modParam name="ch1enableVelocityThresholdTime" value="true"/>
            <modParam name="ch1enableVelocityThresholdWindow" value="true"/>
            <modParam name="ch2enablePP" value="true"/>
            <modParam name="ch2enablePV" value="true"/>
            <modParam name="ch2enableHM" value="true"/>
            <modParam name="ch2enableCSP" value="true"/>
            <modParam name="ch2enableActualCurrent" value="true"/>
            <modParam name="ch2enableActualFollowingError" value="true"/>
            <modParam name="ch2enableActualTorque" value="true"/>
            <modParam name="ch2enableActualVelocitySensor" value="true"/>
            <modParam name="ch2enableActualVoltage" value="true"/>
            <modParam name="ch2enableFollowingErrorTimeout" value="true"/>
            <modParam name="ch2enableFollowingErrorWindow" value="true"/>
            <modParam name="ch2enableHomeAccel" value="true"/>
            <modParam name="ch2enableInterpolationTimePeriod" value="true"/>
            <modParam name="ch2enableMaximumAcceleration" value="true"/>
            <modParam name="ch2enableMaximumCurrent" value="true"/>
            <modParam name="ch2enableMaximumDeceleration" value="true"/>
            <modParam name="ch2enableMaximumMotorRPM" value="true"/>
            <modParam name="ch2enableMaximumTorque" value="true"/>
            <modParam name="ch2enableMotorRatedCurrent" value="true"/>
            <modParam name="ch2enableMotorRatedTorque" value="true"/>
            <modParam name="ch2enablePolarity" value="true"/>
            <modParam name="ch2enableProfileAccel" value="true"/>
            <modParam name="ch2enableProfileDecel" value="true"/>
            <modParam name="ch2enableProfileEndVelocity" value="true"/>
            <modParam name="ch2enableProfileMaxVelocity" value="true"/>
            <modParam name="ch2enableProfileVelocity" value="true"/>
            <modParam name="ch2enableTargetTorque" value="true"/>
            <modParam name="ch2enableTorqueDemand" value="true"/>
            <modParam name="ch2enableTorqueProfileType" value="true"/>
            <modParam name="ch2enableTorqueSlope" value="true"/>
            <modParam name="ch2enableVelocityDemand" value="true"/>
            <modParam name="ch2enableVelocityErrorTime" value="true"/>
            <modParam name="ch2enableVelocityErrorWindow" value="true"/>
            <modParam name="ch2enableVelocitySensorSelector" value="true"/>
            <modParam name="ch2enableVelocityThresholdTime" value="true"/>
            <modParam name="ch2enableVelocityThresholdWindow" value="true"/>
          </slave>
      
      
      That's enough to get "basic_cia402" to start up, talk to both axes, go into OP mode, and then.. fail to actually move.  So I'm not done yet :-).
      
      At some point, I'd like to get this *reading* XML configs as well, so it can modify them in place, leaving device names the same and only adding new devices, but the code's not there yet, and I have a growing pile of CiA 402 hardware to make it through first.
      [/code]
Last edit: 09 Mar 2024 01:08 by scottlaird. Reason: typo
The following user(s) said Thank You: 0x2102, besriworld

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

More
27 Feb 2024 04:55 #294574 by scottlaird
I fixed a couple of the `generic` bugs and pushed v1.20.4. This now produces semi-reasonable generic configs for the 3 devices that I have handy without drivers.

Here's an EP9214, for example. That's a 4-port power distribution box that can distribute 16A of 24V power to 4 different chains of Beckhoff EP* devices. It includes some status monitoring, so you can see when you've overloaded each of the 4 outputs, plus you can toggle each output off individually. Basically, it's a slightly smart power strip. I haven't bothered to write a driver yet, because it's a power strip :-).
    <slave idx="25" type="generic" vid="0x00000002" pid="0x23fe4052" name="D26">
      <!--EP9214-0023 4Ch/4Ch Power Distribution for EtherCAT Box Modules-->
      <syncManager idx="0" dir="in"/>
      <syncManager idx="1" dir="out"/>
      <syncManager idx="2" dir="out">
        <pdo idx="1600">
          <!--DPO RxPDO-Map Outputs Ch.1-->
          <pdoEntry idx="7000" subIdx="01" bitLen="1" halPin="ch-1-output-us" halType="bit"/>
          <pdoEntry idx="7000" subIdx="02" bitLen="1" halPin="ch-1-output-up" halType="bit"/>
          <pdoEntry idx="7000" subIdx="05" bitLen="1" halPin="ch-1-reset-us" halType="bit"/>
          <pdoEntry idx="7000" subIdx="06" bitLen="1" halPin="ch-1-reset-up" halType="bit"/>
        </pdo>
        <pdo idx="1601">
          <!--DPO RxPDO-Map Outputs Ch.2-->
          <pdoEntry idx="7010" subIdx="01" bitLen="1" halPin="ch-2-output-us" halType="bit"/>
          <pdoEntry idx="7010" subIdx="02" bitLen="1" halPin="ch-2-output-up" halType="bit"/>
          <pdoEntry idx="7010" subIdx="05" bitLen="1" halPin="ch-2-reset-us" halType="bit"/>
          <pdoEntry idx="7010" subIdx="06" bitLen="1" halPin="ch-2-reset-up" halType="bit"/>
        </pdo>
        <pdo idx="1602">
          <!--DPO RxPDO-Map Outputs Ch.3-->
          <pdoEntry idx="7020" subIdx="01" bitLen="1" halPin="ch-3-output-us" halType="bit"/>
          <pdoEntry idx="7020" subIdx="02" bitLen="1" halPin="ch-3-output-up" halType="bit"/>
          <pdoEntry idx="7020" subIdx="05" bitLen="1" halPin="ch-3-reset-us" halType="bit"/>
          <pdoEntry idx="7020" subIdx="06" bitLen="1" halPin="ch-3-reset-up" halType="bit"/>
        </pdo>
        <pdo idx="1603">
          <!--DPO RxPDO-Map Outputs Ch.4-->
          <pdoEntry idx="7030" subIdx="01" bitLen="1" halPin="ch-4-output-us" halType="bit"/>
          <pdoEntry idx="7030" subIdx="02" bitLen="1" halPin="ch-4-output-up" halType="bit"/>
          <pdoEntry idx="7030" subIdx="05" bitLen="1" halPin="ch-4-reset-us" halType="bit"/>
          <pdoEntry idx="7030" subIdx="06" bitLen="1" halPin="ch-4-reset-up" halType="bit"/>
        </pdo>
        <pdo idx="1604">
          <!--DPO RxPDO-Map Outputs Device-->
          <pdoEntry idx="f707" subIdx="01" bitLen="1" halPin="enable-control-via-fieldbus" halType="bit"/>
          <pdoEntry idx="f707" subIdx="04" bitLen="1" halPin="global-reset" halType="bit"/>
        </pdo>
      </syncManager>
      <syncManager idx="3" dir="in">
        <pdo idx="1a00">
          <!--DPO TxPDO-Map Inputs Ch.1-->
          <pdoEntry idx="6000" subIdx="01" bitLen="1" halPin="ch-1-error-us" halType="bit"/>
          <pdoEntry idx="6000" subIdx="02" bitLen="1" halPin="ch-1-error-up" halType="bit"/>
          <pdoEntry idx="6000" subIdx="03" bitLen="1" halPin="ch-1-warning-us" halType="bit"/>
          <pdoEntry idx="6000" subIdx="04" bitLen="1" halPin="ch-1-warning-up" halType="bit"/>
          <pdoEntry idx="6000" subIdx="05" bitLen="1" halPin="ch-1-status-us" halType="bit"/>
          <pdoEntry idx="6000" subIdx="06" bitLen="1" halPin="ch-1-status-up" halType="bit"/>
          <pdoEntry idx="6000" subIdx="07" bitLen="1" halPin="ch-1-channel-error" halType="bit"/>
          <pdoEntry idx="6000" subIdx="0e" bitLen="1" halPin="ch-1-sync-error" halType="bit"/>
          <pdoEntry idx="6000" subIdx="0f" bitLen="1" halPin="ch-1-txpdo-state" halType="bit"/>
          <pdoEntry idx="6000" subIdx="10" bitLen="1" halPin="ch-1-txpdo-toggle" halType="bit"/>
        </pdo>
        <pdo idx="1a01">
          <!--DPO TxPDO-Map Inputs Ch.2-->
          <pdoEntry idx="6010" subIdx="01" bitLen="1" halPin="ch-2-error-us" halType="bit"/>
          <pdoEntry idx="6010" subIdx="02" bitLen="1" halPin="ch-2-error-up" halType="bit"/>
          <pdoEntry idx="6010" subIdx="03" bitLen="1" halPin="ch-2-warning-us" halType="bit"/>
          <pdoEntry idx="6010" subIdx="04" bitLen="1" halPin="ch-2-warning-up" halType="bit"/>
          <pdoEntry idx="6010" subIdx="05" bitLen="1" halPin="ch-2-status-us" halType="bit"/>
          <pdoEntry idx="6010" subIdx="06" bitLen="1" halPin="ch-2-status-up" halType="bit"/>
          <pdoEntry idx="6010" subIdx="07" bitLen="1" halPin="ch-2-channel-error" halType="bit"/>
          <pdoEntry idx="6010" subIdx="0e" bitLen="1" halPin="ch-2-sync-error" halType="bit"/>
          <pdoEntry idx="6010" subIdx="0f" bitLen="1" halPin="ch-2-txpdo-state" halType="bit"/>
          <pdoEntry idx="6010" subIdx="10" bitLen="1" halPin="ch-2-txpdo-toggle" halType="bit"/>
        </pdo>
        <pdo idx="1a02">
          <!--DPO TxPDO-Map Inputs Ch.3-->
          <pdoEntry idx="6020" subIdx="01" bitLen="1" halPin="ch-3-error-us" halType="bit"/>
          <pdoEntry idx="6020" subIdx="02" bitLen="1" halPin="ch-3-error-up" halType="bit"/>
          <pdoEntry idx="6020" subIdx="03" bitLen="1" halPin="ch-3-warning-us" halType="bit"/>
          <pdoEntry idx="6020" subIdx="04" bitLen="1" halPin="ch-3-warning-up" halType="bit"/>
          <pdoEntry idx="6020" subIdx="05" bitLen="1" halPin="ch-3-status-us" halType="bit"/>
          <pdoEntry idx="6020" subIdx="06" bitLen="1" halPin="ch-3-status-up" halType="bit"/>
          <pdoEntry idx="6020" subIdx="07" bitLen="1" halPin="ch-3-channel-error" halType="bit"/>
          <pdoEntry idx="6020" subIdx="0e" bitLen="1" halPin="ch-3-sync-error" halType="bit"/>
          <pdoEntry idx="6020" subIdx="0f" bitLen="1" halPin="ch-3-txpdo-state" halType="bit"/>
          <pdoEntry idx="6020" subIdx="10" bitLen="1" halPin="ch-3-txpdo-toggle" halType="bit"/>
        </pdo>
        <pdo idx="1a03">
          <!--DPO TxPDO-Map Inputs Ch.4-->
          <pdoEntry idx="6030" subIdx="01" bitLen="1" halPin="ch-4-error-us" halType="bit"/>
          <pdoEntry idx="6030" subIdx="02" bitLen="1" halPin="ch-4-error-up" halType="bit"/>
          <pdoEntry idx="6030" subIdx="03" bitLen="1" halPin="ch-4-warning-us" halType="bit"/>
          <pdoEntry idx="6030" subIdx="04" bitLen="1" halPin="ch-4-warning-up" halType="bit"/>
          <pdoEntry idx="6030" subIdx="05" bitLen="1" halPin="ch-4-status-us" halType="bit"/>
          <pdoEntry idx="6030" subIdx="06" bitLen="1" halPin="ch-4-status-up" halType="bit"/>
          <pdoEntry idx="6030" subIdx="07" bitLen="1" halPin="ch-4-channel-error" halType="bit"/>
          <pdoEntry idx="6030" subIdx="0e" bitLen="1" halPin="ch-4-sync-error" halType="bit"/>
          <pdoEntry idx="6030" subIdx="0f" bitLen="1" halPin="ch-4-txpdo-state" halType="bit"/>
          <pdoEntry idx="6030" subIdx="10" bitLen="1" halPin="ch-4-txpdo-toggle" halType="bit"/>
        </pdo>
        <pdo idx="1a04">
          <!--DPO TxPDO-Map Inputs Device-->
          <pdoEntry idx="f607" subIdx="01" bitLen="1" halPin="temperature-warning" halType="bit"/>
          <pdoEntry idx="f607" subIdx="02" bitLen="1" halPin="temperature-error" halType="bit"/>
          <pdoEntry idx="f607" subIdx="03" bitLen="1" halPin="us-warning" halType="bit"/>
          <pdoEntry idx="f607" subIdx="04" bitLen="1" halPin="us-error" halType="bit"/>
          <pdoEntry idx="f607" subIdx="05" bitLen="1" halPin="up-warning" halType="bit"/>
          <pdoEntry idx="f607" subIdx="06" bitLen="1" halPin="up-error" halType="bit"/>
          <pdoEntry idx="f607" subIdx="07" bitLen="1" halPin="global-error-bit" halType="bit"/>
          <pdoEntry idx="f607" subIdx="0c" bitLen="1" halPin="reset-input" halType="bit"/>
          <pdoEntry idx="f607" subIdx="0f" bitLen="1" halPin="device-txpdo-state" halType="bit"/>
          <pdoEntry idx="f607" subIdx="10" bitLen="1" halPin="device-txpdo-toggle" halType="bit"/>
        </pdo>
      </syncManager>
    </slave>

I'm not entirely convinced that I don't have `in` and `out` backwards there, but it's close enough for LinuxCNC to function:
     8  bit   OUT         FALSE  lcec.0.D26.ch-1-channel-error
     8  bit   OUT         FALSE  lcec.0.D26.ch-1-error-up
     8  bit   OUT         FALSE  lcec.0.D26.ch-1-error-us
     8  bit   IN          FALSE  lcec.0.D26.ch-1-output-up
     8  bit   IN          FALSE  lcec.0.D26.ch-1-output-us
     8  bit   IN          FALSE  lcec.0.D26.ch-1-reset-up
     8  bit   IN          FALSE  lcec.0.D26.ch-1-reset-us
     8  bit   OUT          TRUE  lcec.0.D26.ch-1-status-up
     8  bit   OUT          TRUE  lcec.0.D26.ch-1-status-us
     8  bit   OUT         FALSE  lcec.0.D26.ch-1-sync-error
     8  bit   OUT         FALSE  lcec.0.D26.ch-1-txpdo-state
     8  bit   OUT         FALSE  lcec.0.D26.ch-1-txpdo-toggle
     8  bit   OUT         FALSE  lcec.0.D26.ch-1-warning-up
     8  bit   OUT         FALSE  lcec.0.D26.ch-1-warning-us
     8  bit   OUT         FALSE  lcec.0.D26.ch-2-channel-error
     8  bit   OUT         FALSE  lcec.0.D26.ch-2-error-up
     8  bit   OUT         FALSE  lcec.0.D26.ch-2-error-us
     8  bit   IN          FALSE  lcec.0.D26.ch-2-output-up
     8  bit   IN          FALSE  lcec.0.D26.ch-2-output-us
     8  bit   IN          FALSE  lcec.0.D26.ch-2-reset-up
     8  bit   IN          FALSE  lcec.0.D26.ch-2-reset-us
     8  bit   OUT          TRUE  lcec.0.D26.ch-2-status-up
     8  bit   OUT          TRUE  lcec.0.D26.ch-2-status-us
     8  bit   OUT         FALSE  lcec.0.D26.ch-2-sync-error
     8  bit   OUT         FALSE  lcec.0.D26.ch-2-txpdo-state
     8  bit   OUT         FALSE  lcec.0.D26.ch-2-txpdo-toggle
     8  bit   OUT         FALSE  lcec.0.D26.ch-2-warning-up
     8  bit   OUT         FALSE  lcec.0.D26.ch-2-warning-us
     8  bit   OUT         FALSE  lcec.0.D26.ch-3-error-us
     8  bit   IN          FALSE  lcec.0.D26.ch-3-output-up
     8  bit   IN          FALSE  lcec.0.D26.ch-3-output-us
     8  bit   IN          FALSE  lcec.0.D26.ch-3-reset-up
     8  bit   IN          FALSE  lcec.0.D26.ch-3-reset-us
     8  bit   OUT         FALSE  lcec.0.D26.ch-4-channel-error
     8  bit   OUT         FALSE  lcec.0.D26.ch-4-error-up
     8  bit   IN          FALSE  lcec.0.D26.ch-4-output-up
     8  bit   IN          FALSE  lcec.0.D26.ch-4-output-us
     8  bit   IN          FALSE  lcec.0.D26.ch-4-reset-up
     8  bit   IN          FALSE  lcec.0.D26.ch-4-reset-us
     8  bit   OUT          TRUE  lcec.0.D26.ch-4-status-up
     8  bit   OUT          TRUE  lcec.0.D26.ch-4-status-us
     8  bit   OUT         FALSE  lcec.0.D26.ch-4-sync-error
     8  bit   OUT         FALSE  lcec.0.D26.ch-4-txpdo-state
     8  bit   OUT         FALSE  lcec.0.D26.ch-4-txpdo-toggle
     8  bit   OUT         FALSE  lcec.0.D26.ch-4-warning-up
     8  bit   OUT         FALSE  lcec.0.D26.ch-4-warning-us
     8  bit   OUT         FALSE  lcec.0.D26.device-txpdo-state
     8  bit   OUT         FALSE  lcec.0.D26.device-txpdo-toggle
     8  bit   IN          FALSE  lcec.0.D26.enable-control-via-fieldbus
     8  bit   OUT         FALSE  lcec.0.D26.global-error-bit
     8  bit   IN          FALSE  lcec.0.D26.global-reset
     8  bit   OUT         FALSE  lcec.0.D26.reset-input
     8  bit   OUT          TRUE  lcec.0.D26.slave-online
     8  bit   OUT          TRUE  lcec.0.D26.slave-oper
     8  bit   OUT         FALSE  lcec.0.D26.slave-state-init
     8  bit   OUT          TRUE  lcec.0.D26.slave-state-op
     8  bit   OUT         FALSE  lcec.0.D26.slave-state-preop
     8  bit   OUT         FALSE  lcec.0.D26.slave-state-safeop
     8  bit   OUT         FALSE  lcec.0.D26.temperature-error
     8  bit   OUT         FALSE  lcec.0.D26.temperature-warning
     8  bit   OUT         FALSE  lcec.0.D26.up-error
     8  bit   OUT         FALSE  lcec.0.D26.up-warning
     8  bit   OUT         FALSE  lcec.0.D26.us-error
     8  bit   OUT         FALSE  lcec.0.D26.us-warning
The following user(s) said Thank You: licantrop, besriworld

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

More
27 Feb 2024 05:36 #294577 by scottlaird
Okay, one last example, with v1.20.5. I pulled an EP4374-0002 (2 port analog in, 2 port analog out) and an EP3744-0041 (5 port pressure, 6x digital in, 2x digital out) out of my "to do" pile. Here they are with 0 editing:
    <slave idx="27" type="generic" vid="0x00000002" pid="0x11164052" name="D28">
      <!--EP4374-0002 2K. Ana. Eingang +/-10V, 0-10V, 0/4-20mA konfigurie-->
      <syncManager idx="0" dir="in"/>
      <syncManager idx="1" dir="out"/>
      <syncManager idx="2" dir="out">
        <pdo idx="1600">
          <!--AO RxPDO-Map Ch.3-->
          <pdoEntry idx="7020" subIdx="11" bitLen="16" halPin="ch-3-analog-output" halType="s32"/>
        </pdo>
        <pdo idx="1601">
          <!--AO RxPDO-Map Ch.4-->
          <pdoEntry idx="7030" subIdx="11" bitLen="16" halPin="ch-4-analog-output" halType="s32"/>
        </pdo>
      </syncManager>
      <syncManager idx="3" dir="in">
        <pdo idx="1a00">
          <!--AI TxPDO-Map Standard Ch.1-->
          <pdoEntry idx="6000" subIdx="01" bitLen="1" halPin="ch-1-underrange" halType="bit"/>
          <pdoEntry idx="6000" subIdx="02" bitLen="1" halPin="ch-1-overrange" halType="bit"/>
          <pdoEntry idx="6000" subIdx="03" bitLen="2" halPin="ch-1-limit-1" halType="bit"/>
          <pdoEntry idx="6000" subIdx="05" bitLen="2" halPin="ch-1-limit-2" halType="bit"/>
          <pdoEntry idx="6000" subIdx="07" bitLen="1" halPin="ch-1-error" halType="bit"/>
          <pdoEntry idx="6000" subIdx="0e" bitLen="1" halPin="ch-1-sync-error" halType="bit"/>
          <pdoEntry idx="6000" subIdx="0f" bitLen="1" halPin="ch-1-txpdo-state" halType="bit"/>
          <pdoEntry idx="6000" subIdx="10" bitLen="1" halPin="ch-1-txpdo-toggle" halType="bit"/>
          <pdoEntry idx="6000" subIdx="11" bitLen="16" halPin="ch-1-value" halType="s32"/>
        </pdo>
        <pdo idx="1a02">
          <!--AI TxPDO-Map Standard Ch.2-->
          <pdoEntry idx="6010" subIdx="01" bitLen="1" halPin="ch-2-underrange" halType="bit"/>
          <pdoEntry idx="6010" subIdx="02" bitLen="1" halPin="ch-2-overrange" halType="bit"/>
          <pdoEntry idx="6010" subIdx="03" bitLen="2" halPin="ch-2-limit-1" halType="bit"/>
          <pdoEntry idx="6010" subIdx="05" bitLen="2" halPin="ch-2-limit-2" halType="bit"/>
          <pdoEntry idx="6010" subIdx="07" bitLen="1" halPin="ch-2-error" halType="bit"/>
          <pdoEntry idx="6010" subIdx="0e" bitLen="1" halPin="ch-2-sync-error" halType="bit"/>
          <pdoEntry idx="6010" subIdx="0f" bitLen="1" halPin="ch-2-txpdo-state" halType="bit"/>
          <pdoEntry idx="6010" subIdx="10" bitLen="1" halPin="ch-2-txpdo-toggle" halType="bit"/>
          <pdoEntry idx="6010" subIdx="11" bitLen="16" halPin="ch-2-value" halType="s32"/>
        </pdo>
      </syncManager>
    </slave>
    <slave idx="28" type="generic" vid="0x00000002" pid="0x0ea04052" name="D29">
      <!--EP3744-0041 5K. Absolutdruck 6K. Dig. Eingang 10us 2K. Dig. Aus-->
      <syncManager idx="0" dir="in"/>
      <syncManager idx="1" dir="out"/>
      <syncManager idx="2" dir="out">
        <pdo idx="1600">
          <!--DIG RxPDO-Map Outputs-->
          <pdoEntry idx="7010" subIdx="01" bitLen="1" halPin="output-1" halType="bit"/>
          <pdoEntry idx="7010" subIdx="02" bitLen="1" halPin="output-2" halType="bit"/>
        </pdo>
        <pdo idx="1601">
          <!--DEV RxPDO-Map Outputs Device-->
          <pdoEntry idx="f700" subIdx="01" bitLen="1" halPin="set-safe-state" halType="bit"/>
        </pdo>
      </syncManager>
      <syncManager idx="3" dir="in">
        <pdo idx="1a00">
          <!--DIG TxPDO-Map Inputs-->
          <pdoEntry idx="6000" subIdx="01" bitLen="1" halPin="input-1" halType="bit"/>
          <pdoEntry idx="6000" subIdx="02" bitLen="1" halPin="input-2" halType="bit"/>
          <pdoEntry idx="6000" subIdx="03" bitLen="1" halPin="input-3" halType="bit"/>
          <pdoEntry idx="6000" subIdx="04" bitLen="1" halPin="input-4" halType="bit"/>
          <pdoEntry idx="6000" subIdx="05" bitLen="1" halPin="input-5" halType="bit"/>
          <pdoEntry idx="6000" subIdx="06" bitLen="1" halPin="input-6" halType="bit"/>
        </pdo>
        <pdo idx="1a01">
          <!--AI TxPDO-Map Inputs Ch.1-->
          <pdoEntry idx="6020" subIdx="01" bitLen="1" halPin="ch-1-underrange" halType="bit"/>
          <pdoEntry idx="6020" subIdx="02" bitLen="1" halPin="ch-1-overrange" halType="bit"/>
          <pdoEntry idx="6020" subIdx="03" bitLen="2" halPin="ch-1-limit-1" halType="bit"/>
          <pdoEntry idx="6020" subIdx="05" bitLen="2" halPin="ch-1-limit-2" halType="bit"/>
          <pdoEntry idx="6020" subIdx="07" bitLen="1" halPin="ch-1-error" halType="bit"/>
          <pdoEntry idx="6020" subIdx="0f" bitLen="1" halPin="ch-1-txpdo-state" halType="bit"/>
          <pdoEntry idx="6020" subIdx="10" bitLen="1" halPin="ch-1-txpdo-toggle" halType="bit"/>
          <pdoEntry idx="6020" subIdx="11" bitLen="32" halPin="ch-1-value" halType="s32"/>
        </pdo>
        <pdo idx="1a02">
          <!--AI TxPDO-Map Inputs Ch.2-->
          <pdoEntry idx="6030" subIdx="01" bitLen="1" halPin="ch-2-underrange" halType="bit"/>
          <pdoEntry idx="6030" subIdx="02" bitLen="1" halPin="ch-2-overrange" halType="bit"/>
          <pdoEntry idx="6030" subIdx="03" bitLen="2" halPin="ch-2-limit-1" halType="bit"/>
          <pdoEntry idx="6030" subIdx="05" bitLen="2" halPin="ch-2-limit-2" halType="bit"/>
          <pdoEntry idx="6030" subIdx="07" bitLen="1" halPin="ch-2-error" halType="bit"/>
          <pdoEntry idx="6030" subIdx="0f" bitLen="1" halPin="ch-2-txpdo-state" halType="bit"/>
          <pdoEntry idx="6030" subIdx="10" bitLen="1" halPin="ch-2-txpdo-toggle" halType="bit"/>
          <pdoEntry idx="6030" subIdx="11" bitLen="32" halPin="ch-2-value" halType="s32"/>
        </pdo>
        <pdo idx="1a03">
          <!--AI TxPDO-Map Inputs Ch.3-->
          <pdoEntry idx="6040" subIdx="01" bitLen="1" halPin="ch-3-underrange" halType="bit"/>
          <pdoEntry idx="6040" subIdx="02" bitLen="1" halPin="ch-3-overrange" halType="bit"/>
          <pdoEntry idx="6040" subIdx="03" bitLen="2" halPin="ch-3-limit-1" halType="bit"/>
          <pdoEntry idx="6040" subIdx="05" bitLen="2" halPin="ch-3-limit-2" halType="bit"/>
          <pdoEntry idx="6040" subIdx="07" bitLen="1" halPin="ch-3-error" halType="bit"/>
          <pdoEntry idx="6040" subIdx="0f" bitLen="1" halPin="ch-3-txpdo-state" halType="bit"/>
          <pdoEntry idx="6040" subIdx="10" bitLen="1" halPin="ch-3-txpdo-toggle" halType="bit"/>
          <pdoEntry idx="6040" subIdx="11" bitLen="32" halPin="ch-3-value" halType="s32"/>
        </pdo>
        <pdo idx="1a04">
          <!--AI TxPDO-Map Inputs Ch.4-->
          <pdoEntry idx="6050" subIdx="01" bitLen="1" halPin="ch-4-underrange" halType="bit"/>
          <pdoEntry idx="6050" subIdx="02" bitLen="1" halPin="ch-4-overrange" halType="bit"/>
          <pdoEntry idx="6050" subIdx="03" bitLen="2" halPin="ch-4-limit-1" halType="bit"/>
          <pdoEntry idx="6050" subIdx="05" bitLen="2" halPin="ch-4-limit-2" halType="bit"/>
          <pdoEntry idx="6050" subIdx="07" bitLen="1" halPin="ch-4-error" halType="bit"/>
          <pdoEntry idx="6050" subIdx="0f" bitLen="1" halPin="ch-4-txpdo-state" halType="bit"/>
          <pdoEntry idx="6050" subIdx="10" bitLen="1" halPin="ch-4-txpdo-toggle" halType="bit"/>
          <pdoEntry idx="6050" subIdx="11" bitLen="32" halPin="ch-4-value" halType="s32"/>
        </pdo>
        <pdo idx="1a05">
          <!--DEV TxPDO-Map Inputs Device-->
          <pdoEntry idx="f600" subIdx="01" bitLen="1" halPin="safe-state-active" halType="bit"/>
          <pdoEntry idx="f600" subIdx="0e" bitLen="1" halPin="sync-error" halType="bit"/>
          <pdoEntry idx="f611" subIdx="01" bitLen="1" halPin="undervoltage-us-" halType="bit"/>
          <pdoEntry idx="f611" subIdx="02" bitLen="1" halPin="undervoltage-up" halType="bit"/>
          <pdoEntry idx="f611" subIdx="10" bitLen="1" halPin="device-txpdo-toggle" halType="bit"/>
        </pdo>
      </syncManager>
    </slave>

Then I copied those into my .xml file and restarted my test machine:
     8  bit   OUT         FALSE  lcec.0.D28.ch-1-error
     8  bit   OUT         FALSE  lcec.0.D28.ch-1-limit-1-0
     8  bit   OUT         FALSE  lcec.0.D28.ch-1-limit-1-1
     8  bit   OUT         FALSE  lcec.0.D28.ch-1-limit-2-0
     8  bit   OUT         FALSE  lcec.0.D28.ch-1-limit-2-1
     8  bit   OUT         FALSE  lcec.0.D28.ch-1-overrange
     8  bit   OUT         FALSE  lcec.0.D28.ch-1-sync-error
     8  bit   OUT         FALSE  lcec.0.D28.ch-1-txpdo-state
     8  bit   OUT          TRUE  lcec.0.D28.ch-1-txpdo-toggle
     8  bit   OUT         FALSE  lcec.0.D28.ch-1-underrange
     8  s32   OUT             4  lcec.0.D28.ch-1-value
     8  bit   OUT         FALSE  lcec.0.D28.ch-2-error
     8  bit   OUT         FALSE  lcec.0.D28.ch-2-limit-1-0
     8  bit   OUT         FALSE  lcec.0.D28.ch-2-limit-1-1
     8  bit   OUT         FALSE  lcec.0.D28.ch-2-limit-2-0
     8  bit   OUT         FALSE  lcec.0.D28.ch-2-limit-2-1
     8  bit   OUT         FALSE  lcec.0.D28.ch-2-overrange
     8  bit   OUT         FALSE  lcec.0.D28.ch-2-sync-error
     8  bit   OUT         FALSE  lcec.0.D28.ch-2-txpdo-state
     8  bit   OUT          TRUE  lcec.0.D28.ch-2-txpdo-toggle
     8  bit   OUT         FALSE  lcec.0.D28.ch-2-underrange
     8  s32   OUT             6  lcec.0.D28.ch-2-value
     8  s32   IN              0  lcec.0.D28.ch-3-analog-output
     8  s32   IN              0  lcec.0.D28.ch-4-analog-output
     8  bit   OUT          TRUE  lcec.0.D28.slave-online
     8  bit   OUT          TRUE  lcec.0.D28.slave-oper
     8  bit   OUT         FALSE  lcec.0.D28.slave-state-init
     8  bit   OUT          TRUE  lcec.0.D28.slave-state-op
     8  bit   OUT         FALSE  lcec.0.D28.slave-state-preop
     8  bit   OUT         FALSE  lcec.0.D28.slave-state-safeop
     8  bit   OUT         FALSE  lcec.0.D29.ch-1-error
     8  bit   OUT         FALSE  lcec.0.D29.ch-1-limit-1-0
     8  bit   OUT         FALSE  lcec.0.D29.ch-1-limit-1-1
     8  bit   OUT         FALSE  lcec.0.D29.ch-1-limit-2-0
     8  bit   OUT         FALSE  lcec.0.D29.ch-1-limit-2-1
     8  bit   OUT         FALSE  lcec.0.D29.ch-1-overrange
     8  bit   OUT         FALSE  lcec.0.D29.ch-1-txpdo-state
     8  bit   OUT         FALSE  lcec.0.D29.ch-1-txpdo-toggle
     8  bit   OUT         FALSE  lcec.0.D29.ch-1-underrange
     8  s32   OUT            -2  lcec.0.D29.ch-1-value
     8  bit   OUT         FALSE  lcec.0.D29.ch-2-error
     8  bit   OUT         FALSE  lcec.0.D29.ch-2-limit-1-0
     8  bit   OUT         FALSE  lcec.0.D29.ch-2-limit-1-1
     8  bit   OUT         FALSE  lcec.0.D29.ch-2-limit-2-0
     8  bit   OUT         FALSE  lcec.0.D29.ch-2-limit-2-1
     8  bit   OUT         FALSE  lcec.0.D29.ch-2-overrange
     8  bit   OUT         FALSE  lcec.0.D29.ch-2-txpdo-state
     8  bit   OUT          TRUE  lcec.0.D29.ch-2-txpdo-toggle
     8  bit   OUT         FALSE  lcec.0.D29.ch-2-underrange
     8  s32   OUT            -2  lcec.0.D29.ch-2-value
     8  bit   OUT         FALSE  lcec.0.D29.ch-3-error
     8  bit   OUT         FALSE  lcec.0.D29.ch-3-limit-1-0
     8  bit   OUT         FALSE  lcec.0.D29.ch-3-limit-1-1
     8  bit   OUT         FALSE  lcec.0.D29.ch-3-limit-2-0
     8  bit   OUT         FALSE  lcec.0.D29.ch-3-limit-2-1
     8  bit   OUT         FALSE  lcec.0.D29.ch-3-overrange
     8  bit   OUT         FALSE  lcec.0.D29.ch-3-txpdo-state
     8  bit   OUT         FALSE  lcec.0.D29.ch-3-txpdo-toggle
     8  bit   OUT         FALSE  lcec.0.D29.ch-3-underrange
     8  s32   OUT            -1  lcec.0.D29.ch-3-value
     8  bit   OUT         FALSE  lcec.0.D29.ch-4-error
     8  bit   OUT         FALSE  lcec.0.D29.ch-4-limit-1-0
     8  bit   OUT         FALSE  lcec.0.D29.ch-4-limit-1-1
     8  bit   OUT         FALSE  lcec.0.D29.ch-4-limit-2-0
     8  bit   OUT         FALSE  lcec.0.D29.ch-4-limit-2-1
     8  bit   OUT         FALSE  lcec.0.D29.ch-4-overrange
     8  bit   OUT         FALSE  lcec.0.D29.ch-4-txpdo-state
     8  bit   OUT         FALSE  lcec.0.D29.ch-4-txpdo-toggle
     8  bit   OUT         FALSE  lcec.0.D29.ch-4-underrange
     8  s32   OUT             0  lcec.0.D29.ch-4-value
     8  bit   OUT         FALSE  lcec.0.D29.device-txpdo-toggle
     8  bit   OUT         FALSE  lcec.0.D29.input-1
     8  bit   OUT         FALSE  lcec.0.D29.input-2
     8  bit   OUT         FALSE  lcec.0.D29.input-3
     8  bit   OUT         FALSE  lcec.0.D29.input-4
     8  bit   OUT         FALSE  lcec.0.D29.input-5
     8  bit   OUT         FALSE  lcec.0.D29.input-6
     8  bit   IN          FALSE  lcec.0.D29.output-1
     8  bit   IN          FALSE  lcec.0.D29.output-2
     8  bit   OUT         FALSE  lcec.0.D29.safe-state-active
     8  bit   IN          FALSE  lcec.0.D29.set-safe-state
     8  bit   OUT          TRUE  lcec.0.D29.slave-online
     8  bit   OUT          TRUE  lcec.0.D29.slave-oper
     8  bit   OUT         FALSE  lcec.0.D29.slave-state-init
     8  bit   OUT          TRUE  lcec.0.D29.slave-state-op
     8  bit   OUT         FALSE  lcec.0.D29.slave-state-preop
     8  bit   OUT         FALSE  lcec.0.D29.slave-state-safeop
     8  bit   OUT         FALSE  lcec.0.D29.sync-error
     8  bit   OUT         FALSE  lcec.0.D29.undervoltage-up
     8  bit   OUT         FALSE  lcec.0.D29.undervoltage-us-

Ideal? No. The naming's weird, to start with. But I think it's close enough to be usable.
The following user(s) said Thank You: rodw, besriworld

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

More
27 Feb 2024 09:35 #294587 by rodw
Very cool. I just got no time right now to play....

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

More
27 Feb 2024 14:49 #294605 by RDA
You really do a great job on all of this, much appreciated!

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

More
30 Mar 2024 05:00 #297193 by xu
sir, how to use lcec_taggen

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

More
02 Apr 2024 20:53 #297467 by scottlaird
I'm not sure if this is a translation problem or not, but just install a current LinuxCNC-Ethercat and run 'lcec-configgen'. It'll print a config to the screen.

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

Time to create page: 0.085 seconds
Powered by Kunena Forum