# Storing positions in a buffer

**URL:** <https://forum.universal-robots.com/t/storing-positions-in-a-buffer/39639>\
**Category:** URScript\
**Created:** [April 28, 2025, 3:02pm UTC](https://forum.universal-robots.com/t/storing-positions-in-a-buffer/39639 "2025-04-28T15:02:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jurre](https://avatars.discourse-cdn.com/v4/letter/j/9e8a1a/32.png) [@jurre](https://forum.universal-robots.com/u/jurre)\
**Post date:** [April 28, 2025, 3:02pm UTC](https://forum.universal-robots.com/t/storing-positions-in-a-buffer/39639/1 "2025-04-28T15:02:39Z")

</div>

Hi,

I have a UR10e with a profile sensor attached to its tool flange. The sensor is trying to detect an edge in the Y and Z axes. I am trying to store multiple Cartesian positions (including X, RX, RY, and RZ) in a buffer so that the robot can move to them later. These values are gathered from the robot. I am having trouble defining the buffer to store the values. I have tried several different methods (see images below), but I can’t seem to get it to work.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/c/c00d5d3346c80945a8e16bc960e781f37743209b.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/2/2a7613be0eb1b9aec787c065af027cc870d70354.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/9/995b07f52f329c28d3bde80f7668e5ed9130f6a1.png)

Does anyone know how I can handle this issue? Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![dpeva](https://avatars.discourse-cdn.com/v4/letter/d/b5ac83/32.png) [@dpeva](https://forum.universal-robots.com/u/dpeva)\
**Post date:** [April 28, 2025, 7:27pm UTC](https://forum.universal-robots.com/t/storing-positions-in-a-buffer/39639/2 "2025-04-28T19:27:50Z")

</div>

Looks like you’ll want to use the make\_list() function as described in the Script Manual, section 4.2 - List.  
I haven’t used that function, so I’m not sure of the exact syntax needed to make a list of poses, but it appears fairly straightforward if you read through the examples.

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [April 28, 2025, 9:10pm UTC](https://forum.universal-robots.com/t/storing-positions-in-a-buffer/39639/3 "2025-04-28T21:10:00Z")

</div>

@dpeva is correct. The Lists and Structs were introduced not that long ago. It looks like you’re trying to do some form of Python in your examples. You’ll want to stick with URScript as they are not 1 to 1. For example, there’s no for loops in URScript (that I’m aware of)

---

<div class="post-metadata">

**Author:** ![dmytro.kharchenko](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@dmytro.kharchenko](https://forum.universal-robots.com/u/dmytro.kharchenko)\
**Post date:** [April 29, 2025, 11:10am UTC](https://forum.universal-robots.com/t/storing-positions-in-a-buffer/39639/4 "2025-04-29T11:10:36Z")

</div>

global buffer\_position = make\_list(length = 500, initial\_value = p[0,0,0,0,0,0], capacity = 500)

---

<div class="post-metadata">

**Author:** ![jurre](https://avatars.discourse-cdn.com/v4/letter/j/9e8a1a/32.png) [@jurre](https://forum.universal-robots.com/u/jurre)\
**Post date:** [April 29, 2025, 12:58pm UTC](https://forum.universal-robots.com/t/storing-positions-in-a-buffer/39639/5 "2025-04-29T12:58:40Z")

</div>

@dpeva Thank you for the quick reply, i tested it and it works perfect
