beautypg.com

Rockwell Automation 1772-LS_LSP,D17726.8.6 PROG/OPER MANUAL-MINI PLC-2/05 User Manual

Page 267

background image

Quick Reference

Appendix C

CĆ11

Table C.J

Arithmetic Instructions

NOTE: Arithmetic instructions operate on BCD values in the data table. The word address XXX is displayed above the

instruction; the BCD value YYY which is the result of the arithmetic operation, is displayed beneath it. The BCD value is stored

in the lower 12 bits of the word address and can be any value from 000 to 999.
Displayed word addresses will be 3 or 4 digits depending on the data table size. When entering the word address, use a leading

zero if necessary.

Key Symbol

Instruction Name

1770-T3 Display

Rung Conditions

-( + )-

Add

XXX

-( + )-

YYY

The add instruction is an output instruction. It is always

preceded by two get instructions which store the BCD values to

be added.
When the sum exceeds 999, bit 14 is set. A 1 is displayed in

front of the result YYY.

-( - )-

Subtract

XXX

-( - )-

YYY

The subtract instruction is an output instruction. It is always

preceded by two get instructions. The value in the second get

address is subtracted from the value in the first.
When the difference is negative, bit 16 is set and a minus sign

is displayed in front of the result YYY.

-( X )-

Multiply

XXX XXX

-(X)-(X)-

YYY YYY

The multiply instruction is an output instruction. It is always

preceded by two get instructions which store the values to

be multiplied.
Two word addresses are required to store the 6 digit product.

-(

÷

)-

Divide

XXX XXX

-(

ч

)-(

ч

)-

YYY YYY

The divide instruction is an output instruction. It is always

preceded by two get instructions. The value of the first is

divided by the value of the second.
Two word addresses are required to store the 6 digit quotient.

its decimal point is placed automatically by the

industrial terminal.