Engee documentation

Digital Clock

Outputs the simulation time at a specified interval.

blockType: DigitalClock

Path in the library:

/Basic/Sources/Digital Clock

Description

Block Digital Clock outputs the simulation time only at times that are multiples of the specified interval. The rest of the time, the block holds the previous value at the output. To control the accuracy of this block, use the parameter Sample Time in the dialog box of the block.

Use this block instead of the block 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