LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading and displaying data from two tasks

I am trying to simultaniously read and display data from two different DAQ units (a USB-9233 and PCI-6031E).  Since I cannot have a single task with channels from multiple devices I have two tasks that I am trying to read data from.  Attached is my attempt to read and display the data at a particular data rate.  The problem  I am having is that only a single channel shows up in the plot when I actually have 3 channels (2 on the USB-9233 and 1 on the PCI-6031E).  Attached is the VI I tried to develop.
0 Kudos
Message 1 of 7
(3,623 Views)
One problem is that you are using interleave arrays, so you are essentially meshing 2 plots into 1.   Look at the context help for waveform charts.  Also look at the example VI's for waveform charts, waveform graphs and XY graphs.  You will need to see how multiplot graphs are formed and use build array or bundle clusters accordingly.  You may want to build the channels inside the loop into arrays and do the bundling as necessary to form a graph instead of a chart.  You may need to make your DAQ reads put out arrays instead of waveforms.
 
There are probably several ways of doing this, and you will need to look at the help files and experiment with different combinations until you find the one that works.
0 Kudos
Message 2 of 7
(3,617 Views)
Hi iprowell,
      I think you want to initiate two acquisitions at the same moment?  In your example the two tasks aren't really synchronized to the extent that the "start-task"s will executed at different times.  Check-out the example "DAQmx_Scalable_Analog_Input_Syncrhonization-cont.vi".  I think does what you want to do (and graphs the results too.)
 
Cheers!
 
 
 
 
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 3 of 7
(3,611 Views)

Hello Iprowell,

tbd raises a good point in that your measurements aren't necessarily simultaneous.  Unfortunately there isn't a way to synchronize (use same sample clock and start trigger) a USB-9233 with a PCI-6031E, but I have a couple other suggestions depending upon your application.

If you are doing analog input on both of these cards have you considered doing it all on one of them?  This would eliminate the synchronization problem and likely remove the issue of combining the data so that it can be displayed on a single graph.  If your application allows you to use a single device that would probably be the easiest way to proceed.

The best option would be to use the USB-9233 since it is a simultaneous sampling card.  It has a different analog to digital converter (ADC) for each channel so if you sample multiple channels at the same rate on this card the measurements truly occur at the same time.  On a normal data acquisition (DAQ) card there is a sample clock and a convert clock.  The sample clock runs at your sample rate and the convert clock would run much faster so that it could multiplex each of your channels to a single ADC to take the measurement.  In many applications this interchannel delay is acceptable, but it is up to you if that is the case here.

I assume you probably already know this and the reason you're probably using the PCI-6031E for one of the channels is because the input voltage is outside the ±5 volt range for the 9233.  If the input range is the problem one solution would be to get an attenuator for the larger signal to make it fit the range of the 9233.  If getting an attenuator isn’t an option you could always do all of your sampling on the PCI-6031E, but as I mentioned above this card doesn’t have simultaneous sampling and the resolution is also lower.

I hope this sheds a little light on tbd’s concerns, and please post back with more information if you have questions.

Have a good night!

Brooks
Message 4 of 7
(3,573 Views)
The USB-9233 is being used to sample 4 IEPE accelerometers.  I intended to use the PCI-6031e to be able to use some standard accelerometers to take some additional channels of data.  At this point I have basically given up on that and am just using the USB-9233.

I did get the VI working, but as people have mentioned the two devices were badly out of sync.
0 Kudos
Message 5 of 7
(3,570 Views)
Hi iprowell,
      Sorry if you wasted time with the example I pointed you to.Smiley Sad
 
I had two ideas that might help: Might it be possible to sample the same transducer with both the 9233 and the PCI 6031 - then sync the two DAQs in a post-processing step that examines the "dually"-sampled channel?  The other idea is to create a trigger from an unused channel on the 9233 - but you're using all four channels, so I guess that's out.  (The AtoD on the 9233 will draw a tiny amount of current when it samples a channel...) 
 
Cheers!


Message Edited by tbd on 02-19-2008 09:23 PM
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 6 of 7
(3,561 Views)

Hello iprowell,

 

If you'd like to provide some information about the overall goal of your test setup it would make it easier to make some recommendations.

 

1.  How many different IEPE accelerometers do you want to measure?

2.  How many standard accelerometers do you want to measure?

3.  Do you need all measurements to be synchronized?

4.  Do you need simultaneous sampling?

 

If you need more than 4 channels sampled simultaneously then you'll likely need to get some different hardware so that you can properly synchronize your acquisition across multiple devices.  The more information you can give about what you're trying to do the better.

 

Thanks,

 
Brooks
0 Kudos
Message 7 of 7
(3,540 Views)