RobotStudio event

Problems with reading targets array

Hi.
In this code i get an error when reading targets arrays.

The error is: The amount of data is too large to fulfill the request.

 


For Each RS As RapidSymbol In rsCol
Dim varData As RapidData = modul.GetRapidData(RS.Name)
If varData.IsArray Then
Dim AD As ArrayData = DirectCast(varData.Value, ArrayData)
For I As Integer = 0 To AD.Length - 1
her i add value to datagrid:  AD.Item(I).ToString
Next
End If
Next


It works on num array but but not on target

 

what do i do wrong

 

BR Klaus
Best Regards

Klaus Soenderhegn
www.cadalysator.dk

Comments

  • Where is it failing, iterating on the RapidSymbol colection or working with the array data? What is the exception type and who is raising it?
     

    It is possible to make RAPID structures that are too large for the protocol to handle, but which don't violate any RAPID data definition rules. How large is your array of robtargets? 
    Russell Drown
  • Klaus
    Klaus ✭✭
    The target array length is only 12 and the error comes when i read the first record in the array: AD.Item(I).Tostring
     

    BR Klaus
    Best Regards

    Klaus Soenderhegn
    www.cadalysator.dk