Change Graphic Object Picture dynamically WinCC 7.0

Sergihno

Member
Join Date
Oct 2016
Location
Ukraine
Posts
70
Hello everybody!

I'm doing dynamically change of graphic object pictures by action script in the WinCC 7.0.

And it works only in the chain "else". Like something wrong with comparison value in the comprising operation, because vale is changed but in the end the picture is only set from "else" chain.

script:
Function PictureName_Trigger(Byval Item)
Dim icon
Dim user

Set user = HMIRuntime.Tags("CurrentUser")
HMIRuntime.Screens("MainStructureMenu").ScreenItems("UserIcon")
Set icon = HMIRuntime.ActiveScreen.ScreenItems("UserIcon")


Select Case user.Value
Case "Administrator"
icon.PictureName = "Administrator.png"

HMIRuntime.Tags("it_user_reg").Write 1

Case "Operator1"
icon.PictureName = "Client1.png"
HMIRuntime.Tags("it_user_reg").Write 2
Case "Operator2"
icon.PictureName = "Client2.png"
HMIRuntime.Tags("it_user_reg").Write 3

Case else
icon.PictureName = "Client3.png"
HMIRuntime.Tags("it_user_reg").Write 0

End Select
End Function

 

Similar Topics

I have two identical machines running similar HMI projects, the only difference is one is done in FactoryTalk View Version 10 and the other is...
Replies
3
Views
114
Hoping someone can give me some guidance or confirmation of what I need to do. We have a FactoryTalk SE program that I need to change the IP...
Replies
2
Views
92
Hey all, i have a panelview screen (image attached), with 4 items on it. Program 1, Program 2, ...3, ...4. The PLC i am using is a compactlogix...
Replies
5
Views
176
Greetings I have a problem, my system is the following: wincc v8.0 (demo), logo8.3, abb m2m analyzer. I created some pages to display the...
Replies
0
Views
67
We had one go down. we have a new one. Their emergency Number don't work. The Model is TLSA046AAH-330N01-007 A catalog says we need software TET...
Replies
2
Views
171
Back
Top Bottom