LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read, save and find average

Hi all, 

 

I am new to Labview and need some help please.

 

I need to read data from frequency counter (e.g. 50.000123 MHz), save it and do a simple calculation (find an average).

 

I only know how to read the data. I would like to display the every 5 or 10 values (in a block of array) save it and then take an average of them.

 

Just to aknowledge the attached file is not my work but it works with my frequency counter and I found it on this forum.   

 

 

Thanks     

0 Kudos
Message 1 of 8
(2,656 Views)

I'm unable to open your vi. But after examining your question you need the following vi.

Use Meanptbypt.vi and use 5 as a sample lenght.

This one is found in the Signal processing>Point by point>Probability

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 2 of 8
(2,638 Views)

KoenR94, you are absulotly right.  Ihaveattacheditagain

0 Kudos
Message 3 of 8
(2,629 Views)

Oh i meant my version of LV is to low.

In order for me to see it you can convert it to 2011.

File>Save for previous version

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 4 of 8
(2,622 Views)

I have converted to version 11.0 and hopefully it is the 2011 version. 

0 Kudos
Message 5 of 8
(2,610 Views)

@Hoverman wrote:

Hi all, 

 

I am new to Labview and need some help please.

I need to read data from frequency counter (e.g. 50.000123 MHz), save it and do a simple calculation (find an average).

I only know how to read the data. I would like to display the every 5 or 10 values (in a block of array) save it and then take an average of them.

Just to aknowledge the attached file is not my work but it works with my frequency counter and I found it on this forum.   

 

 

Thanks     


To do what you want, you need a for loop and a shift register. If you don't know how to work with these yet (or couldn't have constructed the VI you attached on your own), I would suggest starting your learning curve with one or more of the LabVEW (note spelling) tutorials on the Web, some of which are listed below. Have fun.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 6 of 8
(2,602 Views)

Camerond: I have done tutorials and had a look at the LV examples, but I have not been able to find the right solution. 

 

I have attached an image of block diagram in case you can't open my original file. 

 

Using the waveform chart, I am able store data then right click on it and export a list of frequency readings ( one reading per second) and past it into Notepad.


0  0E+0
1  0E+0
2  5.000006E+7
3  5.000009E+7

 

My question is how do I process this data i.e. find the difference between several readings or display every readings like a column of data?  

 

Thanks 

0 Kudos
Message 7 of 8
(2,576 Views)

I can open your VI, don't worry about that. Images do me no good.

 

Well, do you know how a for loop works? And a shift register? (Actually, you can do this without a shift register because you are generating an array, but IMHO, it's a better solution.)

 

 Think of what you have to do in the programand write the steps down. Translating the steps into LabVIEW is your last step - It actually comes pretty naturally if you think about what you would have to do physically if you're the computer (since your steps chronologically are analogous to LabVIEW's dataflow), then you just have to figure out which output from one subVI or function goes to the input of the next subVI or function (i.e., syntax).

 

 BTW, the time function and "Time Delay" express VI are redundant. Take out the express VI.

 

And, if you just want to write a column of data, isn't "write to spreadsheet file" doing that?

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 8 of 8
(2,556 Views)