Overview

Controllers generate data to be collected and linked in modern, distributed systems.
Since controllers start off as stand-alone devices, they have independent time bases. In a common database, it would not be possible to correlate data with respect to time.

In order to counter this problem, it has been possible for quite some time to synchronize controllers with each other, for example using the network protocol IEEE1588 or PTP.
However, in many scenarios it is sufficient to provide the data with a uniform timestamp. The controllers can be operated independently of each other, so that on the one hand the hardware costs associated with the protocols mentioned above are reduced, while on the other hand there is no technical dependency between the controllers.
This chapter describes the TwinCAT components for adapting timestamps for storing time-synchronous data.

Overview 1:

The figure illustrates the basic idea: independent controllers obtain the local timestamp and adjust it using an offset, which is then used to store the common data.

A central component, the external time interface, is available in TwinCAT real-time for this purpose. This component

This corrected time can then be used by different components inside and outside the real-time.

The source is typically either an NTP server or a DC time signal based on EtherCAT, which is synchronized via EL6688 through PTP (IEEE1588), for example. However, a source can also be implemented by the customer, so that other time signals can be realized as a source.

In addition to the central component in the TwinCAT real-time described above, the concept thus comprises two types of components:

  1. External time providers: provide an offset for adjusting timestamps of the central component.
    For example, a provider obtains a timestamp via NTP (Network Time Protocol, see RFC 4330), from which it calculates an offset to the local system time and makes this available.
  2. External time consumers: use an offset that they obtain from the central component. Thus a timestamp can be used in the components that leads to comparable data on remote devices.
    All TwinCAT components that use timestamps can be consumers, and also customer applications.