Decrement Function

Owning Palette: Numeric VIs and Functions

Requires: Base Development System

Subtracts 1 from the input value.

The connector pane displays the default data types for this polymorphic function.

Example

 Add to the block diagram  Find on the palette
x specifies the input value.

This input accepts the following data types:
  • Number
  • Timestamp
  • Analog Waveform
This input also accepts an array or an array of clusters of the listed data types.
x-1 is the result of x-1. If the input is a time stamp value, this function decrements the time by one second. If the input is an enumerated type value, this function decrements the first enumerated value to the last.

Note  You can manually configure this function to output data of a type you want. To specify the output data type, right-click the function and select Properties to display the Object Properties dialog box. On the Output Configuration page, click the Representation icon and select the data type you want. A blue coercion dot appears on the output terminal of the function to indicate that you have configured the output data type.

Example

Refer to the Numeric Functions VI in the labview\examples\Numerics directory for an example of using the Decrement function.

 Open example  Find related examples