Michael Aivaliotis Posted May 29, 2003 Report Share Posted May 29, 2003 When using subpaneled VI's the need always arises to send a message to it telling the subpaneled VI to stop execution. This apparently is not required when you run the "remove VI" method. Labview automaticaly aborts execution of the subpaneled vi. This might be a problem if you wan the subpaneled vi to exit gracefully. I guess you could send a message via a queue mechanism but if you run the "remove VI" method after that, there is no way to know for sure if the subpaneld Vi has finished execution. Any suggestions to perform synchronization? It would be nice to have the "remove VI" method contain a switch that you could set to have it "wait until vi completes". Quote Link to comment
Jim Kring Posted May 29, 2003 Report Share Posted May 29, 2003 When using subpaneled VI's the need always arises to send a message to it telling the subpaneled VI to stop execution. This apparently is not required when you run the "remove VI" method. Labview automaticaly aborts execution of the subpaneled vi. This might be a problem if you wan the subpaneled vi to exit gracefully.I think that your assumption is wrong. The Remove VI method's documentation states: Remove VI - Unloads the VI in the subpanel control. If no references to the VI remain, LabVIEW removes the VI from memory. If references to the VI remain and the VI stays in memory, this method does not change the state of the VI. If you have an open reference to the VI it should keep running. It may be aborting because LabVIEW is unloading due to the fact that you don't have an open reference to the VI. I guess you could send a message via a queue mechanism but if you run the "remove VI" method after that, there is no way to know for sure if the subpaneld Vi has finished execution.Use a "Message Queue" which allows you to use "Response Notifiers" (visit the OpenG.org site to take a look at this project)Any suggestions to perform synchronization? It would be nice to have the "remove VI" method contain a switch that you could set to have it "wait until vi completes". Take a look at the other thread that I started here. There are lots of different ways to use subpanels and most will require some wrappers that implement the desired functionality. The wrappers have access to the VI reference so they can look at the VIs state, set/get control values of the VI, etc. Quote Link to comment
Michael Aivaliotis Posted May 30, 2003 Author Report Share Posted May 30, 2003 Remove VI - Unloads the VI in the subpanel control. If no references to the VI remain, LabVIEW removes the VI from memory. If references to the VI remain and the VI stays in memory, this method does not change the state of the VI. Thanks Jim for pointing that out. There were other things going on in my project that was causing the VI to abort so It wasn't the remove panel method. That's what happens when you're debugging at 3am. :cry: Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.