EAF
Process Control Instructions
Chapter 16
16-38
Rung 6
This rung displays the result with a decimal point implied but
not shown between the two words. Word 041 contains the 3
most significant digits and word (042) contains the 3 least
significant digits. The values of these words are not valid
until the done bit (04115) is ON. Word 040, the RESULT
ADDR(ess) of the EAF instruction, is used for intermediate
calculations and must not be manipulated by the user.
(Optional display rung)
If you want to average a new set of values, you must reset to zero:
1.
The accumulated value of the counter and the timer (034 and 033 in
this example).
2.
The data in the data address word, rung 5 (047 in this example).
3.
The results in the result words (041 and 042 in this example).
Standard Deviation
The Standard Deviation instruction determines the standard deviation of a
group of three digit values. The maximum number of values the
instruction can handle is 999 or is limited by the data table area available.
Standard deviation instruction uses the formula:
y
+
NJ
ȍ
(x
i
*
x
avg
)
2
n
Nj
1/2
Where:
x
i
= the group of values whose standard deviation you want to
calculate
x
avg
= the arithmetic average of the group of values
n
= the number of values in the group
Entry and Display of Input and Result Values
Figure 16.13 shows one method you can use to enter values and display
results of the 3 digit standard deviation. Although there are several
techniques for accomplishing this, we chose Get instructions.