Discussion:
controlling front panel display by a boolean variable
(too old to reply)
Forrest Bao
2008-08-14 07:40:23 UTC
Permalink
I am trying to control the display of several controls on the front panel by a boolean variable. If the the boolean variable is true, then some controls will be displayed. Otherwise, some others will be displayed. Is this possible in LabVIEW?
cschneider
2008-08-14 07:40:23 UTC
Permalink
Yeah, thats possible...you have to create a property node for your control (right click the terminal, select create-->property node). There, you can select "Visible". Wire your boolean control to this property to control the visibility... Greetings Christian
Pnt
2008-08-14 08:10:08 UTC
Permalink
Also you can use a "Tab" control.
LiciaP
2008-08-14 08:10:09 UTC
Permalink
Yes, you can do this in LabVIEW, by creating a property node (right click on the control => create => property node => visible) for all the controls you want to display or hide.Attached you can find two simple examples showing how to do so for one or more controls.I hope this can solve your answer!Regards LiciaNational Instruments
Applications Engineer


example2.vi:
http://forums.ni.com/ni/attachments/ni/170/349224/1/example2.vi


example.vi:
http://forums.ni.com/ni/attachments/ni/170/349224/2/example.vi
Forrest Bao
2008-08-14 08:40:18 UTC
Permalink
To Lucia, sorry. I am using LabVIEW 8.2. So, I can't open your examples. Is it possible for you to save it into a formt compatible to 8.2?To Christian, I tried to right click on the control and select "create => property node => visible". Then I found when I moved my mouse to the block diagram, there was a VI moving with my mouse. So I left clicked. The new VI, the property node, has one output, error input and error output. How can I wire the boolean variable to the property node? As attached, it's my program.
To pnt, can you show me the link to the help doc about Tab controls? 


visiblecontrol.vi:
http://forums.ni.com/ni/attachments/ni/170/349231/1/visiblecontrol.vi
LiciaP
2008-08-14 08:40:20 UTC
Permalink
I'm sorry, here are the examples for LV 8.2.You have to right click the property node and select "change to write", so you can connect the boolean in input to the property node.Regards.Licia


example2.vi:
http://forums.ni.com/ni/attachments/ni/170/349236/1/example2.vi


example.vi:
http://forums.ni.com/ni/attachments/ni/170/349236/2/example.vi
Forrest Bao
2008-08-14 08:40:21 UTC
Permalink
Ok, I have got it. Can you tell me which part of "LabVIEW Fundamentals" or "Getting Started with LabVIEW" talks about this? I plan to read it more carefully.
Pakman
2008-08-15 05:10:05 UTC
Permalink
Hi Forest,&nbsp;Neither &quot;LabVIEW Fundamentals&quot; nor &quot;Getting Started with LabVIEW&quot; mention property nodes because they are more of an advanced topic.&nbsp; Thus, please consult the following resources:&nbsp;<a href="http://zone.ni.com/reference/en-XX/help/371361B-01/glang/property_node/" target="_blank">Property Node - LabVIEW 8.2 Help</a> <a href="http://zone.ni.com/devzone/cda/tut/p/id/3159" target="_blank">Control References - Overview </a>(contains more information than just property nodes) &nbsp;Lastly, open the LabVIEW Example Finder and browse by task.&nbsp; Expand Building User Interfaces &raquo; Controlling Front Panel Objects Programmatically and double-click Property Nodes.vi. This VI is very well documented and includes helpful real-world property node usage.&nbsp; Please let me know if you have any other questions.&nbsp; Goodnight!
Loading...