DoF - a Robotiq Community
Warning sign
The Dof Community was shut down in June 2023. This is a read-only archive.
If you have questions about Robotiq products please reach our support team.
Catherine_Bernier

A question that we get a lot since the release of our camera is emptying parts from a tray. I had to make a demo for a client this week where the client wanted to empty trays with parts to then load the parts in a machine. Placing/loading the part was not a concern to the client. The concern he had was the location of the tray and the location of the parts within the tray with the Robotiq Camera. Another request from the client was that he wanted to have a signal on the tray such that the operator can come and replace the tray anytime and the robot would empty it without having to press any buttons. Below is a video of the demo that I made. You will see a limit switch that detects the presence of the tray. The tricky thing here was to program the logic of the tray signal to see only rises of the tray signal to detect that a new tray was loaded. In my program, since I used a NC switch, the DI3 which is when the switch turns off when the tray is placed. To monitor this signal I used a variable called newTray1In that is updated in a thread.

Thread_1

     Wait: 0.5
     If tray1PrevState≟ True  and digital_in[3]≟ False 
       newTray1In≔ True 
     tray1PrevState≔digital_in[3]


https://youtu.be/ktocAyDyUIo

The other tricky part was the teaching of the object with the camera. First I needed to have the vision calibration board at the same height of the pieces in the tray. So I used a couple of shims that my calibration board would lay on. Then I simply calibrated the snapshot position as usual. Then I tried using the yellow background but that did not work. Not enough contrast with my brass component. So I used the blue cardboard that is provided with the camera as a background and that worked perfectly. Since the part is round, I also checked the ‘ignore object orientation’ box in the Camera locate setup.

One comment that I have for this application that I thought would be more easily is monitoring the signal of the limit switch. Anyone else has other ways to monitor Rising signals?

Here is the code:

 Program
   BeforeStart
     tray1PrevState≔digital_in[3]
     newTray1In≔ False 
   Robot Program
     Wait: 2.0
     MoveL
       Waypoint_4
     If newTray1In≟ True 
       obj_found≔ True 
       newTray1In≔ False 
       Loop digital_in[3]≟ False  and obj_found≟ True 
         obj_found≔ False 
         MoveL
           Waypoint_1
         Camera Locate
           Gripper Move 63%
           obj_found≔ True 
           MoveL
             Waypoint_2
             Waypoint_3
             Gripper Close
             Waypoint_2
           MoveL
             Waypoint_5
             Waypoint_6
             Gripper Open
             Waypoint_5