Rockwell Automation 1772-L8_LW_LWP_LX_LXP,D17726.5.8 User Manual User Manual

Page 254

Advertising
background image

EAF

Process Control Instructions

Chapter 16

16-43

Rung 1

The EAF rung calculates an average upon a false-to-true
transition of bit 15000. This bit must remain energized until
the done bit (bit 16115 in this example) is energized.

Word 0030 the number of samples you want to average.

Word 0031 the number of samples to sum per scan
(from 1 to the total number of samples).

The Data Address of the EAF (040) is reserved for the preset
position. Each value to be averaged requires four
consecutive data table words, beginning at word 041 in this
example. The result address stores intermediate calculations
in the first word (160) and the final result in words 161-163.

Rung 2

This rung is conditioned with a branch end to keep the
File-to-File Move from becoming true. The data values to be
averaged are in addresses 0041-0064. Each value uses 4
words (the format is xxx xxx . xxx xxx). The first word
(0040) is reserved for present position value. (Optional
display rung)

Rung 3

This rung displays the result of the EAF instruction. Word
0160 is an intermediate summation. You do not have to
put this word in the rung. There is an implied decimal
point between words 162 and 163. (Optional display rung)

If you want average a new set of values, you must do the following:

1.

Zero the data in the data address or present position word (040 in
this example).

2.

Initiate a false to true transition of bit 15000.

Advertising