Jump to content
korenje

Button color via ladder

Recommended Posts

Hi, I am new to this.
Is it possible to change button color via ladder? Or after pressing it to change color? (for example I want ON/OFF button to change text and color... or maybe just color to indicate it's on or off)

Also is it possible to change attributes at all via ladder?

I know there is a way to hide a button and show another one of differnet color, but that's not what I want...

Share this post


Link to post
Share on other sites

My UniLogic skills are a bit rusty at the moment, but I believe a Binary Text Switch will allow you to change text and color. I don't think you can modify from ladder except with hide and unhide, but I can't say I'm totally positive there's not some sort of workaround.

Share this post


Link to post
Share on other sites

There's more than one way to skin a cat.

Use a Binary Text Variable for two colors or a List of Text Variable for more.

You can put the same or different texts in the "Texts, Binary Variable" collection as well as change the text and background colors based on the value in the Link tag which is driven from the ladder logic.  You can set the Actions to whatever you had the Button object do to a different (or the same) tag.

Joe T.

Share this post


Link to post
Share on other sites

Hi again, I forwarded this to my colleague.

I am also wondering if it will be possible to define rounded corners on buttons by radius in pixels in the future. We are supposed to unify visual design with our other controllers. Right now we use pictures if I am not mistaken for buttons on unitronics controllers.

Also does it work any faster if the buttons are made with button feature or is it the same if they were pictures? not that I noticed any slowdowns... just wondering.

Share this post


Link to post
Share on other sites

No.

We had a corner radius for most of the elements, and we removed it because text would still exit the boundaries of the elements, and it also affected the rendering performance on the elements.

Right now, the only good way to achieve corner radius is by creating a image that fits your needs. The HMI works the same if you use images in buttons or not (No performance change), but it is best to have the image with the right size of the button, because scaling up or down the image does require some cpu work, and it also makes the button looks blurry, or not crisp. 

 

You can contact our support and request the corner radius for buttons. Then maybe it will implemented in the future.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×