Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Saturation Subtract (FPGA Module)

LabVIEW FPGA Module 8.2 Help
August 2006

NI Part Number:
371599B-01

»View Product Info

Computes the difference between the inputs with a configurable output width, overflow handling, and an optional overflow output terminal.

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
Output WidthSpecifies the width of the output data type.

Tip  After you wire inputs to the VI, you can use the Context Help window to view the output data type. Select Help»Show Context Help to display the Context Help window and move the cursor over the output terminal to display the data type of the output.

Contains the following options:

  • Match input—Specifies that the width of the output data type is equal to that of the widest input. This option is the default.
  • Avoid overflow—Specifies that the output data type is wide enough to prevent overflow in the result. LabVIEW does not support a data type wider than 64-bit, so if either input is 64-bit, LabVIEW is unable to prevent overflow.
  • Fixed—Specifies that the output width is a fixed size. Select a size from the Fixed width drop-down menu.
    • Fixed width—Specifies the width of the output. You must select a width that is greater than or equal to the widest input. The default is 64 bits.
OverflowContains the following options:
  • Mode—Specifies the behavior of the output if the result of the calculation is outside the range of the output data type. Contains the following options:
    • Saturate—The VI returns the maximum numeric magnitude representable by the output data type if the actual result of the calculation exceeds the range of the output data type. The output has the same sign as the actual result of the calculation. For example, if the data type is I16 and the actual result of the calculation is –32,800, the VI returns –32,768. Refer to Numeric Data Types for information about data type ranges. This option causes the VI to use more space on the FPGA. This option is the default.
    • Wrap—The VI returns as many of the least significant bits of the result as the output data type can hold. This is the same behavior as the Subtract function.
  • Show overflow terminal—The VI displays the overflow output if you place a checkmark in the Show overflow terminal checkbox. By default, the VI does not display the overflow output.

Block Diagram Inputs

ParameterDescription
xSpecifies an input that is an 8-, 16-, 32-, or 64-bit signed or unsigned integer.
ySpecifies an input that is an 8-, 16-, 32-, or 64-bit signed or unsigned integer.

Block Diagram Outputs

ParameterDescription
x-yReturns the difference between x and y. If the result exceeds the range of the data type, LabVIEW returns the value defined by the Mode you select in the configuration dialog box.
overflowReturns TRUE when the actual result of the calculation exceeds the range of the output data type if you place a checkmark in the Show overflow terminal checkbox in the configuration dialog box.

Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit