LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hiding front panel data

Solved!
Go to solution
I haven't seen this discussed yet and I hope I can explain it correctly. Many times I have a lot of front panel controls (and indicators) that I don't want the user to see. Making them invisible is not optimum for me because, if the subVI is complicated and I am in development or debugging mode, it is hard to find all of the hidden controls and indicators. Also invisible stuff very often ends up behind visible stuff and its a pain finding it and dragging it out into the open again. I generally solve this problem by putting all of my variables on a tab structure, with one page containing the user interface and the other pages hidden - unless my debug flag is set. My problem is this. If I have to print that page, the size of the tab control determines the extent of what gets printed. So if my user interface is much smaller than the size of the tab, then I get a plot with a lot of useless white space in it. Does anyone know how to do this better?
0 Kudos
Message 1 of 31
(4,787 Views)

Hi oyester,

 

I know of no work-around that can help you. The only thing I can recomend is to stop using controls/indicators that are not intended for user consumption.

 

Sorry,

 

Ben

 

PS: Most LV apps do not need extra controls and indictors to work properly. If you want to know more about other methods say so.

Message Edited by Ben on 11-02-2009 02:32 PM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 31
(4,764 Views)

As for the indictors, why not remove them all and when you debug just probe the wires in the block diagram to determine the values in them?

0 Kudos
Message 3 of 31
(4,749 Views)

I dont know if this is what you need, but you can dynamically change the visibility of a control/indicator. It is not good practice to have your controls and indicators disappear and reappear while your program is running (your VI is not a magic show) but I think it is probably what you are looking for.

 

Right mouse click on a control or indicator. Go to create>property node > visible. Once placed on the block diagram, you right click on the property node and hit 'change to write'. If you write a constant false to this it your control will disappear. You would do this for each of the controls/indicators you are trying to hide then group them together on the block diagram and write the same constant to all of them.

 

I do this sometimes for debugging because disable diagraming a control or indicator doesnt hide it. I use this during development and then clean all this up before 'release'.

 

As Ben said, this isnt exactly awesome programming practice, but i have found it to be kind of useful.

Message Edited by rex1030 on 11-02-2009 04:19 PM
---------------------------------
[will work for kudos]
0 Kudos
Message 4 of 31
(4,737 Views)

Hi oyester,

 

I have at times encountered the need to provide an advanced user mode where more features are available and in another case I had two entirely different front panels for the same vi.

 

Here is how I did this:

 

1) Create two decorations of different colors (for example a raised frame). These define the two areas you want visible

2) When the vi starts - search through the decorations to get a reference to each of the decorations based on color.

3) To change views, set the front panel coordinates to the desired decoration

 

There is an openG function that sets the front panel to the largest decoration. I used the methods I learned from that function to make one that takes a decoration reference input and sets the front panel to that area.

 

Once you set this up you can resize the decorations without any programming changes (set it and forget it, lol).

 

If you want more details, let me know.

 

steve 

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
Message 5 of 31
(4,728 Views)

Your situation is a symptom of a bad practice; controls and indicators are not "variables" - wires are variables.  Controls are for users to enter data and indicators are for users to view data.  It may be easier for you, in the short run, to work this way but your software won't be readily readable/maintainable/extendable.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 6 of 31
(4,715 Views)

Your situation is a symptom of a bad practice; controls and indicators are not "variables" - wires are variables.  Controls are for users to enter data and indicators are for users to view data.

 

Please explain to me how to communicate to a subVI without using controls and indicators.

Are you saying that I can't pass an array to a subVI. I have to make the user type it in? You're telling me that I have to show that control to the user when what he really want to see is a plot?

 


0 Kudos
Message 7 of 31
(4,676 Views)

Controls and indicators can be used in many ways, some good some not so good.

 

Allowing user input

Displaying a value (or data set like a graph)

passing avlue to a sub-VI

Getting areturned value for a sub-VI.

 

Those are all concidered good,proper, appropriate etc.

 

It sounded (from your original post) as if the controls and indicators you are asking about do not fall into those catagories.

 

If I (we) read that wrong, please clarify.

 

Just trying to help,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 31
(4,672 Views)
Don't be ridiculous. Data is passed to a subVI with a wire. A control is used if the data needs to be changed by the operator. If a control is not shown, then it cannot be changed by the user and you can use a block diagram constant. If you have an indicator that is not visible to the operator, then it really does not need to be there.
0 Kudos
Message 9 of 31
(4,667 Views)

As for the indictors, why not remove them all and when you debug just probe the wires in the block diagram to determine the values in them?

 

The indicators are not there for debugging, they get passed on to other subVIs.

0 Kudos
Message 10 of 31
(4,660 Views)