Showing results for 
Search instead for 
Did you mean: 

How to get the text of a ring constant?

Go to solution

If I have a ring constant, is it possible to get the context of that ring constant?

For example, I'd like to take the path capability to determine whether connect or not.



If the path is not available, I'd like to handle the error, putting the number of the ring to the code, and the text to the source.


It seemed it is difficult to work out my motivation, any suggestion will be appreciated:)



0 Kudos
Message 1 of 9

I don't know what you mean by "context of a ring constant".  I don't know what you mean by "if the path is not available".  I don't know what you mean by "work out my motiviation".  (Bad translations to English from another language?)


So I'll try to answer the question in your message subject which is the only thing clear to me.


Ring controls or indicators let you use a property node that such as Strings[] to tell you the array of strings that make up the ring, or StringsandValues[] which is an array of clusters that match up the value to the string.

0 Kudos
Message 2 of 9

Hi, RavensFan,


Sorry to let you confused with my poor English.

My question is "Ring Constant", not "Ring Control" or "Ring Indicator".

Have you seen my example? I think it is much clearer to look at the uploaded images, and you can ignore my poor EnglishSmiley Mad


0 Kudos
Message 3 of 9
Accepted by topic author William1225

For a Ring Constant directly you cannot. You can either create a control for that and use the property "Strings"to get the Item name in String format. Another way is by replacing the Ring Constant with an Enum constant and using the Format into String Primitive.

Are you using correct smiley in your post???



The best solution is the one you find it by yourself
0 Kudos
Message 4 of 9

Hi, P@Anand,


Thanks to your reply, the answer is impossible to get the text from a ring constant.

It's not happy that I can see the text of the ring explicitly on the block diagram but can not get access to the text of the ring constant directly.


0 Kudos
Message 5 of 9

You can never get the text associated with a value on a wire directly.  The wire only contains a value.  The text that is associated with that value is a property of the ring indicator or ring control. Those text strings are something that can easily be changed at run-time.

0 Kudos
Message 6 of 9

Hi, RavensFan,


Thanks to your reply.

If I'd like to customize the error handling,

should I have to create an string array and fill the the texts of the ring items into the array and index the array to the error source?

Is there a better way to work it out?

0 Kudos
Message 7 of 9

Hi William,


the GeneralErrorHandler description also mentions ways to use your own error numbers/descriptions. Did you read all the documentation of this feature?

Best regards,

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 8 of 9

Hi, GerW,


Thanks to your suggestion.

I originally want to use the texts of a ring to be the code source of my customized error, since the texts are meanful.

I can use the GeneralErrorHandler, even the Error Ring:)


0 Kudos
Message 9 of 9