08-31-2012 07:34 AM
Hello,
I am trying to make a basic data aquisition program, but I am running into a synchronizing problem. I have 4 microphones, and a speaker. The idea is to create a tone using Beep.vi, then collect the 4 signals off the microphones (which are spaced apart). The problem I am coming across is that when I try to run the beep.vi as well as the data aquisition, the program will play the tone, then collect data. I want to be able to collect data while the sound is playing.
Is there some way I can do this with semaphores/rendevouzs? Or is there some more complicated method involving VI references?
Cheers,
Kevin
Solved! Go to Solution.
08-31-2012 07:55 AM
Can you show some of your code? Rendezvous are likely what you want, but maybe there's a data dependency you didn't catch.
08-31-2012 08:07 AM
My current code: The second frame is where I have issues.
I am using a BNC-2110 8-channel DAQ with a USB 6251. I am logging the data through the task, changing file location and sampling rate via property nodes.
08-31-2012 09:54 AM - edited 08-31-2012 09:57 AM
Sorry for taking so long to respond. Work got in the way.
Anyways, I would probably do something like this. Basically, I setup the DAQmx task, tell it to run and then call the beep. Once the beep is done, stop the DAQmx task. I used an occurance (rare that I use those, but it's perfect for this case) to tell the while loop with the DAQmx Read to stop when the beep is complete. What this does is it guarantees that the DAQmx task is running before the beep happens. You might want to add some small delays just to make sure you have enough buffer before and after the beep happens.
08-31-2012 10:06 AM
Thankyou so much! This looks like exactly what I want. Cheers!