Engee documentation

On-Off Delay

Delay of the logical signal.

blockType: SubSystem

Path in the library:

/Physical Modeling/Electrical/Control/General Control/On-Off Delay

Description

Block On-Off Delay applies a delay to the input logic signal.

A time delay is added when a transition is detected in the input signal. This block allows you to add a time delay to the input signal when:

  • A switch-on transition has been detected (a change in the input signal from 0 on 1).

  • A switch-off transition has been detected (a change in the input signal from 1 on 0).

  • Any of the transitions is detected.

The operation of the on/off delay is shown in the figure.

on off delay 1 en

Ports

Input

# u — input signal
scalar

Details

Input logic signal.

Data types

Bool.

Complex numbers support

No

Output

# y — output signal
scalar

Details

Delayed output signal.

Data types

Bool.

Complex numbers support

No

Parameters

Main group

# ON delay time, s — input delay time when switching on

Details

Specify the delay time when the input signal changes from 0 to 1.

Default value

0.01

Program usage name

time_delay_on

Evaluatable

Yes

# OFF delay time, s — input delay time when switching off

Details

Specify the delay time when the input signal changes from 1 to 0.

Default value

0.0

Program usage name

time_delay_off

Evaluatable

Yes

# Initial state — initial signal state

Details

Specify the initial state (0 or 1).

Default value

0.0

Program usage name

initial_condition

Evaluatable

Yes

# Sample time — interval between calculation steps

Details

The time between successive executions of the block. During execution, the block produces output data and updates its internal state if necessary.

For discrete time operation, set the parameters Sample time to a positive value. For continuous time operation, set the parameters Sample time to 0.

Default value

0.001

Program usage name

sample_time

Evaluatable

Yes