Address assignment
Before the EtherCAT master in the modular machine configuration can switch to the operating mode "RUN_[...]" each EtherCAT slave has to be assigned a "Second Station Address" (alias address). For this purpose, the function block L_ETC_MMCController offers the services "ADDR_ASSIGNMENT_EXTERNALLY" and "ADDR_ASSIGNMENT_CONFIG_SLAVEORDER".
For all address assignment services, the EtherCAT master reads out the relevant information from the slaves to create a temporary configuration and sets the slaves to the "Pre-Operational" state. For this purpose, the master assigns the addresses for the slaves connected in ascending order starting with "1". Thus, the address is identical to the position of the slave in the network.
ADDR_ASSIGNMENT_EXTERNALLY service
For this service, the "Second Station Address" (alias address) can be assigned manually from the PLC application (e.g. via a visualization). This service provides the CoE function blocks. Parameters such as vendor ID, product code, revision, and serial number can be read out from the slave or parameters can be described for "Optical Tracking". If a slave has been clearly identified and assigned, the L_ETC_MMCAssignAddress function block can be used to write the address to the slave.
ADDR_ASSIGNMENT_CONFIG_SLAVEORDER service
For this service, the "Second Station Address" (alias address) is automatically assigned. For this purpose, a configuration has to be specified, e.g. via the machine configuration file "mmc-0-conf.csv". Based on the configuration, the EtherCAT master receives information on which slaves are to be expected at the bus. If the slaves are actually available, the "Second Station Address" is written to the slaves. Here, in addition to the vendor ID and product code, the current ascending order of the slaves at the bus is important.