Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use 6009 to sample in background.

Solved!
Go to solution

Hi,

I'm using a 6009 DAQ board to do several different things in a routine. Most of the time of the while loop is taken up talking to a sensor over the digital lines (about 1 second per iteration). At the end of this, I need to grab some data from 2 analog channels. I would like it if the analog data were spread over the 1 second interval at whatever DAQ rate (I'm trying to get some idea of wind gusts, but anything faster than 0.1 sec will be filtered by my anemometer). 

 

Right now, it looks like when I grab the data, it takes 512 readings as fast as it can, so every second I get a wind reading that takes about 10 ms. From reading through the spec sheet, it looks like this board may not be able to do what I want since it doesn't support hardware timing. 

 

Does anyone have any suggestions for how I might use this card to grab data over the entire interval while the routine is otherwise occupied?

 

Thanks!

mike

 

0 Kudos
Message 1 of 3
(2,966 Views)
Solution
Accepted by mooseo

Mike,

 

You are correct that the board doesn't have hardware timing but it does sound like your timing doesn't need to be that accurate.  It currently sounds like the finite acquitision that you are doing has too high a sampling rate.  I would suggest that you try posting your code so that myself and everyone else can get better idea of what you are doing and how we can help.

 

Your solution will most likely be slowing down the loop rate and using one of our other architectures like Master/Slave or Producer/Consumer.  In simpler terms you will be using 2 while loops so that each can independantly process their tasks in parallel.

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 3
(2,951 Views)

Hi Jason,

 

Thanks very much. I think that you are right; those architectures look like exactly what I need for this project. In fact, I've needed them for other projects, too, but I've somehow always come up with a not-as-good way to avoid discovering them.

 

I'm sure I'll run into problems actually using queues, but now I know what I'm looking for.

 

Thanks,

mike

 

0 Kudos
Message 3 of 3
(2,944 Views)