11-02-2018 08:38 AM
Hi friends
I need something similar.
I need a vi tht when I press true signal, it collects data and when release the true or change to false, it gives me the average of data collected and resets the collector for the next true signal
best
cpalka
11-02-2018 09:01 AM
It will be much better to post a new thread than replying to one 14 years old.
Show some example that demonstrates your issue. And look at the point by point pallate .
11-02-2018 09:08 AM
Hi
Here is my project
It has 4 sensors, 2 displacement sensors, 1 temp, 1 proximity sensor.
The proximity sensor detects a steel plate (10cm long) on a moving table and counts a table pass and gives a true signal for during table passes acquiring data, after passing I need the average data from the 2 displacement sensors during the 10cm.
11-02-2018 11:48 AM
Your code is full or problems and the use of dynamic data does not help at all. For example what do you expect from this code????
I cannot look at any of your assistants (no DAQmx installed here), so I cannot tell what's in your dynamic data. Do you get multiple or single points?
I still recommend to contact the moderator to move this discussion to a new thread. It has nothing to do with the ancient discussion.
11-02-2018 11:48 AM - last edited on 11-02-2018 02:15 PM by Kristi_Martinez
It has 4 sensors, 2 displacement sensors, 1 temp, 1 proximity sensor.
The proximity sensor detects a steel plate (10cm long) on a moving table and counts a table passes (cycles) and gives a true signal for during table passes acquiring data, after passing I need the average data from the 2 displacement sensors during the 10cm.
Seems my example does not capture the right data. I use the collector but I am not sure if it collects only the proximity sensor is true.
Best
cpalka
11-02-2018 11:54 AM
Hi
O moved to a new post here
https://forums.ni.com/t5/LabVIEW/average-collected-data/td-p/3857854
About your question, when the proximity sensor is on (>3v) it gives a true signal for saving data and enable the collector...
About daq it configured for N samples.
The main problem is in the collectors and after that. Maybe it will be easier with a 1D array, when sensor is true, it builds an array, and when it is false calculates the average from array and resets it.
Arrays are not familiar to me...
cpalka
11-02-2018 01:28 PM - edited 11-02-2018 04:37 PM
(blank)
11-02-2018 04:28 PM
I am confused now....
But ok, if the thread stills here I only need a help to conclude my vi
11-02-2018 04:43 PM
Sorry, I am out. I don't work with dynamic data, ever! (and most of your VI make no sense to me at all)
Hopefully somebody else can jump in... Good luck!
11-03-2018 01:10 PM
Hi altenbach
Could you make a simple example that with a random number generator, a true buttom and...a kind of array or else that when you press true, it stores data into an array and after pressing, it gives a simple average value from stored values, and clean the array for next time.
Then I will try change it for mine.
cpalka