PLC API
TS5066
16
Version: 1.0
(
stTimeSyncParameters.iNoOfPeriodsForMeanDrift)
has been identified, the correction time is calculated
according to the method described above (outputs bStartUp=FALSE and bSynced=TRUE), and the system
changes from time mode to sync mode.
VAR_INPUT
VAR_INPUT
iCycleIndex : WORD;
fTaskCycleTime : LREAL;
bEnable : BOOL;
stTimeSyncParameters : ST_TimeSyncParameters;
END_VAR
iCycleIndex
: Cycle index of the currently received data
fTaskCycleTime
: Nominal receiver cycle time in [s]. If the cycle time of the sender differs from this value, it
has to be configured via parameter stTimeSyncParameters.fDataCycleTime. Otherwise it is assumed that
both cycle times are identical. The cycle times must be even-numbered multiples of each other, i.e.
tSender=2ms, tReceiver=4ms or tReceiver=1ms, for example.
bEnable
: FALSE deactivates the function block, a rising edge reinitialises and starts it
stTimeSyncParameters
contains the Configuration paramters
VAR_OUTPUT
VAR_OUTPUT
bError : BOOL;
iErrorId : DINT;
bWarning : BOOL;
iWarningId : DINT;
fCorrectionTime : LREAL;
bSynced : BOOL;
bStartUp : BOOL;
stTimeSyncDiagnostic: ST_TimeSyncDiagnostic;
END_VAR
bError
:TRUE in the event of a fault
iErrorId
: Returns error code (
bWarning
: TRUE in the event of a warning, i.e. operation continues under sub-optimum conditions.
iWarningId
: Returns the corresponding warning code (
)
fCorrectionTime
: Correction time, i.e. the time used for extrapolating the received information [s]
bSynced
: TRUE if sender and receiver are synchronised. The system was able to determine a correction
time in sync mode, i.e. the initialisation phase is completed, and the correction time is within the permitted
range (i.e. after identification of
stTimeSyncParameters.iNoOfPeriodsForMeanDrift
beats, and the absolute
value of the correction time subsequently falling
stTimeSyncParameters.fThresholdForSync*TaskCycleTime).
bStartUp
: TRUE if the function block is in the initialization phase. During this phase the correction time is
calculated such that it can be used for extrapolating the data, although _only_ fluctuations ( Δm≠1) are
compensated. After identification of a beat during the initialization phase, a correction time of 0 is applied
linearly within
stTimeSyncParameters.iExtendedStartUpBlendingCycles
cycles.
stTimeSyncDiagnostic
Summary of Contents for TS5066
Page 1: ...Manual EN TS5066 TwinCAT 2 PLC Remote Synchronisation 2021 10 13 Version 1 0 ...
Page 2: ......
Page 4: ...Table of contents TS5066 4 Version 1 0 ...
Page 30: ......