LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to isolate the wait function to one part of the code

Solved!
Go to solution

I'm buildling an ecg montoring system along with programming an external stimulator using TTL pulses to work along side the information obtained from the ECG.The most important of  these features is the heart rate. However, whenever I activate my pulse trains in the code, the DAQmx Wait Until Done.vi function pauses everything in the code, including the part of my code that monitors the heart rate, which uses time to measure it. What I would like, is the wait function to only affect the pulse train generators without pausing anything else in the code. Is this possible? And if so how can I make it happen?

 

I will attach my vi

0 Kudos
Message 1 of 3
(2,106 Views)

bump.

 

I'd also like to be told if this is a stupid question with an easy answer or an impossible question without one.

 

Appreciate any inputs

0 Kudos
Message 2 of 3
(2,092 Views)
Solution
Accepted by topic author robertbaratheon

Your problem is that everything is in the same loop.  So the longest operation is going to determine the loop rate (and therefore processing rate).  What you really need to do is separate your tasks into separate loops.  Use queues and/or notifiers to communicate your data and commands between loops.


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 3 of 3
(2,084 Views)