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

Page 255

Advertising
background image

EAF

Process Control Instructions

Chapter 16

16-44

Standard Deviation
The Standard Deviation instruction determines the standard deviation of a
group of six 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 6-digit standard deviation. Although there are several
techniques for accomplishing this, we chose Get instructions.

Figure 16.13

6ĆDigit Standard Deviation Ladder Diagram

EXECUTE AUX

FUNCTION NUMBER:

DATA ADDR:

RESULT ADDR:

07

0040

0160

00

0030

005

G

0031

005

G

FUNCTION

150

EN

FILE TO FILE MOVE

COUNTER ADDR:

POSITION:

FILE LENGTH:

0033

001

021

FILE A:

FILE R:

RATE PER SCAN

0040-0064

0160-0204

021

DN

0033

17

0033

15

000

0171

001

G

0172

414

G

0170

0173

210

G

010

00

G

The first eight words after the result address are used for intermediate
calculation. The standard deviation ladder diagram is the same as the
ladder diagram for averaging with the exception already discussed. The
result address stores intermediate calculations in the first 8 words
(160-167) and the final result in the next 4 words (170-173, the implied
decimal point is after word 171). The done bit is 17015.

Advertising