Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Current »

With Callbacks you can extend the functionality of Pally to your needs.

Your Waypoints or custom code in the Callback will automatically be executed when that specific events occur.

Some typical use examples for Callbacks are:

  • Turning the conveyor on/off

  • Control a light tower to notify operators

  • Add a shim paper routine

  • Perform custom moves on the robot

    • Sort out bad boxes

    • Scan barcode on a box

  • Signal external machines

And many more..

Callbacks

Initial MoveJ node

Executed once on startup, after all configuration variables have been initialized. This allows runtime configuration changes and special tuning.

beforePallet

Before starting a new and empty pallet.

  • Start conveyor

  • Start other machine

  • Initialize variable that should be use trough the program

beforeZone

Before entering a new zone (typically a new layer on the pallet)

  • Lifting column control

  • Action before new layer or zone

onNextTask

Before starting all calculations for the next pick and place.

  • Modify path planning parameters dynamically

  • Prepare for custom motion towards the pick point

beforeGrab

Before lifting up a box from the pickup position. (gripper is placed onto the box)

  • Perform custom motion towards the pick point

  • Turn on vacuum

afterGrab

After lifting up a box from the pickup position. (gripper is placed onto the box)

  • Perform custom motion towards the target position on the pallet

  • If using a parallel gripper, close the gripper in this Callback

beforeRelease

Before releasing a box on the pallet (target position).

  • Turn off vacuum

afterRelease

After releasing a box on the pallet (target position).

  • If using a parallel gripper, open the gripper in this Callback

  • Perform custom motion from the pallet towards the waiting position

afterZone

After leaving a completed layer or zone.

  • Action after a layer or zone

onSheet

When a shim paper needs to be inserted. Add your own manual waypoints to shim/slip paper tray, pick the paper and move to a position over the pallet to where paper should be placed. See shim paper article for more information.

  • Start the shim paper routine

afterPallet

After the pallet is completed.

  • Stop conveyor

  • Stop other machine

Variables

The user-defined commands can utilize the values of the following global variables:

All variable below is Pally defined variables.

  • LayerAlt: The altitude, measured from the top of the empty pallet (accumulated height of all layers up to the current layer - mainly used in shim paper routines).

  • LayerHeight: Height of the layer currently being processed. For normal layers this is identical to the product height. For shim paper layers this contains the thickness of the current shim paper.

  • LayerNr: Indicates which layer is being palletized, starting from 0.

  • MountPosition: variable to use with custom path as dynamic position is activated

  • MovePerformed: this is a user writable variable to indicate that the robot has been moved to the MoveTarget position and the program should skip the movement. With this variable it is possible to implement custom movement from the pickup to the target position, or back from the target position to the waiting position. Set this variable to True in either afterGrab or afterRelease, depending on the direction of the movement that has been performed by user code.

  • MoveTarget: target position. In the beforeGrab callback, this value contains the pose of the pick position for the next box(es) including gripper rotation and offset corrections. In the afterGrab callback, it contains the target pose of the box on the pallet where the robot should move. In the afterRelease callback it contains the pose of the default waiting position, transformed by the lifting column position.

  • PalletCenter: A pose that defines the position and orientation of the pallet top center.

    • e.g used with slim/shim paper

  • PalletNr: 1=right pallet, 2=left pallet.

  • ProductCount: The number of boxes on the pallet, starting from 0. Please note the value is updated between beforeRelease and afterRelease.

  • ProductHeight: Height of the box that is being palletized.

  • ProductName: Name of the product that is being palletized.

  • TaskCompleted: this is a read-write boolean variable to indicate that the box(es) are successfully palletized and the box counter can be incremented. The default value is normally True, but can be False when a vacuum sensor is installed and vacuum is not detected at the target position before releasing the boxes. Set this variable to False to repeat the same box position, e.g. when a project-specific quality check is implemented and some boxes are moved from the pickup position to a waste bin instead of being palletized.

  • WorldPosition: A pose that defines an extra transformation for elevated lifting columns.

  • ZoneNr: Indicates which part of the pallet is being palletized (when using zones of lifting columns).

Example of a pose: p[0,0,0,0,0,0]

List of global variables in Pally

List of global variables in Pally

Some typical examples of uses for user-defined commands are to insert a shim paper, start and stop the conveyor, sort out inappropriate boxes to a waste bin, perform custom motion in very special layouts, control light signals and signal external machines, etc

Examples

1. Full pallet timer

Timer for counting how long a full pallet would take. The value is presented in the RUN screen

2. Shim paper routine

URP’s is added outside the program and called on from the onSheet Callback

PutShimPaperToLeftPallet.URP: Customize your own movements for placing paper onto the pallet

GetShimPaperFromStative: If palletizing on two pallets one common move down to the stative could be used

3. Change optimizer parameters for the next box


4. Custom path

Control the robot motion directly when specfic events occur.

Please note: due to the parallel processing architecture in Pally, it is not possible to move the robot directly in the onNextTask callback: the robot may be still moving back from the previous target position when the new calculations start. Trying to move the robot would cause “Another thread is controlling the robot” error followed by protective stop. When using custom path towards the pick position follow these steps:

  • set MovePerformed = True in the onNextTask callback in advance, but

  • move the robot to the MoveTarget position only in beforeGrab

The MoveTarget variable is not yet valid in the onNextTask callback.

  • No labels