Input Description

../_images/660bdf9a40db08680a33139000d75d3e

EN (enable)

Data_Type Default_Value Range Unit
BOOL - - -

In order to enable the function block processing, input EN has to be continuously set to TRUE. The function block is not processed if input EN = FALSE. While input is set to TRUE, the inputs are continuously checked for validity and plausibility. If this is not the case, processing is aborted and an error is displayed.

SLOT

Data_Type Default_Value Range Unit
BYTE 0 - -

The input parameter SLOT chooses the ETHERCAT Communication Module to be queried. The slots are numbered from right to left. Slot number 1 is the one beside the CPU.

LEN (length)

Data_Type Default_Value Range Unit
WORD 0 1…65535 byte

LEN tells the function block how large the buffer in SLV_STATE is. For each slave 4 bytes are needed.

SLV_STATE (slave \ state)

Data_Type Default_Value Range Unit
POINTER_TO_ARRAY_OF_BYTE 0 - -

The address of the buffer is required in order to write the state of each slave. The size of the buffer is directly related to the number of slaves. A byte for each slave is needed. In case the buffer is too small, an error will be returned. If the value of LEN does not reflect correctly the size of the buffer, this might be overrun with unpredictable consequences.

Example

A master is configured with 20 slaves.

LEN and SLV_STATE should be configured as follows.

ECATBusDiag_LEN := 20;

ECATBusDiag_SLV_STATE: ARRAY [1..20] of BYTE;