Rockwell Automation 1772-AF4,D17726.5.3 User Manual, AUX FUNCT PROM User Manual

Page 22

Advertising
background image

Programming

Chapter 3

3Ć14

Figure 3.5

AF4 Addition Function Input and Result Display Rungs

201

102

G

202

746

G

203

256

G

204

384

G

305

359

G

306

130

G

Bit

Storage

Execute Aux

Function

Function Number:
Data Addr:
Result Addr:

01

201
305

Error Message

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

AF4 Subtraction Function

An AF4 subtraction function operates on two 6-digit BCD numbers and
presents the result in a third 6-digit BCD number.

(+xxx xxx/ - +xxx xxx.) = +xxx xxx.

How to Enter an AF4 Subtraction Function

To program an AF4 subtraction 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 02, the function number for AF4 subtraction.

This entry identifies that the function entered is to perform an AF4 subtraction
and that the processor use the data table format shown in Figure 3.6 when
executed. Operands 1 and 2 represent the two 6-digit numbers whose difference
you want to find. The six digits of operand 1 are represented in BCD by the
group of bits labeled digit 1 through 6. Digit 1 and digit 6 are the most
significant and the least significant digits respectively. This digit labeling
system also applies to operand 2 and the result.

Advertising