Simple text change

<< Click to Display Table of Contents >>

Navigation:  Examples > Change the text of an object >

Simple text change

Previous pageReturn to chapter overviewNext page

Let's assume we have an object containing some text, and we want the text to change depending on the value of the tag. In this way we can display inscriptions about the operating mode or state of the tag.

 

1. Create a tag named State:

 

clip0036

 

2. Create a Text/EditField object (other objects with the Text Input property can be used):

 

textlabelcommon

 

3. Set up the "Text Input" property. For example, we want to have the text "Automatic Mode" if the tag value (State) is 0, and the text "Manual Mode" if the tag value is not 0. In the Object Properties window, go to the "Text Input" tab, enable the property, bind the tag, set the value to "0", comparison type "TagPV==Value", fill the text with TRUE and FALSE:

 

textinputproperty

 

4. Let's Run simulation to check the settings:

 

textinputcommon

 

You can download this project here.