From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Default value of Ring Constant

Solved!
Go to solution

I am a beginner trying to understand an existing block diagram. The following symbol is a Ring constant, right? When the program runs, the user never gets to select the value. Does that mean its default value is used? When I click on Properties > Edit Items, it lists Value1, Value2, and Value3, but Value1 is checked: is that the default? If I need it to be Value2 instead, do I make sure Value2 is checked on the block diagram, then run the program? 

colorimeter_2-1643644950461.png

 

0 Kudos
Message 1 of 4
(897 Views)

This is a diagram constant that is wired to the indicator (not 100% sure, because the wire routing is pretty ugly!). The diagram constant will have whatever value you select at edit time.

 

A diagram constant can't be changed a runtime. For that, you need to turn it into a control.

0 Kudos
Message 2 of 4
(878 Views)

And in order to select the value at edit time, I make my selection the checked item in the list, right? So Value2 is checked but Value1 and Value3 are unchecked.

0 Kudos
Message 3 of 4
(872 Views)
Solution
Accepted by topic author colorimeter

@colorimeter wrote:

And in order to select the value at edit time, I make my selection the checked item in the list, right? So Value2 is checked but Value1 and Value3 are unchecked.


Yes, that is the correct way to set the value of that instance of the ring constant.  The default value is different.  A default value is the value a new instance of the control or constant initially holds when it is created, e.g. 0 for numerics (or 0 +0i), empty string for strings, VOID for Varients etc...  You can change the default value for control instances with the property editor or by creating a type definition. 


"Should be" isn't "Is" -Jay
Message 4 of 4
(866 Views)