beautypg.com

Rockwell Automation 1772-AF1,D17726.5.1 User Manual MINI-PLC-2/15 User Manual

Page 22

background image

Programming

Chapter 3

3Ć14

Figure 3.9

AF1 Subtraction Function Input and Result Display Rungs

Bit

Storage

204

384

G

203

256

G

202

746

G

201

102

G

305

153

G

306

638

G

Execute Aux

Function

Function Number:
Data Addr:
Result Addr:

01

201
305

Error Message

If the result has more than six integers, the error bit (bit 14) is set indicating
overflow.

AF1 Multiplication Function

An AF1 multiplication function operates on two 6-digit BCD numbers and
presents the results in a 12-digit BCD number.

(+XXX XXX.) X (+ XXX XXX.) = +XXX XXX XXX XXX.

How to Enter an AF1 Multiplication Function

To program an AF1 multiplication function, perform the following steps:

1. Press [SHIFT][EAF] or [SHIFT][SCT] on the keyboard of your industrial

terminal. Figure 3.1 appears on the CRT.

2. Enter 03, the function number for AF1 multiplication.

This entry identifies that the function entered is to perform an AF1
multiplication and that the processor use the data table format shown in
Figure 3.10 when executed. Operands 1 and 2 represent two 6-digit numbers
whose product you want to find. The six digits of operand 1 are represented in
BCD by groups of bits labeled digit 1 through 6. Digit 1 and 6 are most
significant and least significant digits respectively. Operand 2 and the 12 digits
of the result are labeled similarly.