<masters>
  <master idx="0" appTimePeriod="1000000" refClockSyncCycles="-1">

    <!-- EK1100 Coupler -->
    <slave idx="0" type="EK1100" name="EK1100" />

    <!-- EL2809 Digital Outputs (on bus; not wired in cia402.hal) -->
    <slave idx="1" type="EL2809" name="EL2809" />

    <!-- EL1819 Digital Inputs (on bus; home-switch nets commented out in cia402.hal) -->
    <slave idx="2" type="EL1819" name="EL1819" />

    <!-- Servo Drive A (X) - homing via sdoConfig, not cyclic PDO -->
    <slave idx="3" type="generic" vid="0x00400000" pid="0x00000715" configPdos="true">
      <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="300000"/>
      <watchdog divider="2498" intervals="1000" />
      <sdoConfig idx="2004" subIdx="0a"><sdoDataRaw data="01 00"/></sdoConfig>
      <syncManager idx="2" dir="out">
          <pdo idx="1600">
              <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="control-word" halType="u32" />
              <pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="control-mode" halType="s32" />
              <pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32" />
              <pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
              <pdoEntry idx="607C" subIdx="00" bitLen="32" halPin="home-offset" halType="s32"/>
              <pdoEntry idx="6098" subIdx="00" bitLen="8" halPin="homing-method" halType="s32" />
              <pdoEntry idx="6099" subIdx="01" bitLen="32" halPin="homing-high-velocity" halType="u32"/>
              <pdoEntry idx="6099" subIdx="02" bitLen="32" halPin="homing-low-velocity" halType="u32"/>
              <pdoEntry idx="609A" subIdx="00" bitLen="32" halPin="homing-acceleration" halType="u32"/>
          </pdo>
      </syncManager>
      <syncManager idx="3" dir="in">
          <pdo idx="1A00">
              <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="status-word" halType="u32" />
              <pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="mode-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="16" halPin="actual-torque" halType="s32"/>
              <pdoEntry idx="60FD" subIdx="00" bitLen="32" halPin="digital-inputs" halType="u32"/>

              <pdoEntry idx="2040" subIdx="05" bitLen="16" halType="complex">
                <complexEntry bitLen="1" halPin="di-1" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-2" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-3" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-4" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-5" halType="bit"/>
                <complexEntry bitLen="11"/>
              </pdoEntry>
          </pdo>
      </syncManager>
    </slave>

    <!-- Servo Drive B (Y1) -->
    <slave idx="4" type="generic" vid="0x00400000" pid="0x00000715" configPdos="true">
      <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="300000"/>
      <watchdog divider="2498" intervals="1000" />
      <sdoConfig idx="2004" subIdx="0a"><sdoDataRaw data="01 00"/></sdoConfig>
      <syncManager idx="2" dir="out">
          <pdo idx="1600">
              <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="control-word" halType="u32" />
              <pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="control-mode" halType="s32" />
              <pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32" />
              <pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
              <pdoEntry idx="607C" subIdx="00" bitLen="32" halPin="home-offset" halType="s32"/>
              <pdoEntry idx="6098" subIdx="00" bitLen="8" halPin="homing-method" halType="s32" />
              <pdoEntry idx="6099" subIdx="01" bitLen="32" halPin="homing-high-velocity" halType="u32"/>
              <pdoEntry idx="6099" subIdx="02" bitLen="32" halPin="homing-low-velocity" halType="u32"/>
              <pdoEntry idx="609A" subIdx="00" bitLen="32" halPin="homing-acceleration" halType="u32"/>
          </pdo>
      </syncManager>
      <syncManager idx="3" dir="in">
          <pdo idx="1A00">
              <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="status-word" halType="u32" />
              <pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="mode-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="16" halPin="actual-torque" halType="s32"/>

              <pdoEntry idx="2040" subIdx="05" bitLen="16" halType="complex">
                <complexEntry bitLen="1" halPin="di-1" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-2" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-3" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-4" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-5" halType="bit"/>
                <complexEntry bitLen="11"/>
              </pdoEntry>
          </pdo>
      </syncManager>
    </slave>

    <!-- Servo Drive C (Y2) -->
    <slave idx="5" type="generic" vid="0x00400000" pid="0x00000715" configPdos="true">
      <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="300000"/>
      <watchdog divider="2498" intervals="1000" />
      <sdoConfig idx="2004" subIdx="0a"><sdoDataRaw data="01 00"/></sdoConfig>
      <syncManager idx="2" dir="out">
          <pdo idx="1600">
              <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="control-word" halType="u32" />
              <pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="control-mode" halType="s32" />
              <pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32" />
              <pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
              <pdoEntry idx="607C" subIdx="00" bitLen="32" halPin="home-offset" halType="s32"/>
              <pdoEntry idx="6098" subIdx="00" bitLen="8" halPin="homing-method" halType="s32" />
              <pdoEntry idx="6099" subIdx="01" bitLen="32" halPin="homing-high-velocity" halType="u32"/>
              <pdoEntry idx="6099" subIdx="02" bitLen="32" halPin="homing-low-velocity" halType="u32"/>
              <pdoEntry idx="609A" subIdx="00" bitLen="32" halPin="homing-acceleration" halType="u32"/>
          </pdo>
      </syncManager>
      <syncManager idx="3" dir="in">
          <pdo idx="1A00">
              <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="status-word" halType="u32" />
              <pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="mode-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="16" halPin="actual-torque" halType="s32"/>

              <pdoEntry idx="2040" subIdx="05" bitLen="16" halType="complex">
                <complexEntry bitLen="1" halPin="di-1" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-2" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-3" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-4" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-5" halType="bit"/>
                <complexEntry bitLen="11"/>
              </pdoEntry>
          </pdo>
      </syncManager>
    </slave>

    <!-- Servo Drive D (Z) -->
    <slave idx="6" type="generic" vid="0x00400000" pid="0x00000715" configPdos="true">
      <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="300000"/>
      <watchdog divider="2498" intervals="1000" />
      <sdoConfig idx="2004" subIdx="0a"><sdoDataRaw data="01 00"/></sdoConfig>
      <syncManager idx="2" dir="out">
          <pdo idx="1600">
              <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="control-word" halType="u32" />
              <pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="control-mode" halType="s32" />
              <pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32" />
              <pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
              <pdoEntry idx="607C" subIdx="00" bitLen="32" halPin="home-offset" halType="s32"/>
              <pdoEntry idx="6098" subIdx="00" bitLen="8" halPin="homing-method" halType="s32" />
              <pdoEntry idx="6099" subIdx="01" bitLen="32" halPin="homing-high-velocity" halType="u32"/>
              <pdoEntry idx="6099" subIdx="02" bitLen="32" halPin="homing-low-velocity" halType="u32"/>
              <pdoEntry idx="609A" subIdx="00" bitLen="32" halPin="homing-acceleration" halType="u32"/>
          </pdo>
      </syncManager>
      <syncManager idx="3" dir="in">
          <pdo idx="1A00">
              <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="status-word" halType="u32" />
              <pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="mode-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="16" halPin="actual-torque" halType="s32"/>

              <pdoEntry idx="2040" subIdx="05" bitLen="16" halType="complex">
                <complexEntry bitLen="1" halPin="di-1" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-2" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-3" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-4" halType="bit"/>
                <complexEntry bitLen="1" halPin="di-5" halType="bit"/>
                <complexEntry bitLen="11"/>
              </pdoEntry>
          </pdo>
      </syncManager>
    </slave>

  </master>
</masters>
