I would compare the current position of the robot to a list of points. If the current position corresponds to a known point then I run a trajectory.
Is there a program if not, how can I do?
You'll find a example of what i want to do (in Comau Robot attached file)