1
Support Questions / Re: CLX subscribing and reading an array
« on: October 05, 2016, 12:26:00 PM »
Yes this is a UDT thank you.
I am able to read "Spare[0].Bool[1]" but when I subscribe to this variable I get a exception of "Index was put of range. Must be Non-negative and less than the size of the collection. Parameter Name: index". Below is the read and subscribe I used for testing.
Private Sub Label6_Click(sender As Object, e As EventArgs) Handles Label6.Click
Label6.Text = Inch22Com.Read("Spare[0].Bool[1]")
End Sub
Private Sub Label11_Click(sender As Object, e As EventArgs) Handles Label11.Click
Inch22Com.Subscribe("Spare[0].Bool[1]", 1, 100, AddressOf TestSub)
End Sub
Private Sub TestSub(sender As Object, e As Drivers.Common.PlcComEventArgs)
Try
Label11.Text = e.Values(0)
Catch ep As Exception
MsgBox(ep.Message)
End Try
End Sub
I am able to read "Spare[0].Bool[1]" but when I subscribe to this variable I get a exception of "Index was put of range. Must be Non-negative and less than the size of the collection. Parameter Name: index". Below is the read and subscribe I used for testing.
Private Sub Label6_Click(sender As Object, e As EventArgs) Handles Label6.Click
Label6.Text = Inch22Com.Read("Spare[0].Bool[1]")
End Sub
Private Sub Label11_Click(sender As Object, e As EventArgs) Handles Label11.Click
Inch22Com.Subscribe("Spare[0].Bool[1]", 1, 100, AddressOf TestSub)
End Sub
Private Sub TestSub(sender As Object, e As Drivers.Common.PlcComEventArgs)
Try
Label11.Text = e.Values(0)
Catch ep As Exception
MsgBox(ep.Message)
End Try
End Sub