Skip to end of banner
Go to start of banner

Headless Pally

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 4 Next »

This article contains useful information about running Pally without the Teach Pendant.

Understanding headless mode

In most setups the palletizer robot is a standalone application. The operator uses the teach pendant to select product, continue or terminate existing pallet, confirm empty pallet positions, etc.

In headless mode however, the robot should be able to palletize without using the teach pendant. This means an external interface will be used to select product, continue or terminate existing pallet, display current progress, etc.

To run Pally without the teach pendant we recommend using the Order Processing functions, deactivate the Operator Interface, and Redirect all Popups using registers. During progra run it is also possible to send a detailed progress report via Callbacks.

At the bottom of this page you’ll also find a sample program where Pally is controlled via OPC UA.

Useful settings related to headless mode

GUI settings

It is recommended to select Operator Interface: “None”. This will instruct the code generator to exclude all script functions related to the Pally operator interface. As a result, the robot program will be shorter, and start faster.

Automatic order processing

Add the following script line under the initial MoveJ node under the Pally program node:

rf_order_mode=2

This will instruct the Pally program to get the pattern name and requested number of boxes from the Order Management API. The program will keep running until terminated by external control signals or a fatal error occurs.

Using the Order Management API functions

The Order Management API functions provide an easy interface to instruct Pally what to do. The pattern name and the number of boxes can be specified programmatically.

It is possible to access the Order Management API functions via the Pallet Manager daemon XML RPC interface, e.g. using Python, but we recommend using script functions in a separate thread inside the robot program.

Product selection variables

Using the product selection variables rf_product_selection_strategy and rf_product_selection_predefined is still possible, but not recommended when using Pally in headless mode. These variables are useful when creating a simple palletizer application with a fixed pallet pattern, but won’t provide a flexible workflow that can be easily controlled by an external controller.

Easy pattern selection

In headless mode it is a common practice to use a special naming convention in pattern names to make pattern selection via external control systems easy. In the following example we use 4-digit integer number in the pattern file name to identify patterns, assuming every pattern file name is in the format

P_nnnn_patternname.json

where nnnn is a 4-digit integer in the middle of a file name.

The function goes through the list of available patterns in the patterns folder, and return the file name that matches the search criteria.

def find_pattern_by_nr(pattern_number):
  # convert number to string with zero padding
  local p_str = str_cat("0000", pattern_number)
  # make sure the string is not longer than 4 digits
  p_str = str_sub(p_str, str_len(p_str)-4, 4)
  local nr_patterns = palletmanager_daemon.init_pattern_cache()
  local pattern_nr = 0
  while (pattern_nr < nr_patterns):
    local file_name = palletmanager_daemon.get_file_name(pattern_nr)
    textmsg("Testing pattern name: ", file_name)
    if (str_len(file_name) >= 6):
      if (str_sub(file_name, 2, 4) == p_str):
        textmsg("Found pattern name: ", file_name)
        return file_name
      end
    end
    pattern_nr = pattern_nr + 1
  end
  return ""
end

Pallet confirmation signals

Pallet confirmation is done via the Pallet Confirmation signals as specified in the Installation Node. This can be used in Headless Mode as well.

The pallet confirmation signal must go from LOW to HIGH to confirm a new empty pallet.

Pallet termination signals

Terminating the current pallet can be done via the variables rf_P1_terminate and rf_P2_terminate.

Setting rf_P1_terminate = True will stop the right pallet instantly.

Setting rf_P2_terminate = True will stop the left pallet instantly.

Pallet termination at program (re)start

After stopping and starting the program again in Headless mode, the program will continue the existing pallet unless specified otherwise. To terminate the existing pallet on program start, make sure the corresponding variable (rf_P1_terminate and/or rf_P2_terminate) is set to True in the initial MoveJ node under the Pally program node.

Pallet termination during program run

Setting rf_P1_terminate or rf_P2_terminate to True will finish the current motion (put down the last box that is currently held by the robot) and finish the current pallet.

If the order has more pallets to be palletized, the robot will wait for a new empty pallet confirmation signal and then proceed to the next pallet in the current order.

If the order has no more pallets, but there are additional orders in the queue, the robot will wait for a new empty pallet confirmation signal and then proceed to the first pallet of the next order.

Otherwise the robot will go to the default waiting position and wait for a new order.

Progress indicator

Use Callbacks to report the current progress back to the external control system. Use the global Pally variables such as ProductName, PalletNr and ProductCount. You can also get more detailed information via the Pallet Manager Daemon.

Suppress popups

It is possible to suppress Pally popups and use IO registers to indicate an error/warning. An integer code and an optional integer parameter is provided.

Unique error codes

  • This position cannot be palletized (2002)

  • Unable to find a collision-free path (2011)

  • this pattern hasn’t been fully verified (2023)

  • controlling the external hardware failed (2005)

  • vacuum not detected (1016)

  • … (more to come)

Example

to do

  • No labels