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

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
155
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
53
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
165
“The HMI files we cannot open—they were saved in V13—we do not have that—I cannot restore file –please have them save in V11 and send them back to...
Replies
4
Views
171
Hi guys! I'm working in Studio 5000 and have a bunch of armorstarts there (+- 40). I need to set up parameters for each of them, mostly just same...
Replies
0
Views
87
Back
Top Bottom