LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

average and reset

Miaa,

I am assuming that your VI is not working at all like you are wanting, is this a fair assumption?

Your "Activate for collecting A_avg, B_avg, C_avg" and "Activate for collecting D_avg, E_avg, F_avg" buttons do not do anything at all.

You state that you are wanting to collect data for five minutes, how often are you wanting to collect this data?  Are you wanting one sample per second?  Etc etc.

We can help you get your program running the way you want, and we'll offer suggestions and provide examples on how to modify your program, but cannot write it all for you.

If you are able to get your .txt file logged successfully and are just wanting to know how to calculate the averages, we can begin with tackling that problem.  However, I think we'll want to break this up into smaller pieces to assist you with exactly what you are wanting to do.
Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
0 Kudos
Message 11 of 15
(891 Views)
Hi Jared_B,
 
The VI is working and the buttons are used during the program and they allow the user to make sure when he clicks the buttons ( A_avg, B_avg, C_avg" and "Activate for collecting D_avg, E_avg, F_avg ) the flow is monitored.
 
My basic concern right now is how to calculate average values of data ? That is how do you hold the previous value of data for addition of later values ....
0 Kudos
Message 12 of 15
(875 Views)
Miaa,

You will probably want to store this data in an array (or arrays).  You can continue adding to the array with the use of Shift Registers.  Let me know if you need any assistance with this.
Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
0 Kudos
Message 13 of 15
(861 Views)
array or arrays ? hmmm  can you kindly, see my attached VI and indicate what error am i making to add the previous values of A_avg,B_avg,C_avg to their respective values.
 
I am looking for a method by which i can collect the data over a time interval of 5 mins. And then transfer at the the end of 5minutes the three averages (A_avg,B_avg,C_avg ) of the data collected to the MAIN loop.
 
Similarly , i want to collect the data for 5 minutes before i can calculate the ( D_avg,E_avg,F_avg ) and transfer these values to the MAIN loop.
 
Once the values are transfered i will run the MAIN loop .
 
Thanks for taking time to reply to my question/s.
 
 
0 Kudos
Message 14 of 15
(845 Views)
Miaa,

You could add your data to an array or arrays in the following methods:

Array -- (add the 0 constant array - I forgot to add it for the picture, but you get the idea)



Arrays --




Message Edited by Jared_B on 07-14-2008 12:42 PM
Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
Download All
0 Kudos
Message 15 of 15
(815 Views)