Sub OnClick(ByVal Item) Dim x Set x = HMIRuntime.Tags("s1") Dim S1 Set S1 = HMIRuntime.Tags("s1") Dim I1 Set I1 = HMIRuntime.Tags("i1") x.Read I1.Read S1.Read If I1.Value=0 Then If x.Value = 0 Then S1.Value=1 Else S1.Value=0 End If S1.Write End If End Sub |
Sub OnClick(ByVal Item) Dim x Set x = HMIRuntime.Tags("s2") Dim S2 Set S2 = HMIRuntime.Tags("s2") Dim I1 Set I1 = HMIRuntime.Tags("i1") x.Read I1.Read S2.Read If I1.Value=0 Then If x.Value = 0 Then S2.Value=1 Else S2.Value=0 End If S2.Write End If End Sub |
Sub OnClick(ByVal Item) Dim I1 Set I1 = HMIRuntime.Tags("i1") Dim S1 Set S1 = HMIRuntime.Tags("s1") Dim x Set x = HMIRuntime.Tags("s3") Dim S3 Set S3 = HMIRuntime.Tags("s3") I1.Read S1.Read x.Read S3.Read If x.Value=0 Then If (I1.Value And S1.Value)=0 Then S3.Value=True S3.Write End If Else S3.Value=False S3.Write End If End Sub |
Sub OnClick(Byval Item) Dim I1 Set I1 = HMIRuntime.Tags("i1") Dim x Set x = HMIRuntime.Tags("i1") Dim S3 Set S3 = HMIRuntime.Tags("s3") I1.Read S3.Read x.Read If S3.Value=0 Then If x.Value = 0 Then I1.Value=1 Else I1.Value=0 End If I1.Write End If End Sub |
Sub OnClick(ByVal Item) Dim taguri(4) Dim i taguri(0)="s1" taguri(1)="s2" taguri(2)="s3" taguri(3)="i1" For i=0 To 4 Dim x Set x = HMIRuntime.Tags(taguri(i)) x.Value=True x.Write Next End Sub |
Sub OnClick(ByVal Item) Dim taguri(4) Dim i taguri(0)="s1" taguri(1)="s2" taguri(2)="s3" taguri(3)="i1" For i=0 To 4 Dim x Set x = HMIRuntime.Tags(taguri(i)) x.Value=False x.Write Next End Sub |
Function Width_Trigger(ByVal Item) Dim I1 Set I1 = HMIRuntime.Tags("i1") Dim S1 Set S1 = HMIRuntime.Tags("s1") Dim S2 Set S2 = HMIRuntime.Tags("s2") Dim TR1 Set TR1 = HMIRuntime.Tags("tr1") I1.Read S1.Read S2.Read TR1.Read If (I1.Value And S1.Value And S2.Value)=1 Then TR1.Value=True TR1.Write Else TR1.Value=False TR1.Write End If End Function |
Sub comut(Byval tag) Dim x Set x = HMIRuntime.Tags(tag) x.Read Dim Tg Set Tg = HMIRuntime.Tags(tag) If x.Value=0 Then Tg.Value=True Else Tg.Value=False End If Tg.Write End Sub |
Sub OnClick(Byval Item) Dim I1 Set I1 = HMIRuntime.Tags("i1") I1.Read If I1.Value=0 Then comut("s1") End If End Sub |
Sub OnClick(Byval Item) Dim I1 Set I1 = HMIRuntime.Tags("i1") I1.Read If I1.Value=0 Then comut("s2") End If End SubEnd Sub |
Sub OnClick(ByVal Item) Dim I1 Set I1 = HMIRuntime.Tags("i1") Dim S1 Set S1 = HMIRuntime.Tags("s1") I1.Read S1.Read If (I1.Value And S1.Value)=0 Then comut("s3") End If End Sub |
Sub OnClick(Byval Item) Dim S3 Set S3 = HMIRuntime.Tags("s3") S3.Read If S3.Value=0 Then comut("i1") End If End Sub |
Function Width_Trigger(ByVal Item) Dim I1 Set I1 = HMIRuntime.Tags("i1") Dim S1 Set S1 = HMIRuntime.Tags("s1") Dim S2 Set S2 = HMIRuntime.Tags("s2") Dim TR1 Set TR1 = HMIRuntime.Tags("tr1") I1.Read S1.Read S2.Read TR1.Read If (I1.Value And S1.Value And S2.Value)=1 Then TR1.Value=True TR1.Write Else TR1.Value=False TR1.Write End If End Function |