<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font size="-1">Hallo all,<br>
      I'm testing a setup with 3 modules, EL1018 (input) EL2008 (output)
      and a EL5151-0021 (encoder).<br>
      After succesfull configuring  PDO using information gathered with
      "ethercat cstruct" command (see pdo_entry struct below) ,<br>
      when I  write to digital output with <br>
      EC_WRITE_U8(domain1_pd + off_dig_out, outval);<br>
      it doesn't work!<br>
      meanwhile EL1018 end El5151 work correctly.<br>
      If I leave EL5151 unconfigured  (</font><font size="-1"><font
        size="-1">USE_ENC21 undefined)</font>  EL2008 works properly.<br>
      What I noted is in the output of "ethercat domains --verbose" the 
      digital output slave has size  14<br>
      while it should be equal to 1 <br>
      <br>
      Can anyone help me?<br>
      Thanks<br>
      Mirco<br>
      <br>
      #ethercat domains --verbose<br>
      Domain0: LogBaseAddr 0x00000000, Size  47, WorkingCounter 4/6<br>
        SlaveConfig 0:1, SM2 (Output), LogAddr 0x00000000, Size 14<br>
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 <br>
        SlaveConfig 0:1, SM3 ( Input), LogAddr 0x0000000e, Size 18<br>
          00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <br>
          00 00 <br>
        SlaveConfig 0:2, SM0 ( Input), LogAddr 0x00000020, Size 1<br>
          00 <br>
        SlaveConfig 0:3, SM2 (Output), LogAddr 0x00000021, Size 14<br>
          20 00 00 00 00 00 00 00 00 00 00 00 00 00 <br>
      #ethercat domains --verbose<br>
      Domain0: LogBaseAddr 0x00000000, Size   2, WorkingCounter 3/3<br>
        SlaveConfig 0:2, SM0 ( Input), LogAddr 0x00000000, Size 1<br>
          00 <br>
        SlaveConfig 0:3, SM0 (Output), LogAddr 0x00000001, Size 1<br>
          00 <br>
      <br>
      <br>
      <br>
      const static ec_pdo_entry_reg_t domain1_regs[] = {<br>
      #ifdef USE_ENC21<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x7000, 0x1,
      &offw_5151_ctrl, &bit_enable_latchC}, 
      //EC_WRITE_BIT(DATA, POS, VAL)<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x7000, 0x2,
      &offw_5151_ctrl, &bit_enable_exTlatch_pos},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x7000, 0x3,
      &offw_5151_ctrl, &bit_set_counter},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x7000, 0x4,
      &offw_5151_ctrl, &bit_enable_extlatch_neg},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x7000, 0x5,
      &offw_5151_ctrl, &bit_set_output},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x7000, 0x6,
      &offw_5151_ctrl, &bit_enable_output_func},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x7000, 0x7,
      &offw_5151_ctrl, &bit_enable_measure},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x7000, 0x8,
      &offw_5151_ctrl, &bit_set_counter_on_latchC},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x7000, 0x11,
      &offw_5151_set_counter_value},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x7000, 0x12,
      &offw_5151_set_on_thr_value},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x7000, 0x13,
      &offw_5151_set_off_thr_value},<br>
          <br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x6000, 0x1, 
      &offr_5151_status1, &bit_latchC_valid},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x6000, 0x2, 
      &offr_5151_status1, &bit_exTlatch_valid},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x6000, 0x3, 
      &offr_5151_status1, &bit_set_counter_done},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x6001, 0x2, 
      &offr_5151_status3, &bit_measurement_done},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x6000, 0x9, 
      &offr_5151_status2, &bit_A_status},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x6000, 0xa, 
      &offr_5151_status2, &bit_B_status},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x6000, 0xb, 
      &offr_5151_status2, &bit_C_status},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x6001, 0x1, 
      &offr_5151_status4, &bit_output_status},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x6000, 0xd, 
      &offr_5151_status2, &bit_exTlatch_status},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x6000, 0xe, 
      &offr_5151_status5, &bit_counter_high},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x6000, 0x10, 
      &offr_5151_status6, &bit_txpod_toggle},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x6000, 0x11, 
      &offr_5151_couter_value},<br>
          {EncTrgSlavePos, Beckhoff_EL5151_0021, 0x6000, 0x12, 
      &offr_5151_latch_value},<br>
      #endif<br>
          {DigInSlavePos, Beckhoff_EL1018, 0x6000, 1,
      &off_dig_in,NULL},<br>
          {DigOutSlavePos, Beckhoff_EL2008, 0x7000, 1,
      &off_dig_out,NULL},<br>
          {}<br>
      };<br>
    </font>
  </body>
</html>