Sign in to follow this  
Followers 0
michal34558

Changing button graphic via WinCC script and PLC

1 post in this topic

Hi,

I'm looking for a way to change the button graphic (From "non-pressed button" to "pressed button" which is much lighter) via script.  The main problem is that, the button has to change it's graphic whenever i change a bit in my PLC program, more accurately, I press button in Factory IO, not in HMI, that thing I've already made, so I've set up my button "is pressed" graphic. I've got my tags prepared correctly, and I'm trying to reach the property of the button with this script:

 

Do

 If SmartTags("Variable_1") Is True Then
    HmiRuntime.Screens("Screen_1").ScreenItems("Template_Button_2")
 End If

Loop

Is it even proper way to do stuff like that? I THINK it'll work like, if Variable_1 (Bool %Q0.0 for e.g. in PLC program) is 1 Then ->  And when I'm at ScreenItems, i don't know which property should I choose next in order to change button graphic.

 

Hope you can help :)

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
Sign in to follow this  
Followers 0