06-13-2018 02:02 AM
I have a real time data. I read it in Labview and did a FFT on it which was then connected to a waveform graph. Now I tried plotting it and I got the expected graph shape.
I tried doing the same thing with "Origin Lab" software and it also gave me the same graph(same in shape). However, the X-axis units were completely different for both. In origin I get the peak frequency as 550 Hz where as Labview gives me something like 4 or 5 units in the x axis. I got to know that the Origin result is right and the labview result is wrong. Only if I change the multiplier value in the graph properties in Labview, I get the required result.Why is that? How do I correct this error? I want to correct this error as it is much easier to collect and store data using Labview.
I have attached my VI here(It might look messy,but you only need to check two graphs: Fast Fourier Transform( Scaled) and Fast Fourier Transform(Unscaled).
Also, I have attached the Origin Lab graph.
Solved! Go to Solution.
06-13-2018 02:27 AM
06-13-2018 03:27 AM
Sorry. I have uploaded them here.
06-13-2018 03:36 PM
You converted your dynamic data type signal (blue wire) which contains all of the timing information of the raw signal to just an array of values. The FFT doesn't know what the dT was of the original signal, it just assumes it is one second.
Refer back to what I told you in this message https://forums.ni.com/t5/LabVIEW/Graph-Units-in-Labview/m-p/3802856#M1073408
06-26-2018 02:18 AM
Thanks a lot! I will try rectifying this issue and get back to you.
07-27-2018 06:08 AM
How do I make LabVIEW understand that my dt= 1/20000 of 0.02 seconds?
07-27-2018 07:08 AM
07-27-2018 07:34 AM
Following up on GerdW's comment, an Array is just a series of numbers. Data Samples are more than that -- they are a series of numbers taken at equally-spaced units of time. LabVIEW is one of the few Programming Environments that treats time as an integral part of the paradigm, having Time functions and Data formats (the Waveform) that explicitly include Time.
If you look in the Signal Processing Palette, you should see the Wfm Measure sub-palette. Here you can find Spectrum routines that take Waveforms as their input (so "dt" is known) and return scaled spectra (with "df" returned).
If you are serious in learning how to use LabVIEW to solve Engineering problems, you should try to avoid Express VIs (which lock you into a limited set of choices) and also avoid Dynamic Data Wires, which similarly "bury the details" and tend to throw them away when you need to use the data. For example, you used "Convert from Dynamic Data", but chose the default, a simple Array, losing the timing properties buried in the Dynamic Data. If you started with Waveforms and kept them throughout, your code would be much easier to understand and would be more likely to work.
07-31-2018 07:35 AM
Thank you so much. I will keep that in mind! I guess ill have to make lot of modifications to my program.