Universal Robots Forum

Palletizing template completes only 1 item

Hi there,

When I create a program, that doesn’t loop forever, the palletizing template only handles 1 item. Is this a bug or is it intentional?

I found this when I wanted to use the script file of a previously created template in a program, that uses my URCap. The program doesn’t loop forever, because the user can flick some flags to keep it running. When I tested it, it only completed 1 item, then moved on to the rest of the program, then when it came back to palletizing, it completed only the same item again. Then I created a very similar program, but only using the built in program nodes and the same thing happened again.

I think the template should have an internal while cycle that uses the existing pallet counter variable.

Viktor

You need a counter variable at the end of the cycle like

part_count = part_count + 1

So every time you finish a part you advance to the next part in the grid.

Then another variable to count how many parts have been run (this is the number of rows x the number of columns).

if total_part_count = 140 then total_part_count = 1

That resets the counter at the end of the pallet.

I know, that’s not the problem.

The built in template itself can’t advance to the next item on its own, I had to write a while cycle in the template’s script file. This way it works as intended, but I don’t know if this behaviour is intentional or not.

This behavior is intentional. The template will calculate the full pallet depending on shape, layers, separators etc. and keep counters for where it is in the pattern/layer. From there it is up to the user as to what they do before entering the pallet and after exiting it based on the application. Typical uses have the program looping forever for continuous production; this automatically advances the pallet positions.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.