06-29-2017 10:33 AM - edited 06-29-2017 10:37 AM
In the file attached, an array of binary numbers is used as trigger. When the trigger outputs 1, the element in the other array (data array) is recorded at the same index in the trigger array (this index can be shifted by the "index shifter").
What I would like to achieve:
When the trigger outputs 1, N number of elements of consecutive index is measured from the same index in the trigger array. The constant N can be changed via a control. And then these consecutive measurements are averaged and recorded to a text file.
Example: If N=3
Trigger array Data array
index element index element
0 1 0 1
1 0 1 2
2 0 2 3
3 1 3 4
4 0 4 5
5 0 5 6
(1+2+3)/3=2 (4+5+6)/3=5
Outputs: 2 5
Any help is greatly appreciated, thank you!
Solved! Go to Solution.
06-29-2017 10:47 AM