EtherCAT

Purpose

Configure the EtherCAT interface of an RT Box

Description

../../_images/ethercat.svg

The EtherCAT block configures the EtherCAT fieldbus interface that is available on RT Box 2 and RT Box 3 with hardware revision 1.2 and later.

Input and output signals can be accessed by CAN over EtherCAT (CoE). Time synchronization over EtherCAT is currently not supported.

The following EtherCAT data types are supported:

EtherCAT data type

PLECS data type

BOOL

bool

SINT

int8

USINT

uint8

INT

int16

UINT

uint16

DINT

int32

UDINT

uint32

REAL

float

LREAL

double

The EC_state output provides the state of the EtherCAT slave as defined in the EtherCAT standard. It is controlled by the EtherCAT master:

EC_state output

EtherCAT state

1

INIT

2

PreOP

4

SafeOP

8

OP

The v output is set to 1 when new valid data has been received via EtherCAT. If no new data was received it remains 0.

An EtherCAT Slave Information (ESI) file needs to be exported from the Parameters dialog of this block. The exported ESI file is in XML format, and can be used for offline configuration of an EtherCAT master.

In case of using TwinCAT, this exported ESI file needs to be placed under a specific folder of the TwinCAT installation where all the descriptions of the other EtherCAT compatible devices are listed (e.g. C:/TwinCAT/3.1/Config/Io/EtherCAT). Afterwards, users need to go inside the TwinCAT 3 software, under tab “TwinCAT”, go to “EtherCAT Devices”, and click “Reload Device Descriptions”.

Parameters

EtherCAT address

The address of the RT box on the EtherCAT bus. This parameter can be used for identifications when multiple RT Boxes are used on the EtherCAT bus.

Inputs, Outputs

Signal specification of the data to be made available on the EtherCAT bus. Each line corresponds to an input or output of the EtherCAT block. The width column specifies the signal width. If it is set to a value greater than 1, the corresponding data is represented as an array in the EtherCAT process data.