ForceCopilot: Enable/Disable Collision Detection using URScript


I’m searching around but couldn’t find an answer: I’d like to start and stop detecting collisions using URScript. Attached image shows how to do this using a node from Force Copilot URCap. However, due to the nature of my program, I’m using a few trajectories inside a URScript and at certain points through out the trajectory I’d like to turn on or off the collision detection with certain force and torque thresholds. Can this be done on a URScript level? If not, are there any alternatives by using Find Surface?

Best regards,
Zajeta slika