Documentation

Real-Time Sync

Synchronize model execution to real time in normal mode or accelerator mode

Description

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

The Real-Time Sync block operates only in the Simulink normal and accelerator modes. It has no function in Simulink external mode.

If the normal mode or accelerator mode model contains another Simulink Desktop Real-Time™ block, the other block synchronizes the Simulink model with the real-time clock. Do not include the Real-Time Sync block in such a model.

Ports

Output

expand all

In normal or accelerator modes, returns the number of timer ticks that your model lags behind the real-time kernel. When the model lags by more than Maximum missed ticks, the software reports an error and simulation stops.

Dependency

When you select Show “Missed Ticks” port, this port is visible.

Data Types: double

Parameters

expand all

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

If you are using a fixed-step solver, enter the value that you entered as the Fixed step size configuration parameter or an integer multiple of that value.

In normal or accelerator modes, enter the number of timer ticks that your model can lag behind the real-time kernel. When the model lags behind by this number or fewer timer ticks, the software assumes that the lag is temporary. It 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.

In normal or accelerator modes, select this check box to send the number of missed ticks to output port Missed Ticks.

In external mode, the Missed Ticks port is zero.

In normal or accelerator modes, 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.

See Also

Introduced in R2012a

Was this topic helpful?