Configuring Input and Output Terminals of the High Throughput Math Functions
- Updated2025-09-18
- 6 minute(s) read
Configuring Input and Output Terminals of the High Throughput Math Functions
The value ranges of High Throughput Math function input and output terminals depend on the encoding, word length, and integer word length of the terminal. If a terminal is signed, the value range is [–2^( iwl–1), 2^(iwl–1)–2^(–wl+iwl)], where:
- wl is the word length
- iwl is the integer word length
If a terminal is unsigned, the value range is: [0, 2^ iwl –2^(–wl + iwl )].
For example, if wl = 16, iwl = 1, and the terminal is signed, the value range is [–2^(1–1), 2^(1–1)–2^(–16+1)], or [–1, 0.999969482421875]. If this terminal is unsigned, the value range is [0, 1.999969482421875].
Unsupported Fixed-Point Configurations of Input Terminals
The fixed-point configuration of a terminal refers to the encoding, word length, and integer word length of that terminal. The input terminals of some functions, such as the High Throughput Add function, support all fixed-point configurations that LabVIEW supports. The input terminals of other functions, such as the High Throughput Exponential function, limit the supported fixed-point configurations. Refer to the help topic of a particular function for information about fixed-point configurations that the function supports. Access this topic by right-clicking a function and selecting Help from the shortcut menu.
The following list shows the possible limitations an input terminal might have.
- Unsupported encoding—For example, the High Throughput Square Root function does not support a signed data type.
- Unsupported word length and/or integer word length—For example, if you wire data to the High Throughput Hyperbolic Sine & Cosine function and the encoding of that data type is signed, the function does not support an integer word length greater than 1 bit.
- Unsupported value range—For example, if you wire data to the High Throughput Natural Logarithm function, the function does not support a value outside the range [1/e, 1).
In some cases, if you wire an unsupported configuration to a terminal, LabVIEW alerts you by breaking the wire. You cannot run the function. In other cases, LabVIEW coerces the wire to a supported configuration. You can run the function, but this coercion might cause the function to behave unexpectedly. If the wire is not broken and does not have a coercion dot, the input terminal supports that fixed-point configuration.
Avoiding Unsupported Fixed-Point Configurations
You can avoid broken or coerced wires on input terminals by using the configuration dialog box to specify the fixed-point configuration for a particular input terminal. Complete the following steps to configure a terminal in this way.
- Add the function to the block diagram.
- Double-click the function. LabVIEW launches the configuration dialog box.
- Use the Fixed-Point Configuration section to configure the data type of the terminal. Depending on the function, LabVIEW dims certain options and restricts the values you can enter in other text boxes. If you can specify a particular fixed-point configuration by using the configuration dialog box, the function supports that configuration.
- Click the OK button to save changes and close the dialog box.
After you complete these steps, you can right-click the input terminal and select Create»Control or Create»Constant. The control or constant you create has a fixed-point configuration that the function supports.
Array Support
Some High Throughput Math and Basic Elements functions support arrays. The following table summarizes the High Throughput Math and Basic Elements functions with array support.
| Function | Array of Integers | Array of Fixed-Point Numbers | Array of Clusters |
|---|---|---|---|
| High Throughput Add |
|
|
|
| High Throughput Subtract |
|
|
|
| High Throughput Multiply |
|
|
|
| Discrete Delay |
|
|
|
| Accumulator |
|
|
|
| AddSub |
|
|
|
The following considerations apply to the High Throughput Add, High Throughput Subtract, and High Throughput Multiply functions.
- If both data inputs are arrays, the two arrays are computed element by element.
- If one data input is an array and the other is a scalar, each element of the array is computed with the scalar.
- If both data inputs are arrays of different sizes, the terminal with the longer array adapts to the shorter array size. A coercion dot appears on the terminal with the longer array. For example, if x is an array of five elements and y is an array of three elements, the fourth and fifth elements of x are discarded. The output is an array of the same size.
Overflow and Rounding of Output Terminals
The theoretical computed value is the mathematic result regardless of the valid range of your output data terminal. If the range of an output terminal is not large enough to hold the theoretical computed value, overflow occurs. In this situation, the function behaves according to the option you specify in the Overflow mode pull-down list in the configuration dialog box. You also can specify whether the function displays a Boolean operation overflow output terminal on the block diagram. You can use the value of this terminal to control how a VI behaves if overflow occurs.
In many situations, you can avoid overflow by placing a checkmark in the Adapt to source checkbox in the configuration dialog box of the function. If you place a checkmark in this checkbox, LabVIEW attempts to adjust the width and range of the output data type such that neither overflow nor rounding occurs. However, this adjustment is not possible in all situations. For example, if a function involves division, rounding always occurs. Also, some functions do not have this checkbox.