Professional Documents
Culture Documents
Code VBscrip
Code VBscrip
1.Khi trigger tác động thì "Var1" tăng lên 0.5 giá trị
Dim w
w= SmartTag("Var1")
w=w+0.5
SmartTag("Var1)=w
/////
Dim w
Set w= SmartTag("Var1")
w.value=w.value+0.5
//////
Dim objTag
objTag.Read
Obj.Value=objTag.Value+0.5
objTag.Write
*** Note: or mucj tag Wincc phải có thêm một Tag có tên là "Var1"
Dim objTag
objTag.Read()
MsgBox objTag.Value
***Note: ở mục Tag wincc phải có thêm một Tag có tên là "Tag1"
Dim IngVar
IngVar = S gia tri mac dinh
MsgBox IngVar
Dim objEllipse
objEllipse.Left=objEllipse.Left+10
Dim objEllipse
objEllipse.Left = objEllipse.Left+10
Dim objEllipse
objEllipse.Top = objEllipse.Top + 10
Dim objEllipse
SetobjEllipse= HmiRuntime.Screens("NewPdl0").ScreenItems("Ellipse1")
objEllipse.Top = objEllipse.Top+10
Dim objEllipse
Dim objELLipse
Dim objCircle
objCircle.Radius=20
Dim objELLpse
objELLipse.Visible = True
Dim objELLipse
objELLipse.BackColor = RGB(255,124,0)
ScreenItems("Rectang1").BackColor = RGB(255,0,0)
Dim objELlipse
objELLipse.Enabled=False
HMIruntime.Stop
Dim BIT
if BIT.Read = 1 Then
BIT.Write 0
ELse
BIT.Write 1
End If
If HMIRuntime.Tags("BIT").Read = 1
Then
HMIRuntime.Tags("BIT").Write 0
Else
HMIRuntime.Tag("BIT").Write 1
End if
SmartTags("Tag1")= SmartTags("Tag2")
17 Disable chức năng của tất cả các dối tượng trên grapphic
Dim objScreen
Dim objScrItem
Dim IngIndex
Dim strName
IngIndex=1
strName= objScreen.ScreenItems.Item(IngIndex).ObjectName
objScrItem.Enabled = False
Next