# Problems with length of array

**URL:** <https://forum.universal-robots.com/t/problems-with-length-of-array/2375>\
**Category:** Technical Questions\
**Tags:** urscript, programming, arrays\
**Created:** [July 24, 2018, 1:32pm UTC](https://forum.universal-robots.com/t/problems-with-length-of-array/2375 "2018-07-24T13:32:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon53303193](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@anon53303193](https://forum.universal-robots.com/u/anon53303193)\
**Post date:** [July 24, 2018, 1:32pm UTC](https://forum.universal-robots.com/t/problems-with-length-of-array/2375/1 "2018-07-24T13:32:16Z")

</div>

I’m currently working on a program, where I have created an array containing all the points the robot needs. Since some point are evaluated based on other points, the program will generate these. Currently, there are approximately 50 points inside the array, but the program will not write to all the points. Furthermore, do some of the other variables not show up in the variables tab, and the program gives me an error saying a variable is not initialized even though that is not the case.  
Does the controller have an upper limit to how many variables it can have initialized or maybe how many values it can store in an array? Or is it possibly the URSim I’m currently using which can’t handle too many variables? Or could it be another factor?  
I’m currently using version 3.5 of polyscope.  
Thank you.

---

<div class="post-metadata">

**Author:** ![anon75015020](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@anon75015020](https://forum.universal-robots.com/u/anon75015020)\
**Post date:** [July 25, 2018, 2:17pm UTC](https://forum.universal-robots.com/t/problems-with-length-of-array/2375/2 "2018-07-25T14:17:46Z")

</div>

Hi,

I think you need to provide some more information. A Screenshot of your code would be helpful.  
Do you use a script file or is the programm in polyscope directly ?

We also use an array of poses that has 30? entries. No problems.  
I think it might be an programm error more likely than poylscope limiting the length of a list.  
Try to initalize the array and all your values that you will write to it at programm startup with "0"s

Regards,  
Alexander

---

<div class="post-metadata">

**Author:** ![jbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/jbm/32/614_2.png) [@jbm](https://forum.universal-robots.com/u/jbm)\
**Post date:** [July 26, 2018, 7:05am UTC](https://forum.universal-robots.com/t/problems-with-length-of-array/2375/3 "2018-07-26T07:05:01Z")

</div>

Be aware, that the maximal length of a variable definition with the Assignment command is 1024 bytes, regardless of the amount of array items. So the more precise your Pose, the shorter the list can be.  
PolyScope will only read the first 1024 chars of the Assignment command,.

---

<div class="post-metadata">

**Author:** ![anon53303193](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@anon53303193](https://forum.universal-robots.com/u/anon53303193)\
**Post date:** [August 2, 2018, 6:59pm UTC](https://forum.universal-robots.com/t/problems-with-length-of-array/2375/4 "2018-08-02T18:59:48Z")

</div>

Thanks for the reply to the both of you. It might be too precise Pose which exceed the limit.

---

<div class="post-metadata">

**Author:** ![Savoia](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/savoia/32/4844_2.png) [@Savoia](https://forum.universal-robots.com/u/Savoia)\
**Post date:** [January 26, 2021, 10:59pm UTC](https://forum.universal-robots.com/t/problems-with-length-of-array/2375/5 "2021-01-26T22:59:05Z")

</div>

Closed on January 26, 2021, 10:59pm UTC


