Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Building a multi-daq acquisition system to track 32 analog channels

I am having some trouble getting consistent long term readings from my 4 usb-6212 NI daqs. I am trying to get them to connect to as few computers as possible but this seems to overtax the cpu and i get huge slow downs on my data capture. All I am interested in is recording the voltage in from my sensors and displaying/storing that data at a rate of about 50Hz. What is the best way to do this? I have 32 channels I want to put on a computer. I have one other laptop that I could use as well if absolutely necessary though.

0 Kudos
Message 1 of 12
(4,720 Views)

I'm left to assume these are differential analog inputs since you have 4 of them (the 6212 has 16 AI when SE).

 

What other processing are you doing with this data?  If it is just a simple read, log, and display, this shouldn't be that CPU intensive.

 

Because of channel count, I would have gone with a USB-6225 (assuming you need to stick with USB).  You can then make one task to do all of the reading of the data and just index out the data you need from there.  You could also use the DAQmx stream to TDMS feature to do all of your logging for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 12
(4,717 Views)

the 6212 are what they have here I can't buy any others.

 

I have a few force sensitive resistors and i just need to track how the voltage changes for different degrees of pressure, could i use the other 8 bnc plugs? I thought it only had 8 Analog inputs since that was how they were labeled.

 

Yes that is all i need to do, read voltage, plot voltage per channel, and record all the data in a big file with the channels labelled. My problem is the graphing just etches along super slow when i have 32 streams coming in at once. I am trying to work a consumer producer queue architecture into things now but having some trouble is that the only way to do this?

0 Kudos
Message 3 of 12
(4,713 Views)

I would do a setup like this.  Put all of the data acquisition reading in a single loop.  You want a task for each device.  Read as a waveform.  Then use Build Array to combine all of the waveforms.  Take this array straight to a waveform chart.  You can use a queue to send this array to the data logging loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 12
(4,701 Views)

I was afraid that this was the only way. Well at least all the sensors are the same and I can just copy/paste 31 times!

 

What is the difference between having 32 individual lines for acquisition vs using the daq assistant to get the data? Is this faster?

 

 

0 Kudos
Message 5 of 12
(4,697 Views)

This is a little faster.  The DAQ Assistant has some extra overhead that we much prefer to avoid.

 

And you want a task for each DEVICE, not line.  So each USB-6212 will have its own task.  So you will only have 4 tasks running around, not 32.  And I recommend making a subVI for the setup.  Then you just call the subVI 4 times instead of copying all of that code.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 12
(4,692 Views)

What do you mean? In the example you posted you have a line for each daq channel. I am NOT doing this?

0 Kudos
Message 7 of 12
(4,690 Views)

You put all of the channels that are on a single device into one task.  With the DAQmx Read, you tell it to read N Channels as a waveform.  So you will only have 4 tasks, one for each DAQ board you have.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 12
(4,684 Views)

I will give it a try later today and hopefully report back with an incredibly inefficient vi for you to tear apart. thank you for the help

0 Kudos
Message 9 of 12
(4,679 Views)

I have a working vi for the data acqusition and display but I can't seem to get the data recording to work. How do I queue up 48 channels? If I put the write measurement file VI in the display while loop everythign slows down way too much. I attached what I am working on, thank you for any help.

0 Kudos
Message 10 of 12
(4,623 Views)