LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

for loop stops data acquisition

Hello
 
I needed serious help on this VI i am making.
 
I am acquiring PMT data from DAQ to labview. Now once this bead is detected, I use DAQ to output a voltage. I have a time loop to get this sustained DC Voltage, however, once its doing that, the labview stops acquiring data.
 
So is there any way to output voltage as well as continue data acquisition from DAQ?
0 Kudos
Message 1 of 7
(3,005 Views)
It's not exactly clear what you're trying to do, but I think I understand.  You are monitoring your PMT till a specific condition is met and then you're starting an analog output process.  You want the analog output process to run in parallel with the data acquisition.  In order to do this you need to run the two processes in separate while loops and pass data between them using queues, notifiers, etc.  This is basically the producer/consumer approach for which you can find considerable information on this site.  As long as the two processes are totally independent you shouldn't have any problems (I am assuming that the input and output are on separate DAQ cards).
 
If this is not what you need please reply with more information about your project.
Message 2 of 7
(3,000 Views)
Thanks for the reply. I really really appreciate it.

Well I am attaching my VI here. You are correct. PMT basically sees a flourescent bead and sends a signal (lets say a spike). Now if it crosses a threshold, I want a DAQ analog voltage output and updates a counter for counting those beads. The problem is that when DAQ is acquiring this signal quickly (at normal sampling speed), when it hits that peak, signal acquisition stops and labview is busy trying to output voltage. After the set amount of for loop (this is used to give out certain DC voltage for about 2,3,4 or5 or more seconds) signal acquisition starts again. Problem comes that if labview stops to output voltage, we might miss a bead and thus our counting is messed up.

Now I want BOTH the processes (counter and output voltage when criteria is met) running parallel. Can you update my mini VI? or post a link that I could read up or may be example VI????

Thanks so much.
0 Kudos
Message 3 of 7
(2,986 Views)
And Input and output are NOT on different cards. I am just using different channels on the same DAQ
0 Kudos
Message 4 of 7
(2,985 Views)
As John stated, if you want to prevent losing data, you should use a producer/consumer type architecture.  I have attached a link to a tutorial below.  Please take a look at it and try yo build your vi using these principles. 
 
 
Regards,
Lon
0 Kudos
Message 5 of 7
(2,952 Views)
For some reason I can't open your vi.  What version of LV are you using?  I'm still using 7.1.
0 Kudos
Message 6 of 7
(2,943 Views)

Sorry John. I am using LV 8. I'll try to remake it in 7.1 and post it tonight after work for sure. If you could spare a look then i'll really appreciate it. Thanks again for helping me out here John.

and thanks Irallen, i'll look into that architecure.

0 Kudos
Message 7 of 7
(2,936 Views)