Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The pattern JSON files are managed by a background process called “pallet manager daemon” which provides many essential functions for the rest of the program.

The functions should be called from URScript code in the following format:

result = palletmanager_daemon.any_function(parameters)

How to get and use Pallet or Product data during palletizing project

Name

Description

Variables from request

Callback Placement

palletDim = palletmanager_daemon.get_pallet_dimensions(0)

Get Pallet data from selected Pattern

pallet_width = pallet_dimpalletDim[0] / 1000

pallet_length = pallet_dimpalletDim[1] / 1000

pallet_height = pallet_dimpalletDim[2] / 1000

beforePallet

productDim = palletmanager_daemon.get_product_dimensions(0)

Get Product data from selected Pattern

product_width = product_dimproductDim[0] / 1000

product_length = product_dimproductDim[1] / 1000

product_height = product_dimproductDim[2] / 1000

product_weight = product_dimproductDim[3] / 1000

beforePallet

global variables created

MoveJ

...

Note: name of variable you would like to access must be identical to variable from request(see top)

Get information about the current pallet state:

Name

Description

Variables from request

Callback Placement

palletState = palletmanager_daemon.get_pallet_state(0)

Get Pallet completion state during palletizing.

The function returns an array with 3 elements, in this order:

  • total number of boxes in the pattern

  • number of boxes already completed*

  • number of boxes remaining*

*The boxes currently being picked are not counted as completed or remaining.

nr_total = palletState[0]
nr_done = palletState[1]
nr_not_done = palletState[2]

  • onNextTask

  • beforeGrab

  • afterGrab

  • beforeRelease

  • afterRelease

Example:

Get the number of boxes being picked:

palletState = palletmanager_daemon.get_pallet_state(0)

next_boxes = palletState[0] - palletState[1] - palletState[2]

is_single_pick = (next_boxes == 1)