Chapter 5. Function Block Diagram (FBD)264 PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual GFK-2950C5.9.7 SubtractSubtracts the operands IN2 …IN8 from the operand IN1and stores the result in the output variable assigned toQ.The calculation is carried out when SUB is performedwithout Overflow, unless an invalid operation occurs.If a SUB operation results in Overflow, the result wrapsaround. For example:▪ If a SUB_DINT, SUB_INT or SUB_REAL operation isperformed 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 to65535.)Minimum number ofinputs = 2Maximum number ofinputs = 8.Mnemonic Operation Displays asSUB_INT Q(16-bit) = IN1(16-bit) –IN2(16-bit)base 10 number with sign, up to 5 digits longSUB_DINT Q(32-bit) = IN1(32-bit) –IN2(32-bit)base 10 number with sign, up to 10 digits longSUB_REAL Q(32-bit) = IN1(32-bit) –IN2(32-bit)base 10 number, sign and decimals, up to 8 digits long (excludingthe decimals)SUB_UINT Q(16-bit) = IN1(16-bit) –IN2(16-bit)base 10 number, unsigned, up to 5 digits longOperands for SubtractParameter Description Allowed Types Allowed Operands OptionalSolve Order Calculated by the FBD editor. NA NA NoIN1 The value to subtract from. DINT, INT, REAL,UINTAll except S, SA, SB, SC NoIN2 … IN8 The value(s) to subtract from IN1. Must bethe same data type as IN1.All except S, SA, SB, SC NoQ The result of the subtraction. Must be thesame data type as IN1.DINT, INT, REAL,UINT variableAll except S, SA, SB, SCand constantNoProperties for SubtractProperty Valid RangeNumber of Inputs 2 to 8