Dear Bob
Thanks for reply
I test the program offline, and therefore I do not use Limit function. I think I need to add something at the very beginning of the script that can zero z reference before it wears a tool change. In order to better understand my intention please look at it here Legacy Auto Tool Change with Touch and Go - YouTube