LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: how to reset Mean.vi

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

0 Kudos
Message 1 of 15
(2,885 Views)

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 .


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 15
(2,878 Views)

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.

 

0 Kudos
Message 3 of 15
(2,874 Views)

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????

rubeg.png

 

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.

 

0 Kudos
Message 4 of 15
(2,856 Views)
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 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

 

0 Kudos
Message 5 of 15
(2,893 Views)

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

 

0 Kudos
Message 6 of 15
(2,852 Views)

(blank)

0 Kudos
Message 7 of 15
(2,865 Views)

I am confused now....

But ok, if the thread stills here I only need a help to conclude my vi

0 Kudos
Message 8 of 15
(2,810 Views)

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!

0 Kudos
Message 9 of 15
(2,799 Views)

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

0 Kudos
Message 10 of 15
(2,760 Views)