EasyManuals Logo
Home>Allen-Bradley>Controller>Logix5000

Allen-Bradley Logix5000 Reference Manual

Allen-Bradley Logix5000
708 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #384 background imageLoading...
Page #384 background image
384 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 8 Array (File)/Misc. Instructions (FAL, FSC, COP, CPS, FLL, AVE, SRT, STD, SIZE)
Example 2: Average array_dint, which is DINT[4,5].
Relay Ladder
Structured Text
SIZE(array_dint,1,length);
sum := 0;
FOR position = 0 TO (length-1) DO
sum := sum + array_dint[position];
END_FOR;
dint_ave := sum / length;
Dimension 1
Dimension 0
0
20 19 18 17 16
15 14 13 12 11
10 9 8 7 6
5 4 3 2 1
1
2
3
01234
AVE
54321++++
5
----------------------------------------
15
5
------
3===
Sub
sc
r
ip
t
s
dint_ave = 3

Table of Contents

Other manuals for Allen-Bradley Logix5000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley Logix5000 and is the answer not in the manual?

Allen-Bradley Logix5000 Specifications

General IconGeneral
BrandAllen-Bradley
ModelLogix5000
CategoryController
LanguageEnglish

Related product manuals