PnP loop that makes a new waypoint each time off a get_actual_tcp_pose

I have a somewhat complex PnP where I am trying to get my robot to pick tubes one at a time from a horizontal stack of tubes lying in a V-groove. The robot is supposed to go to Waypoint_1 above the tube grab point, move up and down in Z until a sensor indicates that a tube has been grabbed, set a new waypoint at the moment it gets the input from the sensor ( grabpose≔get_actual_tcp_pose() ). After the robot does some more movement operations to get the tube to the next cell, it is supposed to come back to Waypoint_1 do a moveL to the grabpose point with a 6mm vertical offset ( moveL (p[grabX, grabY, grabZ, grabRX, grabRY, grabRZ]) ) and then continue the searching loop for the next tube.

When I try my program I get the following error:

Compile error: name ‘moveL’ is not defined

It identifies an error with the following line:

moveL (p[grabX, grabY, grabZ, grabRX, grabRY, grabRZ])

I’m pretty new to PolyScope so I have no idea if this is a formatting issue or a more fundamental error

Here is the full script that I have for the program:

Robot Program
abcd=get_actual_tcp_pose()
grabX≔abcd[0]
grabY≔abcd[1]
grabZ≔abcd[2]
grabRX≔abcd[3]
grabRY≔abcd[4]
grabRZ≔abcd[5]
Loop
MoveJ
Waypoint_1
Set DO[0]=Off
Set DO[1]=Off
moveL (p[grabX, grabY, grabZ, grabRX, grabRY, grabRZ])
Loop digital_in[0]≠ True
MoveL
Direction: Base Z+
Until (distance)
MoveL
Direction: Base Z-
Until (distance)
grabpose≔get_actual_tcp_pose()
grabX≔grabpose[0]
grabY≔grabpose[1]
grabZ≔grabpose[2] - 6
grabRX≔grabpose[3]
grabRY≔grabpose[4]
grabRZ≔grabpose[5]
MoveL
Direction: Base Z-
Until (distance)
Wait: 2.0
MoveL
Direction: Base Z-
Until (distance)
Wait: 2.0
MoveJ
Waypoint_2
MoveL
Waypoint_3
Set DO[1]=On
Set DO[0]=On
MoveJ
Waypoint_4
Wait DI[1]=LO

Thanks for any advise!

If this line is a script command, then it looks like the L shouldn’t be capitalized:

moveL (p[grabX, grabY, grabZ, grabRX, grabRY, grabRZ])

Also not sure if it cares that there’s a space between the moveL and the rest, plus I’m not sure if it cares that there aren’t any other parameters called.

Here’s the relevant info from the script manual:

13.1.22. movel(pose, a=1.2, v=0.25, t=0, r=0)
Move to position (linear in tool-space)
See movej.
Parameters
pose: target pose (pose can also be specified as joint positions, then forward kinematics is used to
calculate the corresponding pose)
a: tool acceleration [m/s^2]
v: tool speed [m/s]
t: time [S]
r: blend radius [m]
Example command: movel(pose, a=1.2, v=0.25, t=0, r=0)

1 Like