10-20-2005 10:51 AM
Hi,
I am creating application in Labview 7.0 that uses Event Structures to perform
tasks based off of user interaction. One such task is a typical
"Read from File" query that allows the recalling of data sets.
However, if the user cancels out of the "look for file" dialog box
I'd like to terminate the rest of the sequence typically fired with that event
upon a successful data set recall.
Using the File Dialog "cancelled" output, I can programmatically
determine how to proceed. My problem comes when I try to kill the ongoing
event. My attempt at creating this action was to use these vi's: Reg
Event->Create User Event->Destroy User Event. I fed the CtlRef from
the currently executing event structure into the "Value Change attribute of
Reg Event. It doesn't work!! Am I on the right track? Is
there a way to do this?
Thanks for any help
10-20-2005 11:05 AM
10-20-2005 02:25 PM
10-20-2005 02:30 PM
10-20-2005 03:34 PM
10-20-2005 03:45 PM
Sorry,
I wanted to add some addtional comments about the sequence structure but got pulled away briefly. The sequence structure should be used sparingly if at all. A much better approach would be to use a state machine inside the event. A sequence structure always executes every frame. A state machine gives you the flexibility to freely move from state to state and stop at any time. There are a couple shipping examples of state machines and more on the Developer Zone that you can do a search for.