The Xentara EtherCAT Driver v1.2
User Manual
Bus
See also
I/O Components in the Xentara user manual, Device

Description

EtherCAT is a master/slave protocol, which means that a network is connected by one master device and multiple slave devices. The master device sends one standard Ethernet frame per cycle, which encapsulates multiple EtherCAT datagrams.

The Xentara EtherCAT Bus object acts as the EtherCAT master and controls all the Xentara EtherCAT Device objects.

EtherCAT States And Its Identifier

Based on the EtherCAT state machine, the Bus manages the state of the Device. The Xentara EtherCAT Bus sends the specific commands to the device in each state. Various functions in the EtherCAT slave are accessible or executable depending on the state. The specification also assigns an integer value to each of the state machine's states. The states and their corresponding values are as follows:

  • 0: None State (Pseudo State)
  • 1: Init State
  • 2: PreOperational State
  • 3: Boot State
  • 4: Safe Operational State
  • 8: Operational State

Scheduling Task

See also
Scheduling Tasks, Tasks in the Xentara user manual

The Xentara EtherCAT Bus object provide task known as loop that can be inserted into a Xentara execution pipeline. The loop task follows the Operational Stages of Xentara. That means, the Xentara EtherCAT Bus will not proceed to xentara operational stage until all devices have reached the ethercat operational state of EtherCAT state machine. There is also a parameter in the configuration file called stateChangeAttempts that allows you to specify the maximum number of attempts to set the devices to a specific target state. If the devices do not reach the target state within the maximum number of attempts, the Operational Stages will advance and will no longer be pending. The corresponding error will be displayed on the error attribute of the bus or devices causing the issue.

Task
loopSends and receives the EtherCAT frame across the network.

Reconnect

During real-time operation, the Xentara EtherCAT Bus also attempts to repair the state of the Device if an error occurs. Based on the working counter, the Bus detects and attempts to correct any errors in the exchange of information between master and slaves (devices). There is also a built-in reconnect feature for replacing the system or modules while it is running. The modules or system architecture, however, should not deviate from the structure specified in the xentara json model configuration file.

Accessing Bus

See also
Accessing Xentara Elements in the Xentara user manual

In addition to the standard members of Xentara I/O Component, Bus have the following attributes:

Attributes
interfaceThe name of the interface (NIC) where EtherCAT devices are connected.
errorThe error that occurred the last time the EtherCAT frame was sent. The attribute contains one of the error listed in EtherCAT Driver Error.
updateTimeThe last time the EtherCat frame was updated.
etherCatState

The state of the EtherCAT bus. The values can be seen below.

EtherCAT
State
Identifier
None State (Pseudo State) 0
Init State 1
PreOperational State 2
Boot State 3
Safe Operational State 4
Operational State 8
None + Error State 10
Init + Error State 11
PreOperational
+ Error State
12
Safe Operational
+ Error State
14
Operational +
Error State
18