Documentation Center

  • Trials
  • Product Updates

Detect Fall Nonpositive

Detect falling edge when signal value decreases to nonpositive value, and its previous value was strictly positive

Library

Logic and Bit Operations

Description

The Detect Fall Nonpositive block determines if the input is less than or equal to zero, and its previous value was greater than zero.

  • The output is true (equal to 1) when the input signal is less than or equal to zero, and its previous value was greater than zero.

  • The output is false (equal to 0) when the input signal is greater than zero, or if it is nonpositive, its previous value was also nonpositive.

Data Type Support

The Detect Fall Nonpositive block accepts signals of the following data types:

  • Floating point

  • Built-in integer

  • Fixed point

  • Boolean

For more information, see Data Types Supported by Simulink in the Simulink® documentation.

Parameters and Dialog Box

Initial condition

Set the initial condition of the Boolean expression U/z <= 0.

Input processing

Specify whether the block performs sample- or frame-based processing. You can select one of the following options:

  • Elements as channels (sample based) — Treat each element of the input as a separate channel (sample-based processing).

  • Columns as channels (frame based) — Treat each column of the input as a separate channel (frame-based processing).

      Note:   Frame-based processing requires a DSP System Toolbox™ license.

      For more information, see Sample- and Frame-Based Concepts in the DSP System Toolbox documentation.

  • Inherited — Inherit the processing mode from the input signal and delay the input accordingly. You can identify whether the input signal is sample or frame based by looking at the signal line. Simulink represents sample-based signals with a single line and frame-based signals with a double line.

      Note:   When you choose the Inherited option for the Input processing parameter, and the input signal is frame-based, Simulink will generate a warning or error in future releases.

Use Input processing to specify whether the block performs sample- or frame-based processing. The block accepts frame-based signals for the input u. All other input signals must be sample based.

Input Signal uInput Processing ModeBlock Works?
Sample basedSample basedYes
Frame basedNo, produces an error
Sample basedFrame basedYes
Frame basedYes
Sample basedInheritedYes
Frame basedYes

For more information about these two processing modes, see Sample- and Frame-Based Concepts in the DSP System Toolbox documentation.

Output data type

Set the output data type to boolean or uint8.

Characteristics

Direct Feedthrough

Yes

Scalar Expansion

Yes

Was this topic helpful?