Home Programming


Left ArrowBack to discussions page
PierreOlivier_ProulxPierreOlivier_Proulx Beta Tester VIsion 1.1 Program, Vacuum Beta tester Posts: 69 Handy

Let's say you want to start a process at a certain point on a path recording and stop before the end of the path, how would you do that? Here is a clean technique that will allow you to do such a thing.

Here are the steps to build this program:
  1. Record a Path
  2. In the BeforeStart node, wrap a MoveL in an If False node. This trick defines waypoints without executing them.
  3. Move the robot along the path with the play button (▶️) and stop were you want to start the process.
  4. Record this pose in the start_process waypoint
  5. Do the same thing for the stop_process waypoint.
  6. In a thread, monitor the distance between the tool and the waypoint. If the robot passes close to the waypoint, execute some code.
When you play the program, the thread will monitor the robot pose. When the tool passes near the waypoints, it will execute the process code.

I see two caveats to this technique. First, if the robot moves close to the waypoint in another part of the program, the process will be executed. To solve this, you could guard the thread with a flag; set if before the path and clear it after. Second, the thread could execute the process many times if the robot does not leave the waypoint vicinity fast enough. If you only set an output, this is not a problem.


Pierre-Olivier Proulx
Software Designer
[email protected]


Sign In or Register to comment.
Left ArrowBack to discussions page