How to Monitor Part Presence with the Robotiq Gripper
Detect drops using grip_check at key moments or continuously with a background thread
Context
In applications where part retention is critical, ensuring that a part remains gripped during movement is essential. Robotiq’s gripper provides a grip_check
function to help detect whether a part has been dropped. This article explains two recommended methods to use grip_check
either before and after motion or continuously during robot movement.
Method 1: Check at the Start and End of Motion
This is the simplest way to verify grip integrity without requiring extra programming complexity.
-
Before the motion begins, call the
grip_check()
function. -
If the function returns False, it indicates the part is not present—halt the process or trigger an alert.
-
After the motion ends, call
grip_check()
again to ensure the part is still present.
This method works well for most stable operations and reduces computational load on the robot.
Method 2: Continuous Grip Check Using a Thread
For dynamic applications, especially those involving fast movements or possible part loss—you can monitor the grip in real time by running grip_check()
in a parallel thread.
-
Create a separate thread in your robot program.
-
Inside the thread, use a loop to repeatedly call
grip_check()
during the robot’s movement. -
Add a short delay (e.g.,
sleep(0.1)
) inside the loop to avoid overloading the processor. -
Start the thread just before the motion begins.
-
Stop the thread once the motion ends or the grip needs to be released.
This method ensures real-time monitoring and can help trigger immediate safety actions or error handling.
Best Practices
-
Use the simplest method when possible to reduce code complexity.
-
Always debounce your loop with a
sleep()
delay to prevent performance issues. -
Test thoroughly to ensure thread-based checks don’t interfere with motion execution.
-
Refer to official documentation: grip_check details are on page 98 of the Gripper Manual
Conclusion
Using grip_check
, you can ensure reliable part presence monitoring during robot operations. Whether you need a quick check before and after motion, or continuous real-time verification, Robotiq offers flexible options that adapt to your cell’s reliability needs.