LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to analyze an analog input as a waveform to get frequency and amplitude?

Hello, I am just starting to learn LabVIEW. I am attempting to read and analyze data acquired from a strain gauge/Wheatstone bridge through an op-amp to an Arduino UNO analog input. But for right now I am simply applying a sine wave to the analog input from a function generator that is offset with a ≈.5v amplitude with a low of ≈.1v and a high of ≈.6v. I can graph the input as a waveform chart but that can't be analyzed because it only reads it as a single last point, I tried using the chart history, but that still only read it as a single point.  I have LabVIEW 2014 and am using LVH-LINX for the Arduino communication.

 

What I need to do is analyze the matrix or the analog input as a waveform, calculating
1. The frequency
2. The amplitude
3. The time it takes for the amplitude to decline to point: N amplitude or better yet,
     The time between point: N1 and point: N2 amplitude

 

Any help would be very appreciated

 

 Thanks,

   Matt

 

Frequency measure.vi (dropbox)

 

 

 labview problem code.png

labview problem code panel.png

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

Matt,

 

It is difficult to tell from your image.  I did not try to download your VI from dropbox. Just attach the directly to your post.  There is a Choose File button just below the text box where you type your message.

 

1. You should probably be using the array datatype rather than the matrix datatype. Matrix is primarily for when you need to use specfic linear algebra VIs which only work on that datatype.

2. To analyze your waveform you need timing information. The t0 input is useless for this purpose. It just tells you when you started acquiring data. What you need is dt. This is equal to the reciprocal of the sample rate in hertz. It is NOT equal to some function of the communication rate between the Arduino and the LV program.

3. If you can get a valid (and constant) dt into your waveform, Extract Single Tone Information.vi will get frequency and amplitude.

4. How you measure the time for amplitude changes depends on noise levels, desired resolution, and other factors.

 

Lynn

0 Kudos
Message 2 of 3
(4,548 Views)
There is also a LOT of redundant code. (Really like feedback nodes don't you?)

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 3
(4,543 Views)