Synchronize model execution to Precision Time Protocol clock
When the PTP time is a multiple of the fundamental step size of the model, this block causes a real-time interrupt.
Make measurements across multiple target computers at the same
time step by using the IEEE 1588 Sync Execution block.
The block uses a control loop to adjust the step size toward the synchronization
objective. During this process, the control loop decreases or increases
the step size. When the control loop decreases the step size, the
CPU can become overloaded. You can decrease the maximum adjustment
value by decreasing the Proportional gain parameter.
The upper bound of the adjustment value is
the model fundamental sample time, regardless of the Proportional
Use this block in every model that requires synchronized execution,
whether it is a PTP master or slave model. To use this block, in the
set the real-time interrupt source to
As a best practice, for all
models, use the same fundamental sample time. Set the sample time
in this block to that fundamental sample time.
If you use the IEEE 1588 Sync Execution block in your model, configuring EtherCAT® distributed clocks in master shift mode in the same model produces a build error. To include IEEE® 1588 synchronized execution and EtherCAT distributed clocks in the same model, use EtherCAT bus shift mode.
Time— PTP time of real-time interrupt
PTP time value at which the interrupt occurs, in seconds.
Delta— Difference between interrupt time and nearest PTP sample time
Current difference, in seconds, between the PTP time at the interrupt and the nearest PTP time that is a multiple of the fundamental sample time.
Proportional gain— Proportional gain of the kernel clock adjustment controller
0.1(default) | double
The current value of output port Delta is multiplied by the proportional gain to get the first part of the controller output.
Low pass filter pole— Pole of the low-pass filter of the kernel clock adjustment controller
0.7(default) | double
The low-pass filter is a discrete-time, first-order transfer function. The low-pass filter tracks the rate difference between the kernel and PTP clocks and provides the second part of the controller output.
PTP clock synchronization threshold (seconds)— Threshold value at which the controller begins to adjust the kernel clock
1e-3(default) | double
The effect of this value depends on the PTP node state:
Slave node — The controller starts the kernel adjustment when the slave PTP clock offset from the master clock is less than or equal to this parameter.
Master node — The controller starts the kernel clock adjustment immediately after it enters the master state, regardless of the value of this parameter.
It is a best practice to start adjusting the kernel clock only when the PTP clock is stable. Keep this value less than or equal to a millisecond.