TwinCAT Sync Clock

Synchronization of Simulink® simulation with local system time.

TwinCAT Sync Clock 1:

Block Parameter

TwinCAT Sync Clock 2:

Sync Clock Mode

None

Simulation is neither accelerated nor decelerated.

Clock

Simulation time and system time are synchronized.

ClockWithTime

Simulation time and system time are synchronized. In addition, an output port is created that displays the past system time.

ClockWithTimeAndDeviation

Simulation time and system time are synchronized. In addition, an output port is created that shows the past system time and the deviation between simulation time and system time.

Comment

The block does not synchronize the Simulink® simulation with the TwinCAT runtime, but with the local system time. Synchronization of the local system time is done by "braking" the Simulink® simulation; acceleration is not possible.

For a fully synchronized software-in-the-loop simulation between TwinCAT and Simulink® you need a TwinCAT 3 Usermode Runtime: External Control and the SiL Connector Block in Simulink®.