Change Pally settings from inside the program

All settings on the Pally graphical configuration panels are translated into URScript local variables, which - along with some additional variables - determine the final behavior of the palletizer program. To get better control of the program, or change some settings in runtime, it may be necessary to alter one or more of these configuration variables.

Naming conventions

All configuration variables have names beginning with "rf_". The variables are visible only under the Pally program node, but can be enforced to be globally visible in case the variables are referenced in other threads or subroutines.

Changing configuration variables at startup

In this scenario, the configuration variables are changed once at startup, before entering the main loop of the palletizer program. To change any configuration variable, use the initial MoveJ program node under the Pally program node to enter script lines or script files that modify the variables.

Changing configuration at runtime

It might be necessary to modify some configuration variables from a Pally callback, e.g. change the approach distance for some specific products only. In this case we recommend using the OnNextTask callback, which is called before all calculations start.

 

Note: Changing some configuration variables such as the pallet calibration points in runtime won't have any effect on the current pallet as the values are only used once after product selection.

 

Note: Changing configuration variables may have no effect until pattern verification database is cleared.

 

Developer’s tip

To make sure you write the variable name properly, it is a good idea to print out the old value before changing. If the variable name is incorrect, the program will fail.

Instead of this:

rf_max_speed = 0.3 # <---- will have NO effect. The variable name is "rf_speed"

Try this:

textmsg("rf_max_speed old value:", rf_max_speed) # <----- The program will STOP here rf_max_speed = 0.3 textmsg("rf_max_speed new value:", rf_max_speed)
Verify the variable name is properly written

List of available variables

See the list of available variables, categorized by their functionality: