LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make Beep.VI simultaneously run?

Solved!
Go to solution

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

0 Kudos
Message 1 of 5
(3,643 Views)

Can you show some of your code?  Rendezvous are likely what you want, but maybe there's a data dependency you didn't catch.


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 5
(3,636 Views)

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.

0 Kudos
Message 3 of 5
(3,630 Views)
Solution
Accepted by topic author Kevin_D

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.


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 4 of 5
(3,606 Views)

Thankyou so much! This looks like exactly what I want. Cheers!

0 Kudos
Message 5 of 5
(3,599 Views)