Documentation

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

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

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

Data Types

Double

Sample Time

Continuous

Multidimensional Signals

No

Variable-Size Signals

No

Zero-Crossing Detection

No

Code Generation

Yes

Introduced before R2006a


Was this topic helpful?