LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display conditional things on the front panel ??

Hello,

What I am trying to do is this: The user will select some information from a combo box, and depending upon twhat he has selected I want to display different things based on his selection.

Any help will be appreciated.

Thanks,

Bira_pxi
0 Kudos
Message 1 of 10
(5,326 Views)
You can programmatically change the visibility of any object using property nodes with the "visible?" property.
 
If the groups of elements are similarly arranged, use a tab indicator (place tab control...change to indicator) and place each group of FP elements on it's own tab. Now hide the tabs and select the active tab programmatically by writing the desired state to the tab indicator.
 
Another option is the use of subpanels.
 

Message Edited by altenbach on 08-16-2007 04:11 PM

0 Kudos
Message 2 of 10
(5,315 Views)
As a corollary response, if you're asking about the mechanics of responding to a change, you need to use an event structure within a single while loop and then access the control's "Value Change" event. Check the examples that ship with LabVIEW. They show you how to use event structures. You can also do it the old-fashioned way of a loop and shift registers to keep track of the current value, but the event structure is the better approach.
0 Kudos
Message 3 of 10
(5,287 Views)
Thanks Altenbach... that worked.
0 Kudos
Message 4 of 10
(5,242 Views)
Dear firneds, I need to do something like this but, What I want is that some controls or indicators appear on the front panel depending on the user's election, and so appear a clone of  a basic block diagram on the main block diagram. I need some help please.
 
Warm Regards:
 
Kike
0 Kudos
Message 5 of 10
(5,229 Views)

Hello Kike,

What I did was this:

I gave the user a Ring to select the option he wants and created a case structure for different options. Then I used the Visible property of the objects to display the objects on the front panel.

You can access the visible property from the Block diagram. Right click on the Icon, then select create> property node>visible. You will need to change the property node to write.

Then from your case statement, pass boolean parameter to these property nodes. True === Visible and False === Not Visible.

Thanks,

 

BIRA_PXI

 

Message 6 of 10
(5,223 Views)
Hi dear BIRA_PXI, than you very much for your reply, it is so clear.
But Iif I proceded in this way my block diagram would fill my screen too much because I need too show in the front panel many controls and indicators, after user have selected some options. you figure out that I need to show the user 4, 6, 10, 16 small panells (like clones, for control and indication) to user based on the number of the "small on-off machines"
 under control, so this must reflect on the block diagram appearing equal number of small pieces of G code.

I hope to be clear.

Warm regards:

KIke
0 Kudos
Message 7 of 10
(5,198 Views)

Hi Kike,

I am unclear about your concern.  Are you worried that you will have too much code on your block diagram?  The case structure stacks the cases.  Are you displaying subpanels?  Are they actually clones?

0 Kudos
Message 8 of 10
(5,174 Views)
Dear Elizabeth thank you for your time.

I need to display on the front panel some "clusters" of controls or indicators, based on the selection of the user,  and it dipends on the number of machines to controling. So we need to put on the block diagram only the necesary terminals and other objects for each user's setup. Some times the user will need to control 3 machines and some times 6 machines, in this way as you can see my front panel and my block diagram need to have some kind of "conditionally" or they are variable in size especially, so my program would load or put the necesary code only.

Warm regards:

Kike
0 Kudos
Message 9 of 10
(5,168 Views)
Hi Kike,
I would recommend dynamically calling subVIs and displays the front panel of the running subVIs according to what needs to be displayed.

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support

Message Edited by Yi Y on 09-04-2007 07:27 PM

0 Kudos
Message 10 of 10
(5,128 Views)