Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

KB → Software → LFW Host Examples → EtherCAT Slave

For netX90:

2 ECS Sources

Take the netXStudion to open the projcet. The ECS Sources in the ECS SimepleConfig Example are in the folder:

netXStudio_ECSV5_simpleConfig_V2.1.0.0\netX 90 - EtherCAT Slave - simpleConfig V2.1.0.0\Components\cifXApplicationDemoECS\Sources

Image RemovedImage Added

3 Configuration packet

...

need to be same like in ESI file:

Process Data Values

...

:

Choose the number of Input and Output Bytes and tell this the stack in the configuration packet with

  ptConfigReq->tData.tBasicCfg.ulProcessDataOutputSize = sizeof(APP_PROCESS_DATA_INPUT_T); /**< Process Data Output Size from master view */

  ptConfigReq->tData.tBasicCfg.ulProcessDataInputSize = sizeof(APP_PROCESS_DATA_OUTPUT_T); /**< Process Data Input Size from master view */


Change the number of Bytes for RxPdo (Output) and TxPdo (Input) in the ESI file, like in the configuration packet


<RxPdo Sm="2">

          <Index>#x1600</Index>

          <Name>1. RxPDO</Name>

          <Entry>

            <Index>#x2000</Index>

            <SubIndex>1</SubIndex>

            <BitLen>8</BitLen>

            <Name>1 Byte Out (0)</Name>

            <DataType>BYTE</DataType>

          </Entry>

          <Entry>

            <Index>#x2000</Index>

            <SubIndex>2</SubIndex>

            <BitLen>8</BitLen>

            <Name>1 Byte Out (1)</Name>

            <DataType>BYTE</DataType>

          </Entry>

          ........

<TxPdo Sm="3">

          <Index>#x1A00</Index>

          <Name>1. TxPDO</Name>

          <Entry>

            <Index>#x3000</Index>

            <SubIndex>1</SubIndex>

            <BitLen>8</BitLen>

            <Name>1 Byte In (0)</Name>

            <DataType>BYTE</DataType>

          </Entry>

          <Entry>

            <Index>#x3000</Index>

            <SubIndex>2</SubIndex>

            <BitLen>8</BitLen>

            <Name>1 Byte In (1)</Name>

            <DataType>BYTE</DataType>

          </Entry>

          ........


Example ESI file:

10 Byte Output

6 Byte Input

Hilscher NETX90 RE ECS V5.0.X.xml

5 Start Sequenz

  1. Config Stack
  2. Init Config
  3. Start
  4. Stack is in Init State

...

6 ECM Master

As soon as the ECS Stack in is successfully configurated configured and the Start Comunication Request/ Bus On “Start Communication Request” / “Bus On” is done, the ECS EtherCAT Slave goes in Init State.

The ECS EtherCAT Master need not now needs to bring the ECS EtherCAT Slave from Init State to Operational State (OP).

...