11-24-2009 07:56 AM
Hi,
I'd like to know if it's possible I create a property node or something like that about abort execution. I would like to use this function, for instance, If I press the abort execution I can get any information from that (I want to use like a stop button, in another words, I need to finilize my VI, so if I press the Abort Execution I cannot do that).
Regards
Kito
11-24-2009 08:08 AM
11-24-2009 08:08 AM - edited 11-24-2009 08:09 AM
Not quite understood your question,
Placing a stop button in the front pannel and wiring it to the conditional terminal of while loop in block diagram wouldn't help you?
11-24-2009 08:19 AM
I already have the stop button implemented on that. What I want to do is when I press the abort execution button I can finalize my VI's. I wanna know if it's possible to create a property node from abort execution button.
Regards
Kito
11-24-2009 08:25 AM - edited 11-24-2009 08:27 AM
What exactly do you mean by Finalize your vi?
Yes you can abort a vi programatically using an invoke node.
see the attachment
11-24-2009 08:25 AM
I think you can capture the abort execution event with an Event Structure. Then discard the event (so LV does not stop) and call your finalize code.
Lynn
11-24-2009 08:30 AM
What do you mean by "finalize my VI's"?
The Abort button has no property nodes associated with it. It is strictly for debugging purposes, i.e. stop a program that may be stuck in an infinite loop. It should not be used (nor even accessible) as part of a normal operating routine for a LabVIEW program.
If there is something you need to do in your VI after your stop button is pressed (the one you placed on the front panel and have programmed for), then you would place that in a sequence structure that doesn't execute until after your program's master while loop has stopped.
Another alternative is that you use a state machine architecture. Once your Stop button is pressed, it causes your "Finalize" state to run. And that state is the one that will actually stop your while loop.
11-24-2009 08:35 AM
johnsold wrote:I think you can capture the abort execution event with an Event Structure. Then discard the event (so LV does not stop) and call your finalize code.
Lynn
I know you can capture the "Application Instance Close?" and the "Panel Close?" events. I didn't think you could capture the Abort button event. How would you create that event? If you could, then that could effectively kill the Abort button (pun somewhat intended) as a debugging tool. If the application caught the "Abort?" event and cancelled it, then the Abort button would become useless for trying to stop a runaway VI.
11-24-2009 08:43 AM
Ravens Fan,
I think you are right. I was thinking of "Application Instance Close?" and the "Panel Close?" rather than abort. I did not have LV open to check.
Lynn
11-24-2009 08:43 AM