Pally General - Shim Paper Handling

Pally General - Shim Paper Handling

Adding a shim paper routine on the robot

Here is a list of what to do:

  • Add new ‘shim paper’ layers between regular layers in the Pallet Builder; you can add as many shim paper layers as you want

  • Write your own code in the OnSheet callback to pick the shim paper from the tray and put the shim paper on the pallet

Usually, we suggest creating three separate subroutines:

  • Pick shim paper from the tray (common)

  • Put the shim paper on the left pallet

  • Put the shim paper on the right pallet

You can find sample code in the article. The accurate robot positions can be calculated by using Pally global variables PalletCenter, LayerAlt, WorldPosition, etc. However, the actual waypoints are always project-specific and depend on the overall layout, the shim paper tray location, and other factors. You can adjust the waypoints on site easily in a few minutes.

The starting position when entering the shim paper routine is the initial waiting position that you have set in Pally.

Depending on your overall layout, some waypoints will be needed from the initial waiting position to the shim paper tray to avoid any possible collisions. You can easily teach waypoints using the teach pendant and manually moving the robot in freedrive mode.

To pick the shim paper, you can start from above the highest shim paper position and use the force-controlled move command until contact, and with an additional condition until distance X mm, see the screenshot below as an example.

When moving to the shim paper tray, you need to add one or more fixed waypoints (see waypoint_def, above_paper, etc, in the picture below).

The last waypoint should be the position on the top of the papers (with a full tray). Leave a small gap between the paper and the gripper foam, to allow force move to detect the actual surface.

The code fragment paperSource=pose_trans(WorldPosition, get_actual_tcp_pose()) should only be used with a lifting column to compensate for the lifting column position and move the robot further down to actually touch the top of the shim paper.

image-20250522-071319.png

 

 

Usually, we suggest picking the shim paper at the center point, but this is not necessary. The robot can also pick them to one side.

Here, it’s important to teach the next waypoints with shim paper on the gripper when moving it from the tray towards the pallet, so you can see the possible deformations of the paper while moving. Use a full pallet to investigate all possible collisions. All these intermediate waypoints from the tray to the pallet can be taught with the teach pendant, except for the last position.

The final position should be calculated from the pallet center and layer position, like this:

sheet_point = pose_trans(WorldPos, pose_trans(PalletCenter, p[X,Y,LayerAlt, 3.1415, 0, 0])) movel(sheet_point)

Here, X and Y are the offsets in case you don’t pick the shim paper in the center point. (The unit is in meters.) Otherwise, use 0, 0 so the paper center will exactly match the pallet center.

If you need to rotate the gripper before picking up the paper, try to replace:

…, 3.1415, 0, 0]

with one of the following

…, 2.2214, -2.2214, 0]

or

…, 2.2214, 2.2214, 0]

This will apply 90 90-degree rotation (test which direction is correct)

When the shim paper is in place, turn off the gripper and add some additional waypoints to move the robot safely back to the initial position without collision.

Example: Using shim paper with Pally

Including example programs

  • GetShimPaperFromStative

  • PutShimPaperToLeftPallet

 Use example programs as SubPrograms in the onSheet() callback, see photos (Program node example1 and Program node example2).

 The robot picks a paper from the paper source, then moves it to the top of the current layer of the selected pallet (left pallet in this example).

 Important things here:

  • Calculate the altitude of the paper source when the robot is on a lifting column: use the global Pally variable WorldPosition as shown in the example:

paper_source = pose_trans(WorldPosition, get_actual_tcp_pose()) movel(paper_source)
  • Calculate the shim paper position on the pallet by using the global Pally variables WorldPosition (lifting column only), PalletCenter, and LayerAlt.

If you move the lifting column in the shim paper callback, don’t forget to move it back to the position where it was before picking the shim paper:

OnSheet callback:

my_last_pos = get_liftkit_position() # […] do shim paper pick and place move_liftkit(my_last_pos)

(This works with Ewellix LiftKit. For other lifting column types, please refer to the lifting column user manual.)

If the shim paper is picked in the center

sheet_point = pose_trans(WorldPos, pose_trans(PalletCenter, p[0,0,LayerAlt, 3.1415, 0, 0])) movel(sheet_point)

In this simple example, the gripper is precisely at the center point of the shim paper.

If the shim paper is NOT picked in the center

To have an offset from the center point, add nonzero values for the x and y coordinates in the transformation as shown below:

sheet_point = pose_trans(WorldPos, pose_trans(PalletCenter, p[X, Y, LayerAlt, 3.1415, 0, 0]))

where X and Y (The unit is in meters) are the corresponding distances of the TCP from the center point of the shim paper (in the Cartesian coordinate system of the current TCP). Otherwise, use 0, 0 so the paper center will exactly match the pallet center.

2 types of shim paper

You can create two shim paper routines and control how you use them.

You can evaluate the LayerNr, LayerHeight, LayerAlt variables in the OnSheet callback and write a program that acts differently for the specific positions.

LayerNr: 1-based integer value, starting from the bottom of the pallet

LayerHeight: the thickness of the shim paper (in meters) as defined in Pallet Builder.

LayerAlt: position measured from the bottom of the pallet (in meters)

Explaining pose_trans()

When using the URScript function pose_trans()keep the following best practices in mind:

“The first argument, p_from, is used to transform the second argument, p_from_to, and the result is then returned. This means that the result is the resulting pose, when starting at the coordinate system of p_from, and then in that coordinate system moving p_from_to.” (URScript Manual)

 

Practical examples:

  1. move the gripper in the gripper coordinate system:

    pose_trans( get_actual_tcp_pose(), p[0, 0, 0.1, 0, 0, 0] )
  2. move the gripper in the base coordinate system

    pose_trans( p[0, 0, 0.1, 0, 0, 0], get_actual_tcp_pose() )
  3. move the gripper in the coordinate system defined by the pallet calibration (with floor correction)

    pose_trans( p[0, 0, 0.1, 0, 0, 0], pose_trans(pose_inv(PalletCenter), get_actual_tcp_pose())

Download example files

 

 

Layer count while handling shim paper

Pally does not count shim paper as a separate layer, but the variable LayerNr updates after the last product is placed on the layer, so it looks like this example:

AfterRelease last box: LayerNr == 1
OnSheet: LayerNr == 2
OnNextTask new box: LayerNr == 2