Button text on Crimson Red Lion touch panels

phuz

Member
Join Date
Jun 2008
Location
Mohnton, PA
Posts
1,046
The Crimson PDF manuals leave a little to be desired, and this isn't quite obvious, but how can you change the text of a button with a tag?

I set my ON/OFF values for the tag itself, but cannot, for the life of me, figure out how to instill this onto the button. It seems I can only set static text.
 
The Crimson PDF manuals leave a little to be desired, and this isn't quite obvious, but how can you change the text of a button with a tag?

I set my ON/OFF values for the tag itself, but cannot, for the life of me, figure out how to instill this onto the button. It seems I can only set static text.

Set the Text to "=TagName.AsText" without the quotes.
 
Jackpot. Thanks.
I also found that if you "Add Data" instead of "Add Text" it works.

Hope this helps somebody.

Correct, but you said "change the text of a button" you didn't say display the value of a tag on a button, so I gave you the method to change the text.

Keep this in mind because there are a lot of places where you might be *required* to enter Text rather than Data (like the label of a tag) but you want something that changes based on some other condition and this syntax will most of the time work.
 
Correct, but you said "change the text of a button" you didn't say display the value of a tag on a button, so I gave you the method to change the text.

Keep this in mind because there are a lot of places where you might be *required* to enter Text rather than Data (like the label of a tag) but you want something that changes based on some other condition and this syntax will most of the time work.

Well, it's not a PLC value. It's the tag's text, but you have to use the "Add Data" to display it. Either way, it works.
 
Well, it's not a PLC value. It's the tag's text, but you have to use the "Add Data" to display it. Either way, it works.

It is DATA because it is based on a tag's value. Whether it is a two state or a 200 element Multistate that you want to show, it still changes based on the tag's value.

How you show it is up to you, you can show the value (0 or 1) or (176) or you can show .AsText to show the Formatted Display Text based on that value.

And...

You can display it on a button (or other places) using Add Text and using the =TagName.AsText or the Add Data and using TagName.AsText. There is also an AsText(TagName) function that works in some situations, but I prefer the .AsText property.
 

Similar Topics

On my HMI (KTP1200), I've got this button "Generate Report", which generates a report (CSV) when it's pressed. (see pic) While it's being...
Replies
1
Views
583
Hello, I ran into an issue while editing a FactoryTalk View ME application. I have added two buttons to one of the displays and have used the...
Replies
8
Views
3,209
I know this seems... stupid... because it is. How on earth can you wrap text or do multi-line on a standard button control with Proficy Machine...
Replies
12
Views
3,052
As title suggests I am having a hard time figuring out how to get 2 lines text on button object in Siemens TIA v12. Can anyone help? Thank you...
Replies
1
Views
3,108
I'm using S7-basic and I'm trying to figure out if there's a way I can display the value of a variable in the text field of a button? So far...
Replies
9
Views
2,004
Back
Top Bottom