14ć8, Multiplication and division – Rockwell Automation 1772-L8_LW_LWP_LX_LXP,D17726.5.8 User Manual User Manual

Page 180

Advertising
background image

EAF Math Instructions

Chapter 14

14-8

This EAF multiplies (or divides) two numbers. Word formats for
multiplication and division are the same. The only difference between the
two EAFs is their function numbers: multiplication is 03 and division is 04.
Both of these functions limit calculations to six digits per operand, stored
anywhere within the 12 available digits.

(+/- xxx xxx . xxx xxx) x or / (+/- xxx xxx . xxx xxx)= +/- yyy yyy . yyy yyy

or

(+/- Operand A) x or / (+/- Operand B) = +/- Result

Enter an EAF rung like that shown in Figure 14.6.

Figure 14.6

EAF Multiplication Input and Result Display Rungs

060

080

EXECUTE AUX

FUNCTION

FUNCTION NUMBER:

DATA ADDR:

RESULT ADDR:

03

040

060

G

061

300

G

062

000

G

063

000

G

040

G

041

400

G

042

000

G

043

000

G

050

000

G

051

G

200

052

000

G

053

000

G

000

Enter the values for Operands A and B. The quotient of the Division EAF
is expressed as a decimal. The first 5 most significant digits are accurate.
Division by zero (including 0/0) gives the result of 999.999 and the
overflow bit is set. This result differs from the PLC-2/20 and PLC-2/30
processors where 0/0 = 1.000.

Entry of Operand A = 000 400 000 000 and Operand B = 000 200 000 000
produces the result 080 000 000 000 for multiplication (Figure 14.6) or
000 002 . 000 000 for division. Figure 14.7 shows how the words are
stored in the data table.

Multiplication and Division

Advertising