Below are some code samples showing different uses of the DENSO palletizing routine.
This is the most straightforward use of the palletizing routine in code. This example shows a single For…Next loop incrementing the pallet indexer I, and using that given position P to move and pick up a part.
For I = 1 to 12 ‘Approach, Move, and open gripper at Pick location P = Pallet.CalcPos (3,4,25, P, P, P, P, I, I) Approach P, P, 50 Move P, P ‘Open Gripper Depart P, 70 Next I
De-PalletizingTo unload a pallet, it can be as simple as re-arranging the code and how you order the movement.
For I = 1 to 12
P = Pallet.CalcPos (3,4,25, P, P, P, P, I, I)
Approach P, P, 50
Move P, P
Depart P, 70
‘Approach, Move, and open gripper at place location
Sequencing and Pallet Order
The For…Next command can be used to dictate the order in which you process the pallet. You can use it to return pallet positions for each sequential pallet position, or perhaps go every other pallet position, or use FIFO, LILO, LIFO, FILO methodologies with the pallet.
For I = 1 to 12 ‘Go in the normal pallet order P = Pallet.CalcPos (3,4,25, P, P, P, P, I, I) ‘Desired Pallet motion Next I For I = 1 to 12 Step 2 ‘Go in the normal pallet order, every other position P = Pallet.CalcPos (3,4,25, P, P, P, P, I, I) ‘Desired Pallet motion Next I For I = 12 to 1 Step -1 ‘Go in the reverse pallet order P = Pallet.CalcPos (3,4,25, P, P, P, P, I, I) ‘Desired Pallet motion Next I
Skipping Pallet Positions
It may be necessary to skip certain pallet positions. To accomplish this, you can use a Select…Case statement to automatically increment the pallet indexer when it lands on a certain value. In the example below, whenever the pallet indexer lands on 2, 8, 9, or 11, the Select…Case automatically changes the pallet indexer to the next number before using the Pallet.CalcPos function.
For I = 1 to 12 ‘Go in the normal pallet order Select Case I Case 2 I = 3 Case 8,9 I = 10 Case 11 I = 12 End Select P = Pallet.CalcPos (3,4,25, P, P, P, P, I, I) ‘Desired Pallet motion Next I
It is also possible to handle pallets layered on top of each other. With pallets of the same size and orientation, the best way to proceed would be to use a nested For…Next loop to increment the pallet position layer variable. Depending on how its arranged, the robot would process all the pallet positions on the first layer, then do the same with the following layer. This would work with incrementing or decrementing the layers. The big advantage is you still only need to teach the four corner positions to process a large amount of positions.
As a special case, you can also process different pallets that are intermixed with each other. Say you have two different sized parts going into a single pallet, you could program two different pallets that just have different corner positions. Just be mindful of spacing and clearances.
Using Work Offsets with Pallets
Another special case is using the same palletizing routine on multiple pallets in different locations (loading station, conveyor) without teaching any additional positions. This is done by utilizing Work offsets and nesting another For…Next Loop. You first teach your pallet positions in a created work offset (not Work 0), then run the pallet routine in other created work offsets to run the same pallet but different starting locations.
Pallets and Panel Screens
It is also possible to handle and process pallets manually by utilizing a panel screen. This is a straightforward and simple way to access and use the palletizing function. The panel screen can direct the robot to pick or place a specific pallet position, and to see what pallet positions are currently occupied.
Troubleshooting Palletizing Routines
Here are a few notes regarding troubleshooting your palletizing routines:
Incorrect Pallet Sequencing
When the robot goes through the pallet sequence and it appears to do the first and last rows normally, but does a bunch of picks in the middle, it means that the corner points are out of order. The points should be retaught, or simple rearrange them in the line of code.
Approach and Depart Heights
Pay attention to the approach and depart heights set for your pallet. As you pick/place from higher pallet stacks, the linear approach and depart distances may creep out of range of the robot (especially with 6 axis arms). You may need to intentionally decrease these values as the stack height increases.
- Ensure that the Stack Count (last parameter) is greater than or equal to 1. Leaving this at 0 or omitting it will cause an error at runtime.
- Stack Height: When you use the [Stack count] with 1 always, this value is not available. Enter 0.
Was this article helpful?
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
We appreciate your effort and will try to fix the article