I still don't get what the robot is, what trajectory is, what the speed or required tolerance is etc. - only that it is, well..."crucial".
if it is so crucial, I would say do not depend on robot/software to generate 'clock', use robot for what robots do - move something in space.
get clock signal from a clock or function generator or - sensor. then you get away from any robot velocity and position errors, scan time, refresh time of the robot IO etc.
one very simple way to get a VERY repeatable pulse train is to use incremental encoder for example. since robot motion can be in any direction, optical encoder with draw wire could be the an option to look into. maybe have camera on a linear slide on the end-effector and get the "clock" from encoder as slide moves camera while robot is still.
as Johny5 says, "need more input"