LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing signals with different sampling rate to file

Solved!
Go to solution

Hi all.

I have a somewhat periodic signal, every cycle of which has its charachteristics S.A max, min, mean, RMS ect. 

I would like to write *ALL* this data to a single file, with absolute timescale, where the cycle data will be time stamped with the maximum of the cycle.

the cycle data columns should be empty in times other than the peak value time of the signal.

That raises 2 questions:

 

1. Can I build a "waveform" with a non-constant sampling rate, where I just stamp each data point arbitrarily ? Will this help me get the result I want ?

2. Is there a better way to convince labview to write the cycle data next to the signal , with correct timestamp ?

 

An example is attached.

Thanks for any advice...

0 Kudos
Message 1 of 4
(3,824 Views)

I would recomend you store the data in two arrays. 1 is the value and 2 is the time stamp. You can take these two arrays and build a 2D array and write that directly into a write to file VI.

 

For storing properties like Max, Min and Mean you may consider using a TDMS file, which has an function set for setting channel properties.

 

Check out this code snippet for some ideas.

 

 TDMS stuff.png

 

 

-Hunter

Message 2 of 4
(3,782 Views)
Solution
Accepted by topic author armadillo

10x Heuter, your example was helpful - the problem is solved.

0 Kudos
Message 3 of 4
(3,762 Views)

You should mark my post as the accepted solution.

 

Thanks

Hueter

0 Kudos
Message 4 of 4
(3,729 Views)