EasyManuals Logo

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 #391 background imageLoading...
Page #391 background image
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 391
Array (File)/Misc. Instructions (FAL, FSC, COP, CPS, FLL, AVE, SRT, STD, SIZE) Chapter 8
Structured Text
Structured text does not have an STD instruction, but you can achieve the same
results by using a SIZE instruction and a FOR...DO or other loop construct.
SIZE(array,0,length);
sum := 0;
FOR position = 0 TO length-1 DO
sum := sum + array[position];
END_FOR;
average := sum / length;
sum := 0;
FOR position = 0 TO length-1 DO
sum := sum + ((array[position] - average)**2);
END_FOR;
destination := SQRT(sum /(length-1));
See Structured Text Programming
for information on the syntax of constructs
within structured text.

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