FB_EcExtSyncCheck

FB_EcExtSyncCheck 1:
FB_EcExtSyncCheck 2:

Outdated function block

This function block is outdated. Use the function block FB_EcExtSyncCheck64 instead.

The function block FB_EcExtSyncCheck checks whether the internal and external clocks are synchronous. See function block FB_EcExtSyncCalcTimeDiff.

FB_EcExtSyncCheck 3: Inputs

VAR_INPUT
   nSyncWindow    : UDINT;
   bNotConnected  : BOOL;
END_VAR

Name

Type

Description

nSyncWindow

UDINT

Time window within which the internal and external clock are regarded as synchronous.

bNotConnected

BOOL

TRUE = connection to external clock is interrupted.

FB_EcExtSyncCheck 4: Inputs/outputs

VAR_IN_OUT
   DcToTcTimeOffset  : T_LARGE_INTEGER;
   DcToExtTimeOffset : T_LARGE_INTEGER;
   ExtTime           : T_DCTIME;
   IntTime           : T_DCTIME;
END_VAR

Name

Type

Description

DcToTcTimeOffset  

T_LARGE_INTEGER

Time offset between the TwinCAT "Distributed Clock" system time and the TwinCAT system time

DcToExtTimeOffset 

T_LARGE_INTEGER

Time offset between the TwinCAT "Distributed Clock" system time and an external time

ExtTime

T_DCTIME

External time in TwinCAT "Distributed Clock" system time format

IntTime

T_DCTIME

Internal time in TwinCAT "Distributed Clock" system time format

FB_EcExtSyncCheck 5: Outputs

VAR_OUTPUT
   bSynchronized         : BOOL;
   nTimeDiff             : UDINT;
   nOffsetFromSyncMaster : DINT;
END_VAR

Name

Type

Description

bSynchronized

BOOL

TRUE = external and internal clock are synchronous

nTimeDiff

UDINT

Current time difference between the two clocks

nOffsetFrom
SyncMaster 

DINT

Offset to sync master

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_EtherCAT