beautypg.com

Programming chapter 3 – Rockwell Automation 1772-AF4,D17726.5.3 User Manual, AUX FUNCT PROM User Manual

Page 46

background image

Programming

Chapter 3

3Ć38

2.

Enter 32, the function number for an AF4 exponential function.

This entry identifies that the function entered is to perform an AF4 exponential
calculation and that the processor use the data table format shown in
Figure 3.35 when executed.

Figure 3.35

General AF4 Exponential Function Word and Digit Format

17 16 15 14 13 12 11 10 7 6 5 4 3 2 1 0

Digit 1

(MSD)

Digit 2

Bit No.

Data Address

m

Digit 2

Operand

Digit 2

Result Address

n

Result Base r

D

E

n + 1

E = Enable Bit (1 = Function in Progress)

D = Done Bit (1 = Function Complete)

MSD = Most Significant Digit

LSD = Least Significant Digit

11504

Digit 3

(LSD)

Digit 3

Digit 1

(MSD)

Digit 1 (MSD)

Digit 3

(LSD)

S = Sign Bit (1 = Negative)

S

S

(LSD)

(Always = 0)

(Always = 0)

s (Power of 10)

3.

Enter a data address and a result address.

If we choose a data address of 200 and a result address of 305, the AF4
establishes the data table format shown in Figure 3.36. The three digits of the
word 200 are reserved for the operand (the power to which e is being raised).
The result address is reserved for the three digits of 4, the base number of the
answer with an implied decimal after the MSD. The next higher address, word
306, is reserved for s, the power of 10. The implied decimal point of exponent s
is after the LSD; the MSD and digit 2 are always zero. The base number r is
accurate to +.01.

Figure 3.36

AF4 Exponential Function Format After Address Entry

17 16 15 14 13 12 11 10 7 6

5 4

3

2

1

0

Digit 1

(MSD)

Digit 2

Bit No.

Data Address

Digit 2

Operand

Digit 2

Result Address

Result Base r

D

E

E = Enable Bit (1 = Function in Progress)

D = Done Bit (1 = Function Complete)

MSD = Most Significant Digit

LSD = Least Significant Digit

11505

Digit 3

(LSD)

Digit 3

Digit 1

(MSD)

Digit 1 (MSD)

Digit 3

(LSD)

S = Sign Bit (1 = Negative)

S

S

(LSD)

(Always = 0) (Always = 0)

s (Power of 10)

200

305

306