tarrant79
Member
Cant get FILO array to work to filter AI input
Hi, Probably some stupid mistake, I have a wildly fluctuating AI input. So Im trying to filter it by populating a Array[20] at first scan with the current AI values. Then I try to pop the oldest AI value from the array with LFU and push the newest AI value into the array with LFL. Then I use AVE to average the array and use that value. The AVE funct work, but my LFU/LFL just keeps loading Array[0] with the current value.....AND not pulling the old values out of the end of the array.
Hi, Probably some stupid mistake, I have a wildly fluctuating AI input. So Im trying to filter it by populating a Array[20] at first scan with the current AI values. Then I try to pop the oldest AI value from the array with LFU and push the newest AI value into the array with LFL. Then I use AVE to average the array and use that value. The AVE funct work, but my LFU/LFL just keeps loading Array[0] with the current value.....AND not pulling the old values out of the end of the array.