ErikG
Member
I"m trying to average an array of DINT's called FIFO_ARRAY. It has 1000 elements in it. Here is what I have entered into the AVE instruction:
Array- FIFO_ARRAY[0]
Dim. To Vary- 0
Dest- Average (DINT data type tag)
Control- AgerageControl (CONTROL type data tag)
Length- based on position of my FIFO.
Position- I initially set to 0
What happens is The instruction divides the value of FIFO_ARRAY[0] by the value in the length spot, but doesn't look at anything else in the Array. I have tried pointing the instruction to the entire array (FIFO_ARRAY) instead of to the specific element and it does the same thing.
Any help on this would be wonderful!
Array- FIFO_ARRAY[0]
Dim. To Vary- 0
Dest- Average (DINT data type tag)
Control- AgerageControl (CONTROL type data tag)
Length- based on position of my FIFO.
Position- I initially set to 0
What happens is The instruction divides the value of FIFO_ARRAY[0] by the value in the length spot, but doesn't look at anything else in the Array. I have tried pointing the instruction to the entire array (FIFO_ARRAY) instead of to the specific element and it does the same thing.
Any help on this would be wonderful!