Rockwell Automation 1772-AF1,D17726.5.1 User Manual MINI-PLC-2/15 User Manual
Page 37
Programming
Chapter 3
3Ć29
Error Message
If you insert a zero for the number of values to be averaged, the error bit (bit 14)
is set and the result reads zero.
AF1 Standard Deviation Function
The AF1 standard deviation function determines the standard deviation of 3-
digit BCD numbers giving a 6-digit result with an implied decimal point after
the third digit. The maximum number of values you can handle is 999 or is
limited by the data table area available.
Standard deviation function uses the formula:
NJ
ȍ
(x
i
* x
avg
)
2
n
Nj
1/2
= xxx.xxx
Where:
X
i
= one of a group of N numbers whose standard deviation is being calculated
X
avg
= the arithmetic average of N numbers
How to Enter an AF1 Standard Deviation Function
To program an AF1 standard deviation 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 07, the function number for AF1 standard deviation.
This entry identifies that the function entered is to perform an AF1 standard
deviation and that the processor use the data table format shown in Figure 3.26
when executed. The three digits showing the number of inputs and the three
digits of each input value are represented in BCD by groups of bits labeled digit
1 through 3. The six digits of the result are labeled digit 1 through 6.