Hello!
how can i write this code please?
If the tcp ist on the path then… else …
That should be handled by the system parameter “regain distance”. If you need to make sure that it is closer to path you can reduce the distance. This is usually in the case of an e-stop or auto stop, program stop. Is that what you are trying to write the code for?