Chapter 5. Function Block Diagram (FBD)
264
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
GFK-2950C
5.9.7
Subtract
Subtracts the operands IN2 …IN8 from the operand IN1
and stores the result in the output variable assigned to
Q.
The calculation is carried out when SUB is performed
without
, unless an invalid operation occurs.
, the result wraps
around. For example:
▪
If a SUB_DINT, SUB_INT or SUB_REAL operation is
performed on 32768 - 1, Q will be set to -32767.
If a SUB_UINT operation results in a negative number,
Q wraps around. (For example, a result of
–
1 sets Q to
65535.)
Minimum number of
inputs = 2
Maximum number of
inputs = 8.
Mnemonic Operation
Displays as
SUB_INT
Q(16-bit) = IN1(16-bit)
–
IN2(16-bit)
base 10 number with sign, up to 5 digits long
SUB_DINT Q(32-bit) = IN1(32-bit)
–
IN2(32-bit)
base 10 number with sign, up to 10 digits long
SUB_REAL Q(32-bit) = IN1(32-bit)
–
IN2(32-bit)
base 10 number, sign and decimals, up to 8 digits long (excluding
the decimals)
SUB_UINT Q(16-bit) = IN1(16-bit)
–
IN2(16-bit)
base 10 number, unsigned, up to 5 digits long
Operands for Subtract
Parameter Description
Allowed Types Allowed Operands
Optional
Solve Order Calculated by the FBD editor.
NA
NA
No
IN1
The value to subtract from.
DINT, INT, REAL,
UINT
All except S, SA, SB, SC No
IN2 … IN8
The value(s) to subtract from IN1. Must be
the same data type as IN1.
All except S, SA, SB, SC No
Q
The result of the subtraction. Must be the
same data type as IN1.
DINT, INT, REAL,
UINT variable
All except S, SA, SB, SC
and constant
No
Properties for Subtract
Property
Valid Range
Number of Inputs 2 to 8
Summary of Contents for PACSystems RX7i
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451...