Slave

A data type “ETCSlave” instance is generated for each EtherCAT slave added to the project. The instance name corresponds to the name of the slave in the project. The slave instance is used in the application to poll and/or switch the slave status.

Inputs (Slave)

Name

Data Type

Description

xSetOperational

BOOL

Rising edge: An attempt is made to switch to ETC_SLAVE_ OPERATIONAL mode.

Outputs (Slave)

Name

Data Type

Description

wState

ETC_SLAVE_STATE

Current status of the slave:
• 0: ETC_SLAVE_BOOT
• 1: ETC_SLAVE_Init
• 2: ETC_SLAVE_PREOPERATIONAL
• 4: ETC_SLAVE_SAVEOPERATIONAL
• 8: ETC_SLAVE_OPERATIONAL
• Configuration completed successfully.
If errors occur during configuration, the slave can revert to an earlier state.

Properties of the Slave

Parameter

Description

VendorID

After the EtherCAT stack is started, this property returns the manufacturer ID read from the device.

ConfigVendorID

Reads the manufacturer ID from the configuration.

ProductID

After the EtherCAT stack is started, this property returns the product ID read from the device.

ConfigProductID

Reads the product ID from the configuration.

SerialID

After the EtherCAT stack is started, this property contains the device serial number.

LastEmergency

When a message is received, this information is saved in the slave and can be requested by the application via this property. A log report is also added.

If the check of the manufacturer or product IDs is activated in the expert settings, stack startup is stopped as soon as any discrepancies between VendorID and ConfigVendorID or between ProductID and ConfigProductID are determined.