01-16-2006 02:33 PM
01-16-2006 02:40 PM
01-16-2006 02:40 PM
01-16-2006 02:47 PM
01-17-2006 11:48 AM
You could also dynamically (programmatically) trigger the Stop button Value Change event by creating a property node for the Stop button (right-click >> Create >> Property Node) and selecting the property Value (Signaling). Then right-click the new property node and select Change to Write to allow for an input value.
You could then write a value to this property node whenever you wanted to execute the Stop button Value Change event case to shut down the program safely. A couple things to note:
1. Writing ANY value to this property node will execute the Value Change event case, even if the value technically hasn't changed. So don't just place this property node in a loop with a False constant wired to the input! You'll fire tons of unexpected event cases!
2. The Value (Signaling) property is different than the Value property. Both change the control/indicator's value, but only the Signaling property fires the Value Change event as well.
This certainly isn't the only solution. A State Machine is a great idea, though it relies inherently on polling rather than events which can increase response time and cause lost events. But in most cases it will work great!
01-17-2006 12:30 PM
@jarrod S. wrote:
A State Machine is a great idea, though it relies inherently on polling rather than events which can increase response time and cause lost events. But in most cases it will work great!
01-17-2006 12:34 PM
Thanks All.
Right now, I chose to simply programmatically invoke the abort method on the top level VI to force an exit on the program so that it won't have chance to wait for the stop button event. Thank you for all the great ideas.
JaeHo
01-17-2006 03:38 PM