Jump to content

VI in Subpanel


jgcode

Recommended Posts

Is there a way for a VI to tell if it is currently loaded in a subpanel?

Maybe a property?

Anyone know?

Cheers

JG

Not sure if there is a better way. But if you try to load it into a sub-panel and it is already in one, you will get

Error 1145

Possible Reason(s)

Labview: Cannot open VI because it is already in a subpanel control.

If its not in memory, it will succeed, and if its already running but not in a sub panel you get

Error 1144

LAbview: Cannot insert VI in subpanel because VI is already open.

  • Like 1
Link to comment

Not sure if there is a better way. But if you try to load it into a sub-panel and it is already in one, you will get

Error 1145

Possible Reason(s)

Labview: Cannot open VI because it is already in a subpanel control.

If its not in memory, it will succeed, and if its already running but not in a sub panel you get

Error 1144

LAbview: Cannot insert VI in subpanel because VI is already open.

lightbulb.gif

Excellent "cat skinning" there Shaun! You absolutely shreaded the "box" I was thinking in.

Ben

  • Like 1
Link to comment

Uh, oh. Ben, were you not reading the CLAD thread yesterday, or did you just feel like rattling some cages?

wink.gif

I had no idea what was posted yesterday since I can't convince the LAVA site to show me unread threads. Its is like I have to stand here and watch it to see message come up. I feel like I am viewing the landscape out of a train window. I can't look back or forward but can only catch a glimpse of what is passing at the moment and that is on my work machine. On my home machine it is like the drapes are closed.

throwpc.gif

Ben

Link to comment

I had no idea what was posted yesterday since I can't convince the LAVA site to show me unread threads. Its is like I have to stand here and watch it to see message come up. I feel like I am viewing the landscape out of a train window. I can't look back or forward but can only catch a glimpse of what is passing at the moment and that is on my work machine. On my home machine it is like the drapes are closed.

throwpc.gif

Ben

This isn't really the right tread for this but why don't you use the RSS feature? Not that the RSS is 100% right now, but it doesn't miss content, it just some times adds old content.

I use outlook for my RSS reader, but a better solution for you might be Google reader. It's an in browser RSS reader that is linked to your gmail account. So if you read some RSS at work then go home it will show that you read those articles. reader.google.com

Link to comment

Not sure if there is a better way. But if you try to load it into a sub-panel and it is already in one, you will get

Error 1145

Possible Reason(s)

Labview: Cannot open VI because it is already in a subpanel control.

If its not in memory, it will succeed, and if its already running but not in a sub panel you get

Error 1144

LAbview: Cannot insert VI in subpanel because VI is already open.

Cheers, but its not that I want to load it, I just want to know when the VI tests itself - is it the "active VI" in the subpanel out of a possible number of VIs at a given time. So if it isn't I don't want any actions to be performed, so unfortunately this will not work for my task. Thanks tho.

<edit>

Ok had a thought and it worked

The Front Panel:Open property is True when the VI is loaded in the subpanel

False otherwise

Easy!

Problem sorted

Cheers

</edit>

Edited by jgcode
  • Like 1
Link to comment

lightbulb.gif

Excellent "cat skinning" there Shaun! You absolutely shreaded the "box" I was thinking in.

Ben

I have my moments. As few and far between as they may be though :)

Cheers, but its not that I want to load it, I just want to know when the VI tests itself - is it the "active VI" in the subpanel out of a possible number of VIs at a given time. So if it isn't I don't want any actions to be performed, so unfortunately this will not work for my task. Thanks tho.

<edit>

Ok had a thought and it worked

The Front Panel:Open property is True when the VI is loaded in the subpanel

False otherwise

Easy!

Problem sorted

Cheers

</edit>

Ah. Thought you wanted to definitively know. Just for reference. It will also show as maximized.

Link to comment

Ah. Thought you wanted to definitively know. Just for reference. It will also show as maximized.

I am using LV2009 and FP:State property toggles between Standard (in subpanel) and Closed (not in subpanel)- but not maximized ??

That is ok tho, cause now I have a way for the VI to test itself.

Cheers

Edited by jgcode
Link to comment
  • 2 weeks later...

I am using LV2009 and FP:State property toggles between Standard (in subpanel) and Closed (not in subpanel)- but not maximized ??

That is ok tho, cause now I have a way for the VI to test itself.

Cheers

Can I have multiple subpanels (on the same 'main' vi) show the same opened vi? Each representing its own instance (and access to its own data)?

Say forinstance that I have a VI that shows a word from a list. I have three lists - one each for subject, verb and object. I know how to set the value of a front panel item, so I can set a VI's data in that respect. I just cannot seem to InsertVI into multiple subpanels.

Any suggestions?

Link to comment

Can I have multiple subpanels (on the same 'main' vi) show the same opened vi? Each representing its own instance (and access to its own data)?

Say forinstance that I have a VI that shows a word from a list. I have three lists - one each for subject, verb and object. I know how to set the value of a front panel item, so I can set a VI's data in that respect. I just cannot seem to InsertVI into multiple subpanels.

Any suggestions?

I haven't tried this specifically but I suspect that if you make your subVIs re-entrant it would work.

Link to comment

Ok had a thought and it worked

The Front Panel:Open property is True when the VI is loaded in the subpanel

False otherwise

Easy!

Problem sorted

Cheers

FP:Open only tells you if the front panel is open anywhere.

This may be enough, if you only want to distinguish the two states "closed" and "open in subpanel".

But what if you'd like to distinguish (1) "closed", (2) "open as separate window" and (3) "open in subpanel"?

I just found a very interesting private VI property: Front Panel Window:OS window.

This property returns 0 if there is no OS window for this VI (which is the cases for (1) and (3)).

If the VI has it's own window, this property returns a number >0 (case (2)).

In combination with FP:Open, this enables you to tell exactly what the state of the panel really is.

  • Like 1
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.