Rockwell Automation AutoMax Enhanced Ladder Language Reference Manual User Manual
Page 205
10Ć3
Determining the Number of Elements on Which To Operate
When you are using an array instruction you must specify how many elements to
operate on per program scan. For example, if you want to move 10 elements of an
array to another array, you can move all 10 elements in one program scan or you can
move them 2 elements at a time over 5 program scans.
Having an instruction operate on a large number of elements per program scan can
significantly increase the time required for the program scan to complete. You can
reduce the impact of executing large array operations on a program scan by choosing
to perform the array operation in more than one program scan. This breaks up the large
execution time and spreads the operation over multiple scans.
To break up an array operation over multiple program scans, choose a portion of the
total number of elements to operate on per program scan. Then, during every program
scan in which the instruction is still true, the instruction operates on a portion of the
elements, advancing through the total number (Length) of elements.
For example, if you must operate on the 20th through the 29th element within an array
(10 elements), you can choose to only operate on 5 elements per program scan. The
sequence of events would be:
D Program Scan 1:ąThe instruction prepares this array operation.
D Program Scan 2:ąElements 20 through 24 are operated on.
D Program Scan 3:ąElements 25 through 29 are operated on.
However, some disadvantages of breaking up an array operation exist. They are:
D The array instruction's operation is not completed (DN is true) for several program
scans. This could impact the timeliness of other logic execution that requires the
result of an array operation.
D The actual array operation begins on the second program scan. The instruction
uses the first scan to set up the instruction. Whereas, if all the array elements are to
be operated on in one scan, the instruction sets up and performs the operation in
one scan.