AP_LD and RT_LD Functions

Filed under: FANUC Workflow TP Programming

If you’ve ever worked on a robot with the Constant Path option, you’ve probably seen these funny motion segment modifiers and wondered what they were for.

AP_LD and RT_LD stand for “Approach Linear Distance” and “Retreat Linear Distance.” They guarantee the last (or first on a retreat) Xmm of a given motion segment to be linear. This can be very useful when you need to avoid an obstacle or make sure your motions are not rounding off too soon.

Here’s a quick example:

  L P[1:approach] max_speed CNT100 ;
  L P[2:pick] max_speed CNT0 AP_LD50mm ;
  L P[3:retreat] max_speed CNT100 RT_LD75mm ;

Assuming your approach position is more than 50mm above the pick position and your retreat position is more than 75mm above the pick position (the function can’t do much if you don’t give it enough space to work), your motion will be linear for at least those distances, even at CNT100.

I used to accidentally place the modifiers on the wrong motion statements. Just remember that each statement in your program represents a motion segment from the robot’s current position to the provided position. If you want the approach to a position to be linear, put the AP_LD on that position. If you want the retreat from some position to another, put the RT_LD function on the final segment.

Watch out for Slow Moves

This is effectively turning your CNT100 into CNT87 or CNT46 or whatever would be required to round the corner such that the linear distance is achieved.

If your approach position is only 50mm above the pick position, using an AP_LD of 50mm effectively changes the CNT100 to a FINE termination type. This is really slow! Even a CNT0 would be better.

I usually only use these features when I am working in a very tight space. Maybe the robot has enter 150mm into a fixture with only a couple millimeters clearance on either side of the gripper. To guarantee the clearance while still maintaining maximum speed (CNT100), I might throw an AP_LD150 onto the segment.

Want posts like this delivered right to your inbox?

If you liked this post, please sign up for my mailing list!