Subtract - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

Chapter 5. Function Block Diagram (FBD)
5.9.7

Subtract

Minimum number of
inputs = 2
Mnemonic Operation
SUB_INT
Q(16-bit) = IN1(16-bit) –
IN2(16-bit)
SUB_DINT Q(32-bit) = IN1(32-bit) –
IN2(32-bit)
SUB_REAL Q(32-bit) = IN1(32-bit) –
IN2(32-bit)
SUB_UINT Q(16-bit) = IN1(16-bit) –
IN2(16-bit)
Operands for Subtract
Parameter Description
Solve Order Calculated by the FBD editor.
IN1
The value to subtract from.
IN2 ... IN8
The value(s) to subtract from IN1. Must be
the same data type as IN1.
Q
The result of the subtraction. Must be the
same data type as IN1.
Properties for Subtract
Property
Valid Range
Number of Inputs
2 to 8
264
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
Maximum number of
inputs = 8.
Displays as
base 10 number with sign, up to 5 digits long
base 10 number with sign, up to 10 digits long
base 10 number, sign and decimals, up to 8 digits long (excluding
the decimals)
base 10 number, unsigned, up to 5 digits long
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 Overflow, unless an invalid operation occurs.
If a SUB operation results in Overflow, 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.)
Allowed Types Allowed Operands
NA
DINT, INT, REAL,
UINT
DINT, INT, REAL,
UINT variable
Optional
NA
No
All except S, SA, SB, SC No
All except S, SA, SB, SC No
All except S, SA, SB, SC
No
and constant
GFK-2950C

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents