LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problems with different type of data.

Hi,

I am using a DAQ9174, I am taking data from 4 channels, as I want a lot of data, I make a loop to get the data from it.

 

So the program has 4 channels, and it is token 1000 samples per channel, and it repeat it 60 times, so I have the 1000x4x60 data, and I want to plot every channel in one waveform graph, but I don't know how I can do it. If I took the data from spread sting out the for it is a 1D dimension, but if I take directly the dynamic data is a 2D array, but if I convert from Dynamic Data and take it outside the for it is a 3D array. 

 

Can anybody help me please?

0 Kudos
Message 1 of 5
(2,763 Views)

Show us some code. There are many ways to acquire data and you have a choice of data types (waveform, dynamic, array, etc.), so we don't really have enough information to tell what you are actually doing. You should also try to become more familiar with autoindexing.

 

You know the exact final size of the data. Initialize a 2D array (60000x4) in a shift register and replace with acquired data at the right insert point as data comes in. Once the loop is finished, everything will be there in the right size and shape..

0 Kudos
Message 2 of 5
(2,744 Views)

ATO,

 

Look at this example  https://decibel.ni.com/content/docs/DOC-12485. It is the Continuous AC and Graph with an internal clock. If you change the while loop to a for loop for 60 wired to the N, and change the Graph to a plot, it should work for you. The chart has an internal buffer which should be large enough to show your data.

 

 

0 Kudos
Message 3 of 5
(2,736 Views)

hi,

thank you for the exemple, the problem is that I want each channel in a different plot. For exemple the channel 0 is the voltage from a motor, and channel 1 is a voltatge from a power supply, I want as I show in the fron pranel. 

Download All
0 Kudos
Message 4 of 5
(2,711 Views)

Hi ATO,

 

As altenbach has said, based on what you've described you have a final known outcome of 4x60000 samples. You may be acquiring them in 4x1000 chunks, but if you initialise a 4x60000 array before the loop and replace 4x1000 subsets as you proceed through the acquisition you will end up with your 4x60000 2D array, which will graph as 4 channels with 60000 samples each.

 

All the best,

0 Kudos
Message 5 of 5
(2,691 Views)