Rockwell Automation 1772-L8_LW_LWP_LX_LXP,D17726.5.8 User Manual User Manual

Page 170

Advertising
background image

Three Digit Math Instructions

Chapter 13

13-2

Subtraction

Reports the difference between two Get values immediately preceding the
subtraction instruction. The second get word value is subtracted from the
first get word value. Programmed in the output position of the ladder
diagram rung. The difference is stored in the subtract instruction
word address.

072

095

G

070

134

G

071

039

-

When the difference is a negative number, the underflow bit (bit 16) in the
subtract instruction word is set. When your processor is in the Run, Test or
Run/Program mode, the negative sign is displayed on the industrial
terminal screen preceding the difference.

072

-034

G

070

100

G

071

134

-

Important: Use only positive values. If you use a negative BCD value
for subsequent operation, inaccurate results could occur.

Multiplication

Reports the product of two values stored in the Get instruction words
immediately preceding the multiply instruction. Programmed in the output
position of the ladder diagram. The product is stored in two multiplication
instruction words. The first word contains the most significant digit and
the second word contains the least significant digit. If the product is less
than six digits, leading zeros appear in the product.

052

503

G

130

123

G

131

061

X

051

007

X

Important: Use consecutive word addresses for the two addresses of the
multiply instruction.

Advertising