Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Starting a sub vi dynamically with the start asynchronous call. Not closing

Hello,

 

My goal with this program is to cycle various digital outputs according to a user set time.  I am launching a sub vi dynamically to accomplish this.  The main event based program works as I would like it to.  The problem is in the sub vi.  When it receives the boolean true it works as it should.  When I send a boolean false it goes through the first case structure with the false value but then the value changes back to true.  After starting a timed loop on a digital output channel as I would like, I am not able to stop this loop when I change the front panel boolean for this digital output channel.  I believe the problem has something to do with the "Prepare to call and forget" way that I lauch the cycle.vi. The first instance never closes when I call the second instance.

 

I use "DO Main Program.vi" to take events from the front panel, and then "Cycle.vi" to cycle the channel on a user defined time.

Download All
0 Kudos
Message 1 of 3
(4,741 Views)

Hey Brad, 

Have you seen these documents? They should give you some clarity on the Asynchronous calling methods and options.

 

Asynchronously Calling Multiple Instances of a VI for Parallel Execution

http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/acbr_call_clones/

 

Combining Option Flags into a Single Option Value

http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/combining_options/

Douglas Choisnet
0 Kudos
Message 2 of 3
(4,715 Views)

Thank you, this is helpful.

0 Kudos
Message 3 of 3
(4,710 Views)