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

Add

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Computes the sum of the inputs.

If you wire two waveform values or two dynamic data type values to this function, error in and error out terminals appear on the function. You cannot add two time stamp values together. The dimensions of two matrices you want to add must be the same. Otherwise, this function returns an empty matrix. The connector pane displays the default data types for this polymorphic function.

Details  Example

x can be a scalar number, array or cluster of numbers, array of clusters of numbers, a time stamp, and so on.
y can be a scalar number, array or cluster of numbers, array of clusters of numbers, a time stamp, and so on.
x+y is the sum of x and y.

Add Details

When you wire a matrix data type as an input to this function, a VI that includes subVIs that work with the matrix data type replaces the function. The resulting VI has the same icon but contains a matrix-specific algorithm. The node remains a VI if you disconnect the matrix from the input(s). Wire other data types as inputs to restore the original function. If you wire a data type to a function and that data type causes a basic math operation to fail, the function returns an empty matrix or NaN.

Fixed-Point Details

If you wire fixed-point values to Numeric functions such as Add, Subtract, Multiply, and Square, the functions usually return values that do not lose any bits of word length. However, if the operation creates a value that exceeds the maximum word length that LabVIEW accepts, overflow or quantization conditions can occur. LabVIEW accepts a maximum word length of 64 bits. Use the properties dialog boxes for Numeric functions to configure how LabVIEW handles overflow or quantization of fixed-point data.

Example

Refer to the Add - Various Uses VI in the labview\examples\general\functions\Numeric directory for an example of using the Add function.


Resources


 

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