Displaying tag value within a sentence in the text field of a multistate indicator

Hello! I need to display tag values within the text fields corresponding to values in a multistate indicator. The multistate indicator changes text based on a step index tag. For each step, I need to show the value of the parameter mentioned in the step.

For example: Step 30's prompt currently reads "30 - Check for leaks for 30 seconds then press 'CONTINUE'." The number of seconds needs to be a dynamic value based on the value of a tag in my PLC, '[default]Parameters_Test_A/Parameters_Test_A_0_'.
How do I reformat my prompt to display the value of this tag in place of the "30" in my original prompt.

Thank you!

Create three custom properties on your indicator. The first will hold the value of the prompt, just change your prompt so that instead of 30, it has %i in the place where you need the value, or the appropriate place holder syntax. The second will be bound to the PLC tag to hold the current value. The third property should have the starting time, I assume also bound to a tag in the PLC.

Finally, on the indicators actual text property use an expression binding like this:

stringFormat({Property1},{Property3 - Property2})

Manual Entry for stringFormat():

Manual Entry for formatting elements that can be used:

1 Like

Thank you for your input Irose. I am a bit confused on how to apply this to a multistate indicator. Please see the attached image of my multistate indicator.

That is the style editor, which has nothing to do with what you're attempting to do.

You want add custom properties and bindings to the component and properties.

The properties will show up at the bottom of the component properties.

1 Like

Thank you very much!