Clock

Display and provide simulation time

Library

Sources

Description

The Clock block outputs the current simulation time at each simulation step. This block is useful for other blocks that need the simulation time.

When you need the current time within a discrete system, use the Digital Clock block.

Data Type Support

The Clock block outputs a real-valued signal of type double.

For more information, see Data Types Supported by Simulink in the Simulink® documentation.

Parameters and Dialog Box

Display time

Select this check box to display the current simulation time inside the Clock block icon.

Decimation

Specify a positive integer for the interval at which Simulink updates the Clock icon when you select Display time.

Suppose that the decimation is 1000. For a fixed integration step of 1 millisecond, the Clock icon updates at 1 second, 2 seconds, and so on.

Examples

The following Simulink examples show how to use the Clock block:

Characteristics

Sample Time

Continuous

Scalar Expansion

N/A

Dimensionalized

No

Zero-Crossing Detection

No

Was this topic helpful?