LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

abort execution w/ labview database

I have a labview application that reads and writes to an access databse. I have a go button that continues the program after its running. Now, is there any danger in just using the "abort execution" button on the toolbar everytime i want to close the program? what if the program is just "x"-ed out everytime?
thanks,
0 Kudos
Message 1 of 4
(2,880 Views)
It is generally NOT a good idea to use the Abort Execution. It is better to provide more control when stopping a program and make sure all reads/writes are completed, references are closed, etc. You can use the Event Structure to trap the "X" and do an orderly shutdown.
0 Kudos
Message 2 of 4
(2,880 Views)
My program stops by itself once the write is completed. I wanted to try to make the program continuous (thats why I asked about the abort execution). The program is alright if it just runs once and stops right? Also, how would I "trap the X"?
I uploaded one of the program examples.
0 Kudos
Message 3 of 4
(2,880 Views)
Instead of running the program continuously by selecting the Continuous Run button, put your entire code in a while loop and have another Stop Boolean conotrol button.
You can use the Event Structure if you have LabVIEW 6.1 or 7 to detect user generated events. There you can set up the code that ends the VI if the user closes the VI by clicking on the X in the top right corner.
Zvezdana S.
0 Kudos
Message 4 of 4
(2,880 Views)