Question about Using tool_contact function in URScript


I am interested in getting some guidance and clarification on an example made in the scripting manual for the tool contact function option.

I have attached a screenshot of the example. I’m not entirely sure how to use this function, but I was planning on setting a variable equal to this function and adding in a direction in the argument of the function.

example : make_contact = tool_contact(direction[1,0,0,0,0,0])
My understanding is that when you run this command it will seek contact in the x direction relative to the robot base. But does it keep seeking contact with something until it is found? Or do I need to somehow add in a command to have it keep moving in the x direction until contact is detected?

The example 14.1.49 in the manual makes it seem like I should add this command but I’m not entirely sure. I would also like some clarification on the part of the example where it says “while True:” While what is true?

Thank you.