scottmurphy
Member
- Join Date
- Oct 2004
- Posts
- 363
I am new to ST, I want to sum the average of an Array.
The array length is 26 variables.
I actually need the average, but there is another 3 variables
that are not part of this array that need to be included.
Instead of calculating the total as below, can I do this
in one command?
total := range[0] + range[1] + range[2];
Will save 26 repeat '+' instructions, and give me something else to use, that is more readable than doing it in ladder.
The array length is 26 variables.
I actually need the average, but there is another 3 variables
that are not part of this array that need to be included.
Instead of calculating the total as below, can I do this
in one command?
total := range[0] + range[1] + range[2];
Will save 26 repeat '+' instructions, and give me something else to use, that is more readable than doing it in ladder.