LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making a subpanel an indicator

Hello,

 

I have a subpanel that I'm inserting into my front panel and I've been trying to make it into an indicator. I was trying to use the subpanel indicator property to make the subpanel into an indicator but I wasnt able to do this as I got the error below. 

 

I'm actually trying to embed a global variable into my front panel as a subpanel. Now, this approach might be flawed for a variety of reasons but I wanted to know if there was any way to make this work before I abandon this approach altogether. 

 

The problem is that when I embed this, the global updates as I expect it to, but I was unable to change it to an indicator - its always a control that I can click on directly and modify at runtime. 

 

0 Kudos
Message 1 of 5
(3,094 Views)

I don't understand what you are trying to do.  A subpanel is not an indicator, or control, or a global.  It is a part of the front panel that allows the front panel of a subVI to be viewed in it.  I don't know how you manage to put a global variable inside of it, I wouldn't expect that to be allowed.

 

If you want an indicator, just put it on the front panel.  If you want it within a subPanel, then that indicator must be a part of the subVI that you insert into that subpanel.  Your subVI could read the global and write it to the indicator.

0 Kudos
Message 2 of 5
(3,081 Views)

Ok, my thought with the embedding a global as a subpanel was that I wouldnt need another loop to update the variables on the front panel. I've tried this and it just works. I'm not sure how quickly it updates (what the refresh rate is) but it works for what I'm trying to do as I dont need it to be very fast and update very often - they are just global status indicators. 

 

I tried to open change the controls on my global variables to indicators but that didnt seem to work - I didnt expect them to. Is there any way to lock down access to a subpanel so that the user cannot interact with it. 

 

I understand that this might be a little circuitous, but at this point, this is teetering towards being more academic than anything else. 

0 Kudos
Message 3 of 5
(3,078 Views)

Ok, all I had to do here was to use the disabled property on the subpanel to disable it. 

 

It somehow continues to update after this but the user cannot interact with it rendering it into effectively an indicator.


This feels very wrong. 

0 Kudos
Message 4 of 5
(3,072 Views)

@Sidd_Sood wrote:


This feels very wrong. 


It shouldn't. A subpanel is a control which doesn't have a terminal (for reasons which are irrelevant here), so you can't change to an indicator, but it has the Disabled property, just like any other control, and if you read the description for that property, you will see that it basically just makes the control inoperable by the user, so that it doesn't respond to user input as it normally would.


___________________
Try to take over the world!
0 Kudos
Message 5 of 5
(3,039 Views)