FB_EcExtSyncCheck64

FB_EcExtSyncCheck64 1:

The function block FB_EcExtSyncCheck64 checks whether the internal and external clocks are synchronous. See function block FB_EcExtSyncCalcTimeDiff64.

FB_EcExtSyncCheck64 2: 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_EcExtSyncCheck64 3: Inputs/outputs

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

Name

Type

Description

DcToTcTime
Offset

T_LARGE_INTEGER

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

DcToExtTime
Offset

T_LARGE_INTEGER

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

ExtTime

T_DCTIME64

External time in TwinCAT "Distributed Clock" system time format

IntTime

T_DCTIME64

Internal time in TwinCAT "Distributed Clock" system time format

FB_EcExtSyncCheck64 4: 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