LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to separate signal from waveform chart

Solved!
Go to solution

Hi everyone,

I'm using Arduino interface with Labview for acquiring signal. I use Analog Read N chan function. When I run the Labview. All signal display on a chart. I'd like to separate them to process later. How can I do that?

Thank youblock diagram.PNG

0 Kudos
Message 1 of 10
(2,220 Views)
Solution
Accepted by topic author lucbk

Hi holucbme,

 

I'd like to separate them to process later. How can I do that?

You already "separate" those signals by using the ArrayToCluster function…

 

General hints:

- Use shift registers to keep your own history of the measurement data.

- Use IndexArray function to get "signals" from your array - converting arrays to clusters is quite Rube-Goldberg!

 

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 10
(2,200 Views)
Solution
Accepted by topic author lucbk

Index the element you want from your output array.

0 Kudos
Message 3 of 10
(2,198 Views)

Thank 2 bro 🙂 I did it.

I also want to ask a small question. Before, I used the LIFA (not LINX like now) to acquire the signal. In LIFA, It had a continuous acquisition sample function which I can set the number of samples and sampling rate. My question is: where I can set the number of samples and sampling rate with LINX.

0 Kudos
Message 4 of 10
(2,176 Views)
Solution
Accepted by topic author lucbk

Hi holucbme,

 

I think this is explained in the LINX community

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 5 of 10
(2,164 Views)

Many thanks!

0 Kudos
Message 6 of 10
(2,159 Views)

Sorry for my silly ask again.

After I read out signal from Index Array VI, I want to see the its spectrum. When I wire it to Build Waveform VI, the signal in time domain looks fine but I didn't see its spectrum. Can you please help me to find out where is my problem?

block.PNGfront panel.PNG

0 Kudos
Message 7 of 10
(2,105 Views)

Hi holucbme,

 

so you create a waveform with exactly one sample in it.

From this single sample you try to calculate a spectrum - you know this is plain silly?

 

For a FFT calculation you need to collect some samples: the more samples the better the frequency resolution…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 8 of 10
(2,100 Views)

Thank for your quick answer.

I use Initialize Array VI to collect 100 samples but the spectrum isn't right. (I generate sin wave Vpp=3V and frequency = 10Hz from function generator.1.PNG2.PNG

 

0 Kudos
Message 9 of 10
(2,095 Views)
Solution
Accepted by topic author lucbk

Hi holucbme,

 

I use Initialize Array VI to collect 100 samples but the spectrum isn't right.

Wrong!

You don't "collect" samples by creating an array of 100 identical elements!

Btw. the spectrum is completely correct for that type of array: just a DC components and some noise due to computational residues…

 

Solution:

Collect those samples!

To collect data in an array you need a shift register and a BuildArray function!

(This is basic LabVIEW stuff so I recommend to take the FREE beginner tutorials offered by NI.)

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 10 of 10
(2,083 Views)