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!