Rockwell Automation 1772-LV Mini-PLC - 2/15 Programmable Controller (Series B) Programming and Operations User Manual

Page 56

Advertising
background image

Fundamental Instruction Set

Chapter 5

5Ć19

performs arithmetic and data manipulation operations only with 3-digit BCD
values.

Subtraction

Symbol: -(-)-

Purpose: Reports the difference between two values stored in the get
instruction words. The second get word value is subtracted from the first get
word value.

Syntax: programmed in the output position of the ladder diagram rung. Your
difference is stored in the subtract instruction word address.

Function: When the difference is a negative number, the underflow bit (bit 16)
in the subtract instruction word is set. When you are in the run, test, or run
program mode, the negative sign will appear on the industrial terminal screen
preceding the difference.

NOTE: Use only positive values. If a negative BCD value is used for
subsequent operation, inaccurate results could occur. The processor only
compares, transfers and computes the absolute BCD value.

Multiplication

Symbol: -(x)-(x)-

Purpose: Reports the product of two values stored in the get instruction words.

Syntax: Programmed in the output position of the ladder diagram. Your
product is stored in two multiplication instruction word addresses. If the
product is less than 6 digits, leading zeros will appear in the product.

NOTE: For good documentation habits we recommend using consecutive word
addresses.

Division

Symbol: -(:)-(:)-

Purpose: Reports the quotient of two values stored in the get instruction
words.

Syntax: Programmed in the output position of the ladder diagram rung. your
quotient is stored in two divide instruction word addresses.

NOTE: For good documentation habits we recommend using consecutive word
addresses. Quotient is expressed as a decimal, accurate to 3 decimal places.
Any remaining data is truncated. Although division by 0 is undefined
mathematically, the division of a number including 0 : 0 will give the result of

Advertising