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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Array (File)/Misc. <strong>Instructions</strong> (FAL, FSC, COP, CPS, FLL, AVE, SRT, STD, SIZE) 369destination := sum / length;See Appendix B for information on the syntax of constructs withinstructured text.CONTROL StructureMnemonic Data Type Description.EN BOOL The enable bit indicates that the AVE instruction is enabled..DN BOOL The done bit is set when the instruction has operated on the last element in the Array (.POS= .LEN)..ER BOOL The error bit is set if the instruction generates an overflow. The instruction stops executinguntil the program clears the .ER bit. The position of the element that caused the overflow isstored in the .POS value..LEN DINT The length specifies the number of elements in the array on which the instruction operates..POS DINT The position contains the position of the current element that the instruction is accessing.Description:The AVE instruction calculates the average of a set of values.IMPORTANTMake sure the Length does not cause the instruction to exceedthe specified Dimension to vary. If this happens, the Destinationwill be incorrect.Arithmetic Status Flags:Arithmetic status flags are affected.Fault Conditions:A Major Fault Will Occur If Fault Type Fault Code.POS < 0 or .LEN < 0 4 21Dimension to vary does not exist for thespecified array4 20Publication 1756-RM003I-EN-P - January 2007

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

Saved successfully!

Ooh no, something went wrong!