LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does labview do the Fourier transform of the cluster?

As shown in the figure below, I bundled the two arrays collected together to form a waveform, and then wanted to make a Fourier transform on this waveform, but I found that there was no way to convert it into a time-domain waveform to connect. 😥

 

微信图片_20221026180100.jpg

 

微信图片_20221026180110.jpg

 

 

0 Kudos
Message 1 of 8
(1,500 Views)

Hi XHLL,

 


@XHLL wrote:

I bundled the two arrays collected together to form a waveform,


Wrong!

You don't create a waveform by bundling two arrays into a cluster. You create a XY plot - which is completely different to a waveform…

 

Is your X array (aka timestamp array) using evenly spaced values? Then you just need the start time and dt to build a waveform using the functions in the waveform functions palette!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(1,475 Views)

Hi GerdW,

 

I didn't exactly create a XY graph.

In fact, these two arrays were generated by using instructions to query the waveforms on the oscilloscope.

So your method may not apply to me.Thank you for your reply!

 

Best regards,

XHLL

 

0 Kudos
Message 3 of 8
(1,461 Views)

Then we need to see the user manual of the device you're using.

 

Also, please upload your VI and use Save to Previous to, at least, LabVIEW 2018. They are better than uploading only images of partial code.

0 Kudos
Message 4 of 8
(1,445 Views)

Hi XHLL,

 


@XHLL wrote:

I didn't exactly create a XY graph.

In fact, these two arrays were generated by using instructions to query the waveforms on the oscilloscope.


When you bundle two 1D array into a cluster and show that cluster on a graph then you are using a XY graph…

It doesn't help to call that cluster a "waveform" as waveforms are another distinct datatype in LabVIEW!

 

As has been said: describe your problem with more details, provide code and links to related manuals!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 8
(1,410 Views)

@XHLL wrote:

As shown in the figure below, I bundled the two arrays collected together to form a waveform, and then wanted to make a Fourier transform on this waveform, but I found that there was no way to convert it into a time-domain waveform to connect. 😥

 

微信图片_20221026180100.jpg

 

微信图片_20221026180110.jpg

 

 


First, you have a glaring race condition because that property node will probably get read way before the indicator receives new data, so you either get nothing or process the result from a previous run in the same session..

 

In the image, you do an FFT of the Y array (NOT a cluster!), which has no timing information, but if you know the time spacing between the equally spaced points, you can calculate df from dt from first principles. You can use "build waveform" to add the timing information or you can just use the plain FFTs and handle the timing out of band.

 

No matter what, your code should give you an fft in shape, but it assumes a dt=1. If you don't get anything, something else is wrong (maybe the race condition?).

 

Attach your VI and some data and we will point you in the right direction. Also please never hide (or delete?) the label of terminals.

0 Kudos
Message 6 of 8
(1,380 Views)

Here is my VI , the purpose of this code is to query the waveform information of the oscilloscope with commands to build XY plots and I want to Fourier transform it, as you said, I can probably add "create waveform" to achieve this! I'll give it a try!

0 Kudos
Message 7 of 8
(1,352 Views)

I uploaded my VI to the conversation above and the zip is the manual for the instrument, thanks for your reply.

0 Kudos
Message 8 of 8
(1,347 Views)