K-node Posted September 18, 2009 Report Share Posted September 18, 2009 Not sure this is the right forum, but it is loosely related to labview classes. So, I created a vi that represented a 'view' of the object. And because it is part of the class (not dynamic dispatch), I have it under the class icon in the project explorer. On a 'main' vi I added a subpanel and wired the refnum of the 'view' vi to the subpanel. All good so far. I run the 'main' vi, but when I "Abort Execution", the 'view' vi, continues to run though no longer visible. (I can open it up from the project explorer window and the execution arrow indicates it is running). If I move the 'view' vi to somewhere NOT under a class icon of the project explorer window - top level under 'My Computer' or even a Virtual Folder - the 'view' vi will terminate automatically - which is what I want. It does not seem to mater where on the disk the file resides. This is probably a feature, but I would like to turn it off. Any ideas? Quote Link to comment
Dan DeFriese Posted September 18, 2009 Report Share Posted September 18, 2009 (edited) How is the 'View' VI being launched? If its a dynamically called *.vit this is the expected behaviour. Can you post a screenshot of how 'view' VI is called. Edit - actually after re-reading your discription "If I move the 'view' vi to somewhere NOT under a class icon of the project explorer window - top level under 'My Computer' or even a Virtual Folder - the 'view' vi will terminate automatically - which is what I want." I'm confused. Edited September 18, 2009 by Dan DeFriese Quote Link to comment
Aristos Queue Posted September 19, 2009 Report Share Posted September 19, 2009 x Quote Link to comment
K-node Posted September 21, 2009 Author Report Share Posted September 21, 2009 (edited) x I guess my observation is that the behavior of the vi added to the subpanel is different based on it location in the LabVIEW Project hierarchy. I have attached a simple example to illustrate. I comes from the LV2009 example of subpanels. I added an unused class (TestTermination.lvclass) in the project soley for the purpose of having a 'folder' to drag the vi that is being used in the subpanel. To replicate: 1) Run the Simple Subpanel.vi. 2) Click the Abort Execution button (the red stop sign in the tool bar). 3) Open up the plugin1.vi and note that it is not running. 4) Move the plugin1.vi into the TestTermination 'folder' from LV's Project explorer window. 5) Run Simple Subpanel.vi. 6) Click the Abort Execution button (the red stop sign in the tool bar). 7) Open up the plugin1.vi and note that it IS still running. 8) Optionally create a virtual folder and move plugin1.vi into it. Run again, abort and open plugin1.vi to see that it too has stopped. I hope this helps to explain. The work around is to add an Invoke Method function and use the Abort VI method, ignoring the error in the event that it is not running. SubPanel.zip Edited September 21, 2009 by kugr 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.