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:
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].
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.
|Note Because the encoding, word length, and integer word length determine the value range of a terminal, the value range also is a factor in determining supported fixed-point configurations.|
The following list shows the possible limitations an input terminal might have.
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.
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.
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.
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.
|Note Overflow also occurs if the High Throughput Divide or High Throughput Reciprocal function attempts to divide by zero.|
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.