From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

16-ch Simultaneous DAQ with NI-9213

Solved!
Go to solution

Hi all,

First time poster, very new user to LabVIEW.  I've taken Core 1 & 2, but I have a long way to go with implementing LabVIEW still.

 

I'm currently struggling with a VI that will use NI-9213 to monitor 16 channels (all with type K thermocouples).  From browsing the forums and looking through examples, I've been able to get the VI to monitor 2 channels and plot them in real-time on an XY Graph.  Now, I'm trying to add a 3rd channel to the plot.  It's giving me errors every time I try to modify it to look at a 3rd channel, saying that the the clusters are different sizes.  I keep thinking that I have updated everything that I need to have, but I continually get this error.

 

Can anyone help steer me in the right direction, and hopefully help me understand how I can scale this up so that all 16 channels can be read?

0 Kudos
Message 1 of 7
(2,782 Views)

In your DAQ assistant you only have two channels configured.

 

You also need to change your array bundling like the following. (Use Concatenate Arrays)

 

Snap18.png

 

I think that should work.

 

mcduff

 

 

0 Kudos
Message 2 of 7
(2,759 Views)

I don't think McDuff's example is going to combine things the way you want them to.  Look in the Example Finder for XY Graph Data Types.  There are two different ways shown there on how to bundle data points together for multiple plots.  You'll have to see which works best for you.  Actually, you should just use a Waveform Graph since your X values are all equally spaced by 1.  There is an example for Waveform Graph Data Types as well.

 

Also, you can get by with just one index array when you separate your values.  Stretch downwards and you'll get indices 0, 1, 2, .... automatically without constants.  And there is no reason to convert the loop iteration terminal to a double.  It is an integer so leave it an integer.  Get rid of the To Double and change the representation of "Number of Data Points" to I32

 

16ch%20Thermocouple%20Data%20Log_2ch%20WORKS-1_BD

0 Kudos
Message 3 of 7
(2,751 Views)

Thanks for the advice RavansFan.  I think you're right - McDuff's example looks to put the counter value with each channel that I'm trying to log.  Seems superfluous to record the same data multiple times.

 

I took your advice and switched things over to a Waveform Graph.  Things still aren't working as I had hoped.  I think my struggles with this stem from my unfamiliarity with arrays in LabVIEW.  I need some practice with them.

 

Just as a review, here's what I'm trying to do-

  1. Read 5 thermocouples using the NI-9213 (I'm only trying to do 5 now, backed down from the 16 that I originally had)
  2. I would like the data to plot real-time on a graph so that we can see the relations between all channels
  3. At the conclusion (when the stop button is pressed), the data is exported to a text file, which we'll read with Excel
  4. It would also be beneficial to have the plot reset to empty when the VI is first run

 

I've had luck with the attached code to export the data - that part is working well.  But I'm still really struggling with the graph portion.  Would you be able to offer me some more guidance on how to get 5 plots simultaneously?

0 Kudos
Message 4 of 7
(2,694 Views)

How about trying this?

 

 

snip.png

 

mcduff

 

EDIT: Forget about this I was in a rush and not looking at it correctly.

0 Kudos
Message 5 of 7
(2,687 Views)

Here's a dumb question - when I do the build array function bringing in the zeros and then building it with the data from DAQ, it outputs a 2D array where yours outputs a 1D array.  What am I missing there?

 

Capture.JPG

0 Kudos
Message 6 of 7
(2,677 Views)
Solution
Accepted by topic author jordanat2012

You can right click the build array and choose concatenate inputs to have a 1-d array.

 

I think you want a 2-d array where each row is one of your sensors. Add a 0 and 1 to the of the parts of the bundle, and transpose your array before bundling, do not output the transposed array to the shift, it might work. I do not have LabVIEW here to test.

 

mcduff

0 Kudos
Message 7 of 7
(2,670 Views)