8 syncmanager, Syncmanager, Table 23: syncmanager register overview – BECKHOFF EtherCAT Technology Section I User Manual

Page 61

Advertising
background image

SyncManager

Slave Controller

– Technology

I-41

8

SyncManager

The memory of an ESC can be used for exchanging data between the EtherCAT master and a local
application (on a µController attached to the PDI) without any restrictions. Using the memory for
communication like this has some drawbacks which are addressed by the SyncManagers inside the
ESCs:

Data consistency is not guaranteed. Semaphores have to be implemented in software for
exchanging data in a coordinated way.

Data security is not guaranteed. Security mechanisms have to be implemented in software.

Both EtherCAT master and application have to poll the memory in order to find out when the
access of the other side has finished.

SyncManagers enable consistent and secure data exchange between the EtherCAT master and the
local application, and they generate interrupts to inform both sides of changes.

SyncManagers are configured by the EtherCAT master. The communication direction is configurable,
as well as the communication mode (Buffered Mode and Mailbox Mode). SyncManagers use a buffer
located in the memory area for exchanging data. Access to this buffer is controlled by the hardware of
the SyncManagers.

A buffer has to be accessed beginning with the start address, otherwise the access is denied. After
accessing the start address, the whole buffer can be accessed, even the start address again, either as
a whole or in several strokes. A buffer access finishes by accessing the end address, the buffer state
changes afterwards and an interrupt or a watchdog trigger pulse is generated (if configured). The end
address cannot be accessed twice inside a frame.

Two communication modes are supported by SyncManagers:

Buffered Mode

- The buffered mode allows both sides, EtherCAT master and local application, to access the

communication buffer at any time. The consumer always gets the latest consistent buffer which
was written by the producer, and the producer can always update the content of the buffer. If the
buffer is written faster than it is read out, old data will be dropped.

- The buffered mode is typically used for cyclic process data.

Mailbox Mode

- The mailbox mode implements a handshake mechanism for data exchange, so that no data will

be lost. Each side, EtherCAT master or local application, will get access to the buffer only after
the other side has finished its access. At first, the producer writes to the buffer. Then, the buffer
is locked for writing until the consumer has read it out. Afterwards, the producer has write
access again, while the buffer is locked for the consumer.

- The mailbox mode is typically used for application layer protocols.

The SyncManagers accept buffer changes caused by the master only if the FCS of the frame is
correct, thus, buffer changes take effect shortly after the end of the frame.

The configuration registers for SyncManagers are located beginning at register address 0x0800.

Table 23: SyncManager Register overview

Description

Register Address Offset

Physical Start Address

0x0:0x1

Length

0x2:0x3

Control Register

0x4

Status Register

0x5

Activate

0x6

PDI Control

0x7

Advertising