1
Support Questions / Re: AlarmSubscriber, getting info from Item Collection
« on: February 06, 2016, 08:17:10 PM »
Right, thanks!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
For i = 0 To Me.PLCAddressValueItems.Count
If Me.PLCAddressValueItems.Item(i).PLCAddress = e.PlcAddress Then
MsgBox(Me.PLCAddressValueItems.Item(i).PLCAddressDesc)
Exit For
End If
Next i
Private Sub AlarmSubscriber1_DataChanged_1(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles Me.DataChanged
'* Make sure Data came back
If e.Values IsNot Nothing AndAlso e.Values.Count > 0 Then
'* Did it come back as True or 1?
If String.Compare(e.Values(0), "TRUE", True) = 0 Or e.Values(0) = "1" Then
MsgBox(e.PlcAddress)
End If
End If
End Sub