From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-31-2012 09:35 AM
When programming for an event via an Event Structure, how do you handle events that are either triggered via a Value Signal or a button press when more processes have to be processed within the same Event? Take a look at the Test Sample:Value change area (5th event). I've stopped coding because I didn't want to have 4 different case structures.
I would appreciate your suggestions.
Solved! Go to Solution.
12-31-2012 09:57 AM
I'm not understanding what you are going after. Are you trying to get multiple events to be handled by the same event case? Are you trying to run a test and need to handle events to stop it? We need a little more clearification.
12-31-2012 10:47 AM - edited 12-31-2012 10:48 AM
In that specific event structure there will be events happening (with SubVI's) that could either:
I need to capture the error to trigger the Stop event or capture the pressing of the Stop button and act accordingly (which the Stop event hasn't been coded yet) without going through the entire Test Sample event.
12-31-2012 11:08 AM
You are about half way there but not quite the right design pattern to achieve what you want.
Take a look at the Producer Consumer (Events) template and example. These show one way to implement a Queued Message Handler that will let you respond to user requests (or errors).
12-31-2012 02:15 PM
That should work, Jeff. Thank you.
Question - can I make the Consumer Loop a Sub VI (since it is large) and keep the Producer with the Event Structure in the Main VI?
12-31-2012 02:35 PM
@Eric1977 wrote:
That should work, Jeff. Thank you.
Question - can I make the Consumer Loop a Sub VI (since it is large) and keep the Producer with the Event Structure in the Main VI?
You certainly can. That's the way a Champ would do it