Engee documentation

Digital Clock

Outputs the simulation time at the specified interval.

blockType: DigitalClock

Path in the library:

/Basic/Sources/Digital Clock

Description

The Digital Clock block outputs the simulation time only at times that are multiples of the specified interval. At all other times, the block keeps the previous value in the output. To control the accuracy of this block, use the Sample Time parameters in the block dialogue box.

Use this block instead of Clock (which outputs continuous time) when you need the current simulation time in a discrete system.

Ports

Output

# OUT_1 — current time, c
scalar

Details

The current time in seconds, updated at the specified interval. The block holds the previous value at the output for the rest of the time.

Data types

Float64.

Complex numbers support

No

Parameters

Main

# Sample Time — interval between calculation steps
SampleTime (real number / vector of two real numbers)

Details

Specify the interval between calculation steps as a non-negative number.

Do not specify a continuous calculation step 0 or [0,0]. Also, avoid specifying -1 (calculation step inheritance) because this block is the source.

Default value

1

Program usage name

SampleTime

Tunable

No

Evaluatable

Yes