RobotStudio event

Reading large arrays with PCSDK

Hi,

I am trying to read a large, but not super large, array from the robot controller with PC SDK. I always get the following error when I try to access the data in the array:

   ABB.Robotics.GenericControllerException:  The amount of data is to large to fulfill the request.

For a num array, the limit seems to be somewhere between 60 and 120 elements.

Any ideas?

Thanks

Comments

  • Hi.
    I have same problem with target array. Cant read larger than TargetArray{10}

     
    Best Regards

    Klaus Soenderhegn
    www.cadalysator.dk
  • this is a known limitation that is mentioned in the 5.11 release notes:
     

    "It is now possible to read/write a RAPID array of 100 num as one operation, in previous versions the limit was 97 elements. If the array has more than 100 num elements the array must be read and written element by element. Reading/writing an array of 100 elements takes 15 to 200 milliseconds, depending on available resources on the robot controller and the PC. To write one element of an array will also take 15 to 200 milliseconds.?__

     

    It sounds like the general workaround is to get the length of the array and just read the contents into a local structure through a FOR loop.
    Russell Drown
  • How do you read a single array element at a time? When I try to run the get_item(x) procedure or when I try to get an enumerator I get the same error about the amount of data being too big.


  • Never mind, I figured it out. I was working with the Value object instead of the RapidData object.
  • It seems to work now, thanks for the tip from the release notes.