LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

avioding race condition in 2 loops

Hi

 

I have one loop which is constantly aquiring data from my device, and I have another loop (event) which one of the events is using the same device.

What I'm looking for is a way to stop the aquiring in the first loop, wait for it to finish its iteration and then start the event

 

someone?

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

Hi,

 

Notifiers or semaphore are a good way to talk between parallel loops.

 

-CC

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 2 of 3
(2,270 Views)

What are you doing in this event?

 

Another option is to use a queue to send the event information down to the DAQ loop.  When you get a message, perform the operation.  If you don't, behave as normal.  This is also a good way to tell the DAQ loop to stop.


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