Jump to content

class vi in subpanel


Recommended Posts

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?

Link to comment

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 by Dan DeFriese
Link to comment

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 by kugr
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.