12.07.2015 Views

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

372 Array (File)/Misc. <strong>Instructions</strong> (FAL, FSC, COP, CPS, FLL, AVE, SRT, STD, SIZE)Example 2:Average array_dint, which is DINT[4,5].dimension 1dimension 0subscripts0 1 2 3 40 20 19 18 17 161 15 14 13 12 112 10 9 8 7 65+ 4+ 3+ 2+1AVE ---------------------------------------15= = ----- = 35 5dint_ave = 335 4 3 2 1Relay LadderStructured TextSIZE(array_dint,1,length);sum := 0;FOR position = 0 TO (length-1) DOsum := sum + array_dint[position];END_FOR;dint_ave := sum / length;Publication 1756-RM003I-EN-P - January 2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!