LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Scale and caption of an indicator

Solved!
Go to solution

I am creating a VI the displays current temperature, and wind speed on 2 separate indicators. I have added a button the controls two "select functions" to convert the readings between english and metric units. No problem. Now I want the indicators to change there caption and range(min and max values) also when the button is toggled. So if I press the button to select the metric values for these to readings the scale and caption values change also. Thanks in advance for the help.

 

ssmith@bnl.gov

0 Kudos
Message 1 of 11
(4,527 Views)

You did not actually ask a question.  Presuming that you want to know how to change those items:  Use property nodes.  Property nodes for caption text and range exist for numeric indicators.

 

I would put the property nodes in an event case for the value change event for the button.  That way they only get written when the values need to change.

 

Also, before you can change the caption text, the caption must be made visible from the front  panel.

 

Lynn 

0 Kudos
Message 2 of 11
(4,524 Views)

Lynn--

       Sorry I forgot to ask the question. I see that property nodes are available but it is unclear how I set a value for the caption(text) and for the range(min& max values). How do I define what the values are to be in each case?? Thanks for the help.

 

Scott

0 Kudos
Message 3 of 11
(4,519 Views)

Put property nodes controlling the indicator inside an event structure.

The event structure should execute every time there is a value change in the unit selector.

Cory K
0 Kudos
Message 4 of 11
(4,517 Views)
Solution
Accepted by ssmith490D

Right click the indicator, and press "Create >> Property Node"

 

Then select the following properties: 

 

**Edit. Those last 2 should be "Scale.Maxiumim" and "Scale. Minimum"
Message Edited by Cory K on 11-07-2008 03:05 PM
Cory K
Message 5 of 11
(4,512 Views)

ssmith490D wrote:

I see that property nodes are available but it is unclear how I set a value for the caption(text) and for the range(min& max values). How do I define what the values are to be in each case??


By default, property nodes are set to read mode. In order to write properties, you right-click the node and "change to write". Now you can wire your desired settings.

 

Also have a look at the Xcontrol example in the example finder. It is a thermometer that allows changing units. Once you make it, there is no code needed in the VI where you use it.

0 Kudos
Message 6 of 11
(4,508 Views)

Would it be easier to use a true/false case structure with the same property nodes in each one but with the different values? The case that executes is selected by the same button that changes the number values. If not I have never used an event structure before and don't know how to set it up or where to put it in my VI. Thanks for the help

 

Scott

0 Kudos
Message 7 of 11
(4,501 Views)

Sure, whatever you want to do.

You don't have to neccessarily do True/False.

You can make cases based on the value of your unit selector. 

Cory K
0 Kudos
Message 8 of 11
(4,496 Views)

Scott,

 

Put the values inside the case structure and wire them out to single copies of the property nodes.  No need to duplicate code.

 

Look at the help for the event structure.  It is usually put in a parallel while loop.  The Producer/Consumer (Events) design pattern contains an example.

 

Lynn 

Message 9 of 11
(4,495 Views)

Actually for increased transparency you can use the boolean selector in this case. You wire the boolean to the center terminal and have the values for both true and false wired to the top and bottom terminals respectively. Voila - a transparent case statement.

 

 

0 Kudos
Message 10 of 11
(4,489 Views)