Show Posts

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.


Messages - jscott

Pages: [1]
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

2
Support Questions / Re: CLX subscribing and reading an array
« on: October 03, 2016, 01:44:27 PM »
Ok so the last issue is fixed, I then came across another. It seems like I can not subscribe to a two dimension array (example: Spare[0].Bool[1])

3
Support Questions / Re: CLX subscribing and reading an array
« on: October 03, 2016, 11:43:59 AM »
It works Thank You!

4
Support Questions / Re: CLX subscribing and reading an array
« on: September 23, 2016, 04:49:41 PM »
I just tried 399r and same thing.

5
Support Questions / Re: CLX subscribing and reading an array
« on: September 23, 2016, 04:25:38 PM »
Finally got back to this project, and I am having issues with the patch it is not giving me an error message anymore it is just not subscribing to the variable, therefore I get no data.

Jamie

6
Support Questions / Re: CLX subscribing and reading an array
« on: August 30, 2016, 01:27:13 PM »
V3.99p

I can read a whole array and pull the Boolean I need out of it but that is a lot of overhead.


7
Support Questions / CLX subscribing and reading an array
« on: August 30, 2016, 12:07:28 PM »
I am subscribing and trying to read a Boolean in the middle of an array but it gives an error when it returns data."An exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll but was not handled in user code Additional information: Index was out of range. Must be non-negative and less than the size of the collection."

Private Sub _Click(sender As Object, e As EventArgs) Handles Button3.Click
      Cntrlgxc22Inch.Subscribe("Array[77]", 1, 100, AddressOf VssInfeedStpBfrData16)
End Sub

Dim Array77 As Boolean
      Private Sub VssInfeedStpBfrData16(ByVal sender As Object, ByVal e As MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs)
        Array77 = e.Values(0)
End Sub

When I read an array of Boolean say TestArray[77].Test as a Boolean it works correctly.


Pages: [1]