LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flow control for stopping an earlier loop?

Hello All,

 

  Having trouble the flow control for a DAQmx configuration subVI.  I need to configure an anolog-out instrument, then continually loop the write function to maintain a constant output.  After the loop has started, I need to read a message on another instrument (happens to be RS485 card).  Then, after I have read the message, I need to stop the analog-out loop.  This sounds like it should be pretty simple, but I can't seem to get the order of operations correct.  Tried local variable, flat sequence structures, and nested while loops. 

 

To summarize:

Process A needs to start and run continually

Process B must wait for Process A to start, before it can start

After Process B has finished, need to go back and stop the loop for Process A

 

I've worked with situations similar to this before, using local variables to stop parallel loops, but it was never dependant on one process needing to wait for another one to start.  I do realize that I could simply implement a delay on the second process, but that would really just be guessing at the completion time (not preferred).  Please advise.  Thanks.

 

GSinMN 

0 Kudos
Message 1 of 2
(2,376 Views)

You initialize before both loops and then run the two loops (write to AO and read RS485) in parallel.  I would use a Notifier to tell the loop(s) when to quit.


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 2
(2,361 Views)