TIA portal script problem

AndrewM

Member
Join Date
Sep 2011
Location
west yorks.
Posts
49
Hi all,

Just messing with TIA portal does anyone know why the following script doesn't work

Sub Vlv1Opening()
Dim objVlv1

Set objVlv1 = HmiRuntime.Screens("Root Screen").ScreenItems("symbol library_1")
objVlv1.ForeColor=RGB(255, 0, 0)
objVlv1.BackColor=RGB(0, 255, 0)
objVlv1.BlinkColor=RGB(0, 0, 255)

End Sub

Regards Andrew
 
Hallo Andrew

I never used TIA portal but try this one

Sub Vlv1Opening()
Dim objVlv1

Set objVlv1 = HmiRuntime.Screens("Root Screen").Items("symbol library_1")
objVlv1.ForeColor=RGB(255, 0, 0)
objVlv1.BackColor=RGB(0, 255, 0)
objVlv1.BlinkColor=RGB(0, 0, 255)

End Sub
 
Hallo Andrew

I never used TIA portal but try this one

Sub Vlv1Opening()
Dim objVlv1

Set objVlv1 = HmiRuntime.Screens("Root Screen").Items("symbol library_1")
objVlv1.ForeColor=RGB(255, 0, 0)
objVlv1.BackColor=RGB(0, 255, 0)
objVlv1.BlinkColor=RGB(0, 0, 255)

End Sub
Hi,
Thanks for the reply, unfortunately "items" isn't part of the object model, on further investigation I got the script below to work, so all I can assume is the colour properties are the problem.


Sub Vlv1Opening()
Dim objVlv1

Set objVlv1 = HmiRuntime.Screens("Root screen").ScreenItems("Symbol library_1")
objVlv1.Visible = False
Set objVlv1 = Nothing

End Sub


Regards Andrew
 

Similar Topics

I have a circle that I want to have different colors depending on the value of two different tags. If it was one tag with a simple bit or...
Replies
9
Views
5,939
People are telling me that I need the "Advanced" version for this purpose. Should I uninstall the "Professional" version beforehand?
Replies
7
Views
3,297
Hi All, Someone at work has put a PLC system on my desk, that's just been taken off an idle production line. He said "It's an S7 PLC. We don't...
Replies
3
Views
85
Hi guys , I'm new with Allen Bradley, but I have experience with Tia portal (s7 1200 ,s7 1500) I want to convert my project from Tia portal to...
Replies
2
Views
189
Hi, I have had problem with upgrading some projects from v16 to v18. I tried it on 3 diffrent computers. I want to post this so that anyone that...
Replies
3
Views
152
Back
Top Bottom