This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Wrap To Zero

Set output to zero if input is above threshold

  • Library:
  • Simulink / Discontinuities

    HDL Coder / Discontinuities

Description

The Wrap To Zero block sets the output to zero when the input is above the Threshold value. When the input is less than or equal to the Threshold, then the output is equal to the input.

Ports

Input

expand all

Example:

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean | fixed point

Output

expand all

Output signal set to the input signal value or zero. The data type of the output is the same data type as the input.

Tip

If the input data type cannot represent zero, parameter overflow occurs. To detect this overflow, go to the Diagnostics > Data Validity pane of the Configuration Parameters dialog box and set Parameters > Detect overflow to warning or error.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean | fixed point

Parameters

expand all

To edit the parameters for the Wrap to Zero block, double-click the block icon.

Threshold value for setting the output value to zero.

Programmatic Use

Block Parameter: Threshold
Type: character vector
Values: scalar
Default: '255'

Block Characteristics

Data Types

Boolean | double | fixed point | integer | single

Direct Feedthrough

no

Multidimensional Signals

yes

Variable-Size Signals

no

Zero-Crossing Detection

no

Extended Capabilities

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

PLC Code Generation
Generate Structured Text code using Simulink® PLC Coder™.

Fixed-Point Conversion
Convert floating-point algorithms to fixed point using Fixed-Point Designer™.

Introduced before R2006a