TMCM-1310 TMCL Firmware V1.11 Manual (Rev. 1.16 / 2014-MAR-19)
7
www.trinamic.com
3
Communication via EtherCAT
3.1
SyncManager
The SyncManager enables consistent and secure data exchange between the EtherCAT master and the local
application, and it generates interrupts to inform both sides of changes. The SyncManager is configured by
the EtherCAT master. The communication direction is configurable, as well as the communication mode
(buffered mode and mailbox mode). The SyncManager uses a buffer located in the memory area for
exchanging data. Access to this buffer is controlled by the hardware of the SyncManager.
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. The end address cannot be accessed twice inside a frame. Two communication modes are
supported by SyncManagers, the
buffered mode
and the
mailbox mode
.
3.1.1
Buffered Mode
The buffered mode allows both sides, EtherCAT master and local application, to access the communication
buffer at any time. The consumer gets always the latest consistent buffer which was written by the
producer, and the producer can always update the content of the buffer.
The buffered mode is used for
cyclic process data.
Data transfer between EtherCAT master (PC etc.) und slave (TMCM-1310) is done using the dual port
memory of the ET1100 EtherCAT-IC on the slave. The buffered mode allows writing and reading data
simultaneously without interference. If the buffer is written faster than it is read out, old data will be
dropped. The buffered mode is also known as 3-buffermode. One buffer of the three buffers is allocated to
the producer (for writing), one buffer to the consumer (for reading), and the third buffer keeps the last
consistently written data of the producer.
0x1000
-
0x10FF
0x1100
-
0x11FF
0x1200
-
0x12FF
0x1300
Buffer 0
(visible)
Buffer 1
(invisible, shall not be used)
Buffer 2
(invisible, shall not be used)
Next usable RAM space
All buffers are
controlled by the
SyncManager. Only
buffer 0 is configured
by the SyncManager
and addressed by
ECAT and μController.
Figure 3.1 SyncManager buffer allocation
As an example, Figure 3.1 demonstrates a configuration with start address 0x1000 and length 0x100. The
other buffers shall not be read or written. Access to the buffer is always directed to addresses in the range
of buffer 0.