LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with simple application using MCC USB-1608G and LabVIEW

I need help with what should be a very simple application. I need to take a total of 120 samples at 100 millisecond intervals. At 500 milliseconds, I need to generate a 500 millisecond, 1 kHz tone burst while continuing to collect samples. I have a vi that collects the samples and one that generates the tone burst using the "Signal Generator By Duration" vi, but I can't figure out which structure to use to marry the two together and maintain synchronization. I am using an MCC USB1608 USB DAQ unit, and that means I have to use their ULx library functions to talk to the hardware and collect the samples. Can anyone help me out? Thanks in advance!

0 Kudos
Message 1 of 5
(943 Views)

Hi,

 

What are the VIs that you are using? It will be useful to see what you want to "marry", and it will easy to figure out.

 

Greetings

0 Kudos
Message 2 of 5
(912 Views)

Thanks for the reply, azp7.  Here is a block diagram of the two processes I am trying to "marry", e.g. run in parallel.  The top one generates the sound which feeds the system and the bottom one grabs the data.  The way it is now, the bottom one runs first and then the top one runs after the bottom one completes. How can get them to run simultaneously?  Also, in my original post I mentioned a tone burst. This vi generates a tone that increases steadily in volume.  I can make the necessary changes if someone can help me with getting the two processes synchronized. Thanks!!!!!

0 Kudos
Message 3 of 5
(902 Views)

Actually, both process runs in parallel, the issue is you want to synchronize, in this case, I think you can use an flat sequence. you can let all the configuration stuff outside (orange), and let it run first, and include on your flat sequence  the audio process and the start of your sampling process (green). 

In this way, it will begin almost at the same time, it can have or not some difference of milliseconds.

If it isnt enougth for you, the other option is use triggers, but I am not sure your code have that option.

0 Kudos
Message 4 of 5
(893 Views)

Thank you for the reply.  I need timing to be as accurate as possible, so I'm going to look into using triggers within a for loop.  Let me bang on it a while and I might hit you up for more advice in a few days.

Thanks again!

0 Kudos
Message 5 of 5
(878 Views)