On-Off Delay

Boolean-signal delay

  • Library:
  • Simscape / Electrical / Control / General Control

Description

The On-Off Delay block applies a delay on the Boolean input 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:

  • An ON transition (input change from 0 to 1) is detected,

  • An OFF transition (input signal change from 1 to 0) is detected, or

  • Either transition is detected.

The operation of the on-off delay is represented in the following figure:

Ports

Input

expand all

Input Boolean signal.

Data Types: Boolean

Output

expand all

Output signal with delays.

Data Types: Boolean

Parameters

expand all

Specify delay time when input is ON.

Specify delay time when input is OFF.

Specify initial state.

Time between consecutive block executions. During execution, the block produces outputs and, if appropriate, updates its internal state. For more information, see What Is Sample Time? (Simulink) and Specify Sample Time (Simulink).

For discrete-time operation, set the sample time to a positive value. For continuous-time operation, set the sample time to 0.

If this block is in a masked subsystem, or other variant subsystem that allows either continuous and discrete operation, promote the sample time parameter. Promoting the sample time parameter ensures correct switching between the continuous and discrete implementations of the block. For more information, see Promote Parameter to Mask (Simulink).

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced in R2018b