Introduction
Note: In the following, a "central control architecture" is assumed: a central controller (PLC) serves topologically subordinate stations via 1..n fieldbuses: I/O terminals/couplers, drives, cameras, sensors, …
In a machine control system with distributed components (I/O, drives, possibly several masters/controllers), it may be necessary for the components to work in more or less close temporal relation to each other.
![]() | Time dimension, application requirements In view of the requirements, the terms "close temporal relationship" or "simultaneous" must be expressed in tangible figures:
|
The components must therefore have a “time”, to which the component (e.g. an I/O terminal or a drive) has access at all times. Such requirements may include:
Requirement 1
- 1a) Several outputs in a control system have to be set simultaneously, irrespective of when the respective station receives the output data.
- 1b) Inputs should be read simultaneously; drives/axes in a control system must read their axis position synchronously, regardless of the topology or cycle time.
Both requirements mean that there is a “local” synchronization mechanism between the clocks of the subordinate stations of a control system.
The solution: the central controller (preferably TwinCAT 3) synchronizes all subordinate EtherCAT devices via EtherCAT distributed clocks -> "local synchronization"
Requirement 2
- 2a) If inputs act on the controller, the (absolute) time must be recorded - this can be helpful for later evaluation if functional chains need to be traced by analyzing the sequence of events.
This means that the time running in the components must be linked to a globally valid time, e.g. Greenwich Mean Time or a network clock. - 2b) A system consists of several (central) controllers that should work synchronously or at least with the same time base. In extreme cases, tasks on different controllers should run synchronously (i.e., at the same frequency) and without phase shift.
The solution: Beckhoff TwinCAT can not only be a clock source for other controllers, but is also set up to receive external timing signals and can thus align its own operating clock accordingly: TwinCAT can therefore synchronize itself to other clock sources ("external synchronization")
In order to cover requirements 1 + 2, the following must be resolved in this example
Fig.12: Simple I/O topology(consisting of the EtherCAT master, part of the TwinCAT controller, various I/O and an axis):
- Synchronization of the local clocks "local synchronization"
- Coupling to a higher-level reference time “external synchronization”
- task synchronization if necessary, i.e. TwinCAT runs synchronously to an external clock
These topics are discussed in the following sections.
