hello,
i m trying to write a VB script on wincc RT Advanced to activate an internal tag. but it won't work. any help here.
------------------------------
this is the script :
Sub VBFunction_1()
Dim AlarSet,Tsp,Psp,Ptsp,Fsp
Dim Tspv,Pspv,Ptspv,Fspv
Do While AlarSet = True
AlarSet = SmartTags("Alarms_settings")
Tsp = SmartTags("Tank SP")
Psp = HmiRuntime.SmartTags("Pump SP")
Ptsp = HmiRuntime.SmartTags("P.Temp Sp")
Fsp = HmiRuntime.SmartTags("Furance SP")
If Tsp = True Then
Tspv = True
Else
Tspv = False
End If
SmartTags("Tank_SP_View")= Tspv
Loop
End Sub
----------------------------
i activated the vbscript on a button properites/events/activate as shown in the picture below.
-------------------------------
Note: I declared more variables the code is bigger than this but i m trying on one tag now to make sure its working before i continue my code.
thx
i m trying to write a VB script on wincc RT Advanced to activate an internal tag. but it won't work. any help here.
------------------------------
this is the script :
Sub VBFunction_1()
Dim AlarSet,Tsp,Psp,Ptsp,Fsp
Dim Tspv,Pspv,Ptspv,Fspv
Do While AlarSet = True
AlarSet = SmartTags("Alarms_settings")
Tsp = SmartTags("Tank SP")
Psp = HmiRuntime.SmartTags("Pump SP")
Ptsp = HmiRuntime.SmartTags("P.Temp Sp")
Fsp = HmiRuntime.SmartTags("Furance SP")
If Tsp = True Then
Tspv = True
Else
Tspv = False
End If
SmartTags("Tank_SP_View")= Tspv
Loop
End Sub
----------------------------
i activated the vbscript on a button properites/events/activate as shown in the picture below.
-------------------------------
Note: I declared more variables the code is bigger than this but i m trying on one tag now to make sure its working before i continue my code.
thx