Universal Robots Forum

Declaring an array of points

How can I declare the array of points? I trying to do something like this, but it is not working

 A_var:=[0, 0, 0, 0, 0, 0]
 B_var:=[0, 0, 0, 0, 0, 0]
 C_var:=[0, 0, 0, 0, 0, 0]
 points≔[A_var, B_var, C_var]
 Wait: 0.7
 Loop j<i

But four line of this programm is yellow. What I did wrong?

Arrays in URScript can only be 1D, and since JointPositions are literally a list (/array) as well, this is not possible.
You could either append the lists;

points = [A_var[0], A_var[1], A_var[2], ... , C_var[5]]

And then use an additional offset, to extract the 6 joint positions, when needed.
However a Pose is not a list, so if you need poses, this would work;

pose1 = p[x,y,z,rx,ry,rz]
pose2 = p[x,y,z,rx,ry,rz]
poses = [pose1, pose2]
movel(poses[0], a, v)