LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I trigger event "B" from within event "A", process "B", then return to "A"?

There's plenty of discussion on how to trigger an event from within the handling of another event.

What I'd like to do is be processing event "A", have it trigger event "B", process event "B", then return and continue processing the rest of event "A".  I've attached a sample VI that illustrates what I'd like to have happen, even though it doesn't work the way I've described.  Is this means of using the Event Structure even possible with Labview?  I can re-work the way I'm using events and add in some additional subVI's, I'm just hoping to avoid a major restructuring of the code.   Thanks!
0 Kudos
Message 1 of 2
(2,689 Views)


@brian_g wrote:
There's plenty of discussion on how to trigger an event from within the handling of another event.

What I'd like to do is be processing event "A", have it trigger event "B", process event "B", then return and continue processing the rest of event "A".  I've attached a sample VI that illustrates what I'd like to have happen, even though it doesn't work the way I've described.  Is this means of using the Event Structure even possible with Labview?  I can re-work the way I'm using events and add in some additional subVI's, I'm just hoping to avoid a major restructuring of the code.   Thanks!



I can't open your example but it sounds to me like you want to begin "B" while "A" is still running which I don't think is possible if they are in the same event structure. In normal operation though, process "A" would finish then the loop would start over and process which event has occured and then run that event.

To do what your text says, you'd likely have to do it in parallel and have a notifier or some other sychronization method force process "A" to stop and wait for process "B" to complete before continuing to process "A". I attached an example that does this (crudely) but I can't think of any other way.

Gary

0 Kudos
Message 2 of 2
(2,682 Views)