Documentation

Real-Time Sync

Synchronize Simulink to real-time

Library

Simulink® Desktop Real-Time™

Description

Synchronize your Simulink model with the real-time kernel clock at Real-Time Sync block sample hits. The parameters deal only with sample time and missed ticks. There are no input ports.

The Real-Time Sync block operates only in Simulink Normal Mode. It has no function in Simulink External Mode. If the Normal Mode model contains another Simulink Desktop Real-Time block, the other block also synchronizes the Simulink model with the real-time clock. Therefore, do not include the Real-Time Sync block in such a model.

Parameters

Sample time

Enter a value representing how frequently you want the block to execute and interact with the I/O hardware. The block also synchronizes your model with the real-time clock at this sample rate.

    Tip   If you are using a fixed-step solver, you must enter the value that you entered in the Fixed step size box in the Configuration Parameters dialog box, or an integer multiple of that value.

Maximum missed ticks

In Normal Mode, enter the number of timer ticks that your model can lag behind the real-time kernel. When the model lags by this number or less, the software assumes that the lag is temporary and allows the model to catch up, even if the model misses some ticks. When the model lags by more than this number, the software reports an error and simulation stops.

In External Mode, the software ignores this value.

Show "Missed Ticks" port

In Normal Mode, select this check box to display the number of missed ticks as a block output.

In External Mode, The "Missed Ticks" port displays zero.

Yield CPU when waiting

In Normal Mode, select this check box to grant other programs more CPU time while the kernel waits for a response from the hardware.

In External Mode, the software ignores this value.

Was this topic helpful?