Home Programming

Discussion

Left ArrowBack to discussions page
zrehlanderzrehlander Unconfirmed Posts: 3 Apprentice

I have a UR10 that we want to use to tend a CNC lathe. I am wanting to teach the pallet sequence at the lowest spot on the table for a general program. For future uses I would like for the operator to be able to type in the Z dimension of the part that is being picked up and have the robot automatically offset that Z distance from the Lowest spot on the table that has already been taught. The X, Y, and rotations should remain the same. This way we would not have to reteach the pallet sequence for every job, rather we would just change the user input of part height and the program would do the rest for us. 

I currently only use the polyscope tablet for programming our robot as I have not messed with any of the script programming to date. 

What would be the best way to accomplish this?

Comments

  • zrehlanderzrehlander Unconfirmed Posts: 3 Apprentice
    For Example:

    I have my "Reference" position as p[-0.24712, -0.21240, -0.35914, 2.0482, 2.3821, 0.0057]. For example if I have a 50mm part I am trying to change this waypoint to p[-0.24712, -0.21240, -0.30914, 2.0482, 2.3821, 0.0057] to lift the grippers up off the table a bit. 

    I have tried making variables for Part Height, and placing that into the spot for Z in the new position but it does not seem to be working. When I look in my variables screen it shows the right pose numbers, but the arm is traveling way further down that what I am wanting. 
  • jelmsjelms Posts: 27 Handy
    edited June 16
    @zrehlander I defined a variable on the installation tab and this worked in the simulator. This should move to the waypoint and then z_offset away from it. Hope that helps.

     Program
       Robot Program
         Folder
           MoveJ
             Waypoint_1
           Wait: 2.0
         Folder
           w2≔pose_add(Waypoint_1, p[0,0,z_offset,0,0,0])
           MoveJ
             w2
           Wait: 1.0



  • zrehlanderzrehlander Unconfirmed Posts: 3 Apprentice
    Thank you. That seems to work with the height offset. Do you know how I can get the nested inside of the pallet command? I have tried doing this for the Corner 1-4 but they are not able to be altered other than teaching the point. When I did it for the Approach and Pick points it seemed to work, but it would just keep returning to the first square and not index to the next position in the position.
  • jelmsjelms Posts: 27 Handy

    Yeah I don't think there is quite a way to do that. The best I can think of is defining the pallet at the highest z you would need to support and using an additional variable waypoint down before doing the operation. But this will move to the position on the originally defined pallet first so not the most efficient.

    Using the simulator and saving this also generates a script that you could then modify. The code below generates a script that is attached.
    Program
       Robot Program
         Pallet
           Pattern: Square
             Corner1_1
             Corner2_1
             Corner3_1
             Corner4_1
           PalletSequence
             anchor
             Wait: 1.0
             var_2≔pose_add(get_actual_tcp_pose(), p[0,0,z_offset,0,0,0])
             var_2
             Wait: 3.0
             'Do you gripper or whatever here'
             Exit
    
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,131 Handy
    edited June 17
    Here is how we solve for palletizing, we do not use the built-in wizard as we generally want more control than that allows (file is attached, you can remove the .txt off the end and then use on the robot.

    Setup the pallet with 4 columns and 4 rows spaced evenly 100mm apart in both X and Y
    pallet_setup(x_offset = 0.1, y_offset =0.1, numInX = 4, numInY = 4) 
    Create a feature plane called `pallet_corner` the X axis should align with your rows, Y axis with the columns, Z aligned with the tool (generally pointing into the table)

    These functions are based on 0 based indexing, so the first position you would go to would be position 0, in our example the last position would be 15 (4*4-1)

    pallet_nextPosition(someSpace) #This would always stay on the plane
    
    local nextPosition = pallet_nextPositionAtHeight(space, z_offset) #This would allow you to define a new 
    z_offset from the plane that was taughtlocal nextPosition = 

    If the robot does not move in the correct Z_position, simply flip the sign on what you are passing in.  We assume that the positive number should come off the plane and so we reverse the sign in function 

    You would simply then use that nextPosition in your move using a variable as the waypoint type.  You could also calculate your over pick position like this

    local overPickPosition = pose_trans(nextPosition, p[0,0,-0.05,0,0,0] # This would be 50mm above the part (assuming Z points into the table, otherwise flip the sign on Z)


Sign In or Register to comment.
Left ArrowBack to discussions page