Configuring Init Commands
This topic contains the following sections:
- General information on init commands
- Modifying the value an init command writes
- Modifying further properties of init commands manually
- Deleting init commands
- Adding new init commands manually
General information on init commands
Init commands are used to configure EtherCAT slaves during the start sequence and set them to the desired operating state so that all slaves work correctly and are ready for real-time communication.
Init commands are automatically loaded from the EtherCAT slave information (ESI) file of a slave.
Init commands are used to perform the following operations:- Writing configuration data or reading status information from the CoE Object Dictionary. By setting slave parameters, the slave is initialized with specific configuration values. This includes, for example, selecting an operating mode or setting communication or synchronization parameters (e.g. cycle times).
- Changing the (pre-defined) PDO mapping for the slave (e.g. by activating/deactivating or modifying PDOs).
- Synchronization of the clocks of all EtherCAT slaves (DC configuration).
- Transferring files, e.g. firmware updates or configuration files (FoE commands).
- Set the slave to a defined state, i.e. switch it stepwise through the EtherCAT states (INIT > PRE-OP > SAFE-OP > OP).
- Check the operational readiness of the slave by querying certain device parameters and verify that the slave is responding correctly.
By using appropriate init commands for all slaves in an EtherCAT network, all devices can be set to consistent settings.
In addition to the init commands that are manufacturer-predefined in the ESI file of a slave, init commands are automatically generated and added to the list or existing values are changed in the following cases:- After a write access to CoE objects if the written value does not correspond to the default value of the object. This happens after editing an object value in the 'CoE Data' editor (refer to the example below).
- After editing the mapping the 'PDO Data' editor.
- After editing the DC configuration in the Distributed Clock' editor of the slave.
| Further Info
The structure of the editor is described in the topic "'Init Command' Editor (EtherCAT Slave Device)". |
You also have the option of editing existing init commands or adding new ones.
Modifying the value an init command writes
| Note
Note that the following operation is only possible if it is allowed by the slave. This is indicated by the 'Access' flag RW in the last column. |
- Select the command to be edited in the grid.
- Enter the desired value (in decimal or hexadecimal format) into the field below the grid and select the input format with the buttons provided.
- Click 'Apply'.
Modifying further properties of init commands manually
| Note
Note that the following operation is only possible if it is allowed by the slave. This is indicated by the 'Access' flag RW in the last column. |
- Open the properties of the init command to be edited.
For that purpose double-click on the respective table row header or select the table row and click the
icon on the editor toolbar.The 'Edit Init Command' dialog box appears. - In the 'General' section, the object is described which is currently accessed by the init command.The 'CoE Data' list in the lower half of the dialog box shows the selectable objects the slave provides.The following steps are optional.
- To replace the current object by another one, select the object in the 'CoE Data' list. The object is then entered into the 'General' section.
- Specify the 'Value', the command should write to the object. Note that this is only possible if the object provides write access.
- Enter a descriptive 'Comment' on the init command, if desired.
- Select the state 'Transition' with which the command is to be executed.
Further Info
Information on the state transitions can be found in the topic "EtherCAT State Machine". - If required, activate the required checkbox in the 'Further settings' section:
Parameter Description Complete access If activated, the Init Command stream contains the data for all subindexes, instead of creating one command for each subindex. In that case, the subindex is set to the fixed value '0'. Validate value This flag can be set for init commands that read data from a slave. - If activated, an init command value can be configured.
- If deactivated, the init command value field is disabled.
Direction Defines the data transfer direction of the object value: - Write to slave
- Read from slave
- Click the 'Apply' button
- Click 'Ok' to close the 'Edit Init Command' dialog box.
Deleting init commands
| Note
Note that the following operation is only possible if it is allowed by the slave. This is indicated by the 'Access' flag RW in the last column. |
Adding new init commands manually
| Note
Note that the following operation is only possible if it is allowed by the slave. |
- Click the
icon on the editor toolbar to open the 'Add new Init Command' dialog box. - The 'CoE Data' list in the lower half of the dialog box shows the selectable objects the slave provides.Select the object in the 'CoE Data' list. The object is then entered into the 'General' section.
- Specify the 'Value', the command should write to the object. Note that this is only possible if the object provides write access.
- Enter a descriptive 'Comment' on the init command, if desired.
- Select the state 'Transition' with which the command is to be executed.
Further Info
Information on the state transitions can be found in the topic "EtherCAT State Machine". - If required, activate the required checkbox in the 'Further settings' section:
Parameter Description Complete access If activated, the Init Command stream contains the data for all subindexes, instead of creating one command for each subindex. In that case, the subindex is set to the fixed value '0'. Validate value This flag can be set for init commands that read data from a slave. - If activated, an init command value can be configured.
- If deactivated, the init command value field is disabled.
Direction Defines the data transfer direction of the object value: - Write to slave
- Read from slave
- Click the 'Apply' button
- Click 'Ok' to close the 'Add new Init Command' dialog box.
