Versions Compared

Key

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

...

The simple demo part starts (AppECS_DemoApplication.c) with initializing a packet handler (AppECSSimpleDemo_Initialize) for incomming packets. Actually only HIL_LINK_STATUS_CHANGE_IND (selfexpaining) and ECAT_ESM_ALSTATUS_CHANGED_IND (actual slave state). The function AppECSSimpleDemo_Setup sends the configuration request and afterwards the channel is initialized (App_SysPkt_AssembleChannelInitReq) which means to apply the configurtion data. Then the connection to the bus is set switched on by App_SysPkt_AssembleStartStopCommReq. 

...

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



7 Optional

...

Configuration

As an extension to this simple example you can optionally set the define HOST_APPLICATION_SETS_OEM_DATA in AppECS_DemoApplication_Config.h

To use it you have to change an entry of the firmware´s taglist. 

At first set the taglist entry 'DDP mode ..' to passive by using the Tag List Editor Tool from hilscher and save the firmware

Image Added

Than flash it to the device by e.g. using NetxStudio's flasher tool and restart the device to apply the firmware. Now the device will not activate the phys. 

In second step you download the firmware with the define HOST_APPLICATION_SETS_OEM_DATA  compiled in.

Now the function AppECS_SetOemData in the AppECSSimpleDemo_Initialize function is called. This function uses the HIL_DDP_SERVICE_SET_REQ to to send OEM data to the device. Afterwards AppECS_ActivateDdp is called to activate the data in the firmware. The DDP OEM parameters overwrite one value which is also set in the Configuration packet szOrderIdx (DEV_TYPE_INFO) from ECAT_SET_CONFIG_DEVICEINFO. 

8 Using TwinCAT

The following scrennshots give a shot introduction to bring the slave to Operational mode using TwinCAT as a master and configuration tool.

...