Discussion

Left ArrowBack to discussions page
SebastienSebastien HandyPosts: 219 Handy

I have been testing an application where the robot would pick parts from a table top and insert it in the proper position of a tray. The client does not want to have a jig that would locate the tray each time. The operator would put the tray on the table, turning on a switch saying to the robot that a new tray has been inserted. The robot would then start picking parts from the table (also using vision) and place parts in the tray. 

I think there are many ways this application can be programmed and I wanted to share mine to get some thoughts on this. My idea is to use a counter variable that would keep track of the parts ID to be inserted in the tray. So under the camera locate, depending where I am at with this counter variable, the robot will move to a certain location to place the part in the tray. Below is the code programmed for the first two positions in the tray. Note that the first camera locate is to locate the part to be picked and the second is the one to locate the tray.

I find that this setup works fine but is a bit time consuming to program if you have a large tray. Any way we can use the Pallet Tool under the vision locate? Any other way you would go around to program this?

Program
   BeforeStart
     tray_count≔0
   Robot Program
     MoveL
       Waypoint_4
       Waypoint_1
     Camera Locate
       Gripper Move 54%
       obj_found≔ True 
       MoveL
         Waypoint_2
         Waypoint_3
         Gripper Close
         Waypoint_2
       If tray_count≟0
         MoveL
           Waypoint_5
           traydropsnap_var
         Camera Locate
           If tray_count≟0
             MoveL
               Waypoint_6
               Waypoint_7
               Gripper Open
               Waypoint_6
               tray_count≔1
           ElseIf tray_count≟1
             MoveL
               Waypoint_10
               Waypoint_11
               Gripper Open
               Waypoint_10

Comments

  • matthewd92matthewd92 Handy Posts: 945Founding Pro, Tactile Sensor Beta Testers Handy
    @Sebastien Here is how I go through something similar when we are removing parts from a tray.  We will actually keep track of a status of the tray using a list and by changing a list value as the tray is emptied or filled (not in the example below)

    To keep from having to program each individual way point you will need to set the number of rows, columns, the row spacing and the column spacing, you can then dynamically move to each location as you are filling the tray.

    Program
       BeforeStart
         numRows≔3
         numCols≔3
         colSpacing≔150/1000
         rowSpacing≔35/1000
         i≔0
         j≔0
         k≔0
         numSpots≔numCols*numRows
         initialPoint≔Tool
         MoveJ
           initialPoint
       Robot Program
         Loop i<numSpots
           Pick Part
             MoveJ
               Waypoint_1
               Waypoint_2
               Waypoint_1
           Calculate Next Place Point
             x≔j*colSpacing
             y≔k*rowSpacing
             clearPoint≔pose_trans(PalletCorner,p[x,y,-100/1000,0,0,0])
             pickPoint≔pose_trans(PalletCorner,p[x,y,0,0,0,0])
             i≔i+1
             If k<numRows
               If j<numCols
                 j≔j+1
               Else
                 j≔0
                 k≔k+1
           Place Point
             MoveJ
               clearPoint
               pickPoint
               clearPoint
         i≔0
         j≔0
         k≔0
    
    
    

  • SebastienSebastien Handy Posts: 219 Handy
    @matthewd92
    this is really nice! Thanks for the tip!
  • matthewd92matthewd92 Handy Posts: 945Founding Pro, Tactile Sensor Beta Testers Handy
    @Sebastien thanks, glad it was useful. 

    In case it wasn't obvious, the PalletCorner point is a taught feature. You could make this point variable if for instance you are using a camera to find the corner of the pallet if it were randomly placed, then the pattern would change relative to the pallet
Sign In or Register to comment.
Left ArrowBack to discussions page