ISUB – Integer subtraction
Block SymbolLicensing group: STANDARD
Function Description
The ISUB block subtracts two integer input signals
. The
range of integer numbers in a computer is always restricted by the variable type. This block
uses the vtype parameter to specify the type. If the difference fits in the range of the given
type, the result is the ordinary sum. In the other cases the result depends on the SAT
parameter.
The overflow is not checked for , i.e. the output and the output value n corresponds with the arithmetics of the processor. E.g. for the Short type, which has the range of -32768..+32767, we obtain 30000 - -2770 = -32766
For the overflow results in setting the error output to and the n output to the nearest displayable value. For the above mentioned example we get 30000 - -2770 = 32767.
This block propagates the signal quality. More information can be found in the 1.4 section.
Input
i1 | First integer input of the block -9.22E+18 9.22E+18 | Long (I32) |
i2 | Second integer input of the block -9.22E+18 9.22E+18 | Long (I32) |
Parameter
vtype | Numeric type 4 | Long (I32) |
|
|
|
SAT | Saturation (overflow) checking | Bool |
|
|
|
Output
n | Integer difference between the input signals | Long (I32) |
E | Error indicator | Bool |
|
|
|
[Previous] [Back to top] [Up] [Next]
2024 © REX Controls s.r.o., www.rexygen.com