Clock synchronization
The configuration parameters for the cyclic exchange of data are located in the Acquisition Parameters. The clock synchronization can also be switched on and configured there. The following values must be set in the initialization:
//activate clock sync
fbMaster.acqPara.clockSync.bEnable := TRUE;
fbMaster.acqPara.clockSync.tPollCycle := T#120S;
Furthermore, several settings can be made in the System Parameters with regard to the time synchronization. The following is relevant for the central station:
bSyncPCTime: if this value is TRUE, the system time of the TwinCAT PC (the Windows system time in the taskbar) should be synchronized in addition to the IEC system time. The default value is FALSE.
The associated PLC example tutorial can be downloaded here.