LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

split signal using low level VIs

Hi,

 

I am trying to acquire signals from multiple channels using my USB 6001 and Labview 2014.

I am trying to use low level vi's and I need the output in 'dbl' from. But I am not able to get correct results. I am not able to separate the signals from different channels properly. I tried using 'for' loop and 'while' loop for this. Please find the attached vi.

Any help is appreciated.

 

Thanks

0 Kudos
Message 1 of 9
(3,963 Views)

Hi rk_t,

 

I need the output in 'dbl' from.

This is your VI:

check.png

You create a task to read 4 channels. In the loop you are reading those 4 channels and index the resulting sample array to get the 4 samples.

 

But I am not able to get correct results. I am not able to separate the signals from different channels properly.

From your VI everything should be fine.

Why do you think you don't get those 4 samples from your 4 analog inputs (in each iteration of the loop)?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(3,958 Views)

I see the same element in all the displays. I will try doing it once again.

0 Kudos
Message 3 of 9
(3,941 Views)

Hi rk,

 

I see the same element in all the displays.

Are there real sensors attached to your USB6001? Or are the input pins open/floating?

When the pins are open: due to the MUX you will notice ghosting on open analog inputs!

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(3,934 Views)

actual sensors are connected

0 Kudos
Message 5 of 9
(3,919 Views)

Hi rk,

 

actual sensors are connected

Did you check the cabling?

Are the sensors powered correctly?

Can you measure their signal when you use only one channel?

What about testing the sensor signal using a testpanel in MAX?

What have you tried so far? Where are you stuck?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(3,916 Views)

I am able to get the results when I acquire one channel at a time or I am currently acquiring 4 channels sequentially in a sequence structure(2 secs/continuous acquisition for each channel). 

0 Kudos
Message 7 of 9
(3,896 Views)

Hi rk,

 

I am able to get the results when I acquire one channel at a time or I am currently acquiring 4 channels sequentially in a sequence structure

Can you show your VI for both kind of "working DAQ"? How does your VI look like for "one channel" and how does it look like for "4 channels in a sequence"…

Can you also show a wiring diagram for your hardware attached to your DAQ device?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(3,882 Views)

Generally when one wants to acquire analog data, there's the concept of the "sampling rate" and the "number of samples".  This is done in MAX by setting the sampling "mode" (which can be "single sample", but more often is "Finite Samples" or "Continuous", which means "take multiple samples over and over until I say Stop".

 

You don't appear to have configured the Sampling Mode, which you do with the DAQmx Timing function.  Try the following -- put this down between Create Channel and Start Task.  Be sure to connect the Task Wire.  The defaults are Finite Samples (OK), 1000 Samples/Channel (OK), and 1000kHz sample rate (also OK, for this demonstration).

 

Remove the For Loop.  Change the DAQmx Read to Multiple Channels, Multiple Samples, and save it as 1D Array of Waveforms (each Waveform will have 1000 samples). On your Front Panel, drop a Waveform Chart, and wire this to the output of the DAQmx Read.  Now run it -- it will "pause" for a second (as the 1000 points a 1kHz = 1 second) are acquired, then you should see 4 1000-point plots on the Chart.

 

Note that you can also choose to have the DAQmx Read give you your 4 channels by 1000 points as a 2D Array.  However, when you plot it, you probably will see 1000 lines having 4 points, instead of 4 lines having 1000 points -- simply put a Transpose 2D Array on the 2D Array between Read and Chart to fix this.

 

Bravo on tackling DAQmx without using the Dreaded DAQ Assistant.  You just forgot to use the Timing function.

 

Bob Schor 

0 Kudos
Message 9 of 9
(3,855 Views)