External Twincat Synchronization - Beckhoff EL6692 Documentation

Ethercat bridge terminal
Table of Contents

Advertisement

Commissioning
5.6

External TwinCAT synchronization

Sample: EL6692 bridge terminal
Using the sample programs
This document contains sample applications of our products for certain areas of application. The
application notices provided here are based on typical features of our products and only serve as
samples. The notices contained in this document explicitly do not refer to specific applications. The
customer is therefore responsible for assessing and deciding whether the product is suitable for a
particular application. We accept no responsibility for the completeness and correctness of the
source code contained in this document. We reserve the right to modify the content of this docu-
ment at any time and accept no responsibility for errors and missing information.
In this example, two Beckhoff IPCs with TwinCAT 2.11, b1539, will be synchronized with each other. One PC
is the master clock, the second (slave clock) synchronizes its 'time' to the first. As the fieldbus, EtherCAT
makes the necessary operating resources available, in particular EtherCAT's own synchronization
mechanism, distributed clocks.
The procedure is as explained in the previous chapter.
The following must be observed:
• The master PC works autonomously on the basis of its DC time
• Following the start of TwinCAT, the slave PC readjusts its distributed clocks time to the master IPC:
◦ At the start of EtherCAT, the initial offset between the two times is determined.
◦ The subsequent adjustment keeps this offset constant and makes it known.
◦ The readjustment takes place continuously.
• In the case of failure of the synchronization (interruption of the connection, restart of one of the
systems), the behavior is as follows:
◦ If the adjustment restarts in the slave PC, a new offset is calculated there and made known.
◦ The application must therefore continuously observe this offset.
• The local DC time must still be used for tasks related to the respective station hardware (EtherCAT
slaves, terminals).
• The EtherCAT cycle time must be identical in both systems.
• If different configurations are used in the two systems, i.e. the number, type and/or order of the slaves
is different, the automatically calculated shift times will also differ.
Sample: Both systems use an EL2202-0100, which are both supposed to switch their output at the
same time. A constant difference is measured, since different output shift times were calculated.
In the system with the smaller output shift time the shift time of the other system should be entered.
Effect on devices when changing the shift times
Side effects relating to the function of the other slaves when the shift times are changed should be taken
into account!
•  In a controlled system the time offset between the systems is subject to certain fluctuations.
Sample program (https://infosys.beckhoff.com/content/1033/el6692/Resources/zip/2460148491.zip),
TwinCAT 2.11
Pay attention in the program to the use of 'signed' and 'unsigned' 64-bit variables as required.
122
NOTE
Version: 3.2
EL6692

Advertisement

Table of Contents
loading

Table of Contents