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

Page 45

Advertising
background image

Programming

Chapter 3

3Ć37

Entry and Display of Input and Result Values

Figure 3.34 shows one method for inserting the operand and displaying the
input value and result of an AF4 natural log function. Although there are
several techniques for accomplishing this, we chose get instructions. The first
rung requests an AF4 natural log function. The second rung shows the operand
648 in word 201 in the upper branch and the desired natural log 6.47389 in
words 305 and 306 in the lower branch.

Figure 3.34

AF4 Natural Log Function Input and Result Display Rungs

201

648

G

305

647

G

306

389

G

Bit

Storage

Execute Aux

Function

Function Number:
Data Addr:
Result Addr:

201
305

31

Error Messages

If you try to find the natural log of zero, the error bit is set and the result is zero.

AF4 Exponential Function

The AF4 exponential function finds the value of the exponential function ex.
The result is in terms of a base number r and a power of 10, s, by which the base
number is multiplied to obtain the exponential function value. The equation is:

e

+x

=r(10)

s

where:

x= +X.XX

r = resultant base number = X.XX

s = the exponent of 10 = +X.

How to Enter an AF4 Exponential Function

To program an AF4 exponential 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.

Advertising