Packing bales into a forming box may look like just another palletizing job. Anyone who has actually pressed rubber and packed bales into forming boxes knows: the hard part is not "pick it up, put it down" — the pressed bale springs back, and the top of the bale is not a flat plane. The nominal thickness of 200 mm is only a process target. After pressing, the rubber swells back; top-up feeding is never perfectly even, so the bale surface bulges and shifts. On site, the highest point of a bale can reach about 300 mm. If the program writes every layer as a flat "200", it will soon hit those bulges — colliding with bales and throwing errors; or, to dodge the high spots, the whole layer is lifted loose, the low spots land empty, bounce and drift, and the stack tilts more and more.
We deliver four-axis palletizing and packing equipment for overseas factories. The customer's process is explicit: conveyor feeding, robot arm gripping, packing into forming boxes in a fixed pattern, then pressing bales against the box wall or neighboring bales. Typical pattern: six bales per layer, six layers; adjacent layers rotated 180° to offset gaps and fill the box. Material is mainly 25 kg and 35 kg; the current line runs 35 kg bales at about 680 × 340 × 200 mm.
What this article wants to share is not a "manual" but the reasoning behind each choice when we turned this process into a repeatable method on site. The industry rarely lacks concepts — it lacks these unremarkable judgements that, if skipped, cause failures.
1. The real difficulty is not the robot arm itself
Four-axis palletizers for pallet stacking are mature. Packing bales into forming boxes differs in three ways.
First, the material is not a standard part, and the bale top is not a plane. Bales come from the front-end pressing line. After top-up feeding, compaction and demolding, each bale both springs back and bulges. The nominal 200 mm only says roughly how thick the bale is; what actually hits the gripper and the next layer is the highest point on the bale surface. On site that highest point can reach about 300 mm — the gap is not a few millimeters of tolerance, it is on the order of half a bale bulging out of the surface. In one layer of six, which bale carries the high point and on which side changes with every bale.
An open-loop trajectory that stacks 200 mm layer by layer assumes every layer is flat and even. The site is not. Too low: the next layer lands on air, bounces and drifts. Too high: the gripper hits the bulge, resistance rises — at best a servo alarm, at worst a crash into the box or bales. Overseas factories suffer most from this — sending people to edit points layer by layer quickly costs more in travel and labor than the machine's own service margin. After patching this batch, the next shift's pressing state changes, the bulge moves, and the patch stops working.
Second, the work happens inside the box, not on a pallet. The forming box is roughly 1565 × 1145 × 1510 mm, and the effective cavity for stacking is tighter. The gripper must enter and exit through the box mouth, and inside it must hug walls, move laterally and press. The common palletizing habit of "insert diagonally while rotating and descending" is dangerous here: the box wall is right beside you, and flat and vertical bales need different rotation angles.
Third, the last bale must be pullable out. The gripper holds the bale with two side plates. After the last bale of each layer is placed, the gripper must withdraw from a gap that is already tight. Sensors cannot simply sit on the jaw tips or sides, or the last bale can neither be measured nor pulled out. This constraint directly decides how height measurement is done and whether pushing can have an extra cylinder.
So our goal is very concrete: close the process loop in the factory; on site, focus on teach-in and parameters, rather than a veteran engineer hand-editing the program layer by layer. Adaptive height is the first cut at this; path planning and push rules are the skeleton that puts it into a real box.
2. Get the coordinate system clear: passing the box mouth looks at the gripper's lowest point
Many palletizing programs habitually compare heights with the Z of the flange center. That works on an open station, but not inside a forming box.
Our gripper has a fixed offset from flange to lowest point (calibrated on site, about 1377 mm). The robot base is raised; the box is on the floor, but both are taught in the same world coordinate system. Therefore:
- Whether it clears the box mouth compares the gripper's lowest point against the box's highest point — not whatever number the flange reads;
- The safe point above the conveyor, the point at the box mouth and the exit point all use the same flange height — so the gripper bottom is at the same level and horizontal travel outside the box is safe;
- Don't add or subtract the base lift by hand in the program again. When teaching safe points, just confirm with your eyes and a tape measure that the gripper bottom is above the box top.
Layer-1 placement height is also often miscalculated. The taught box-bottom point is already the flange height with the gripper empty against the inner floor — 1377 is already included. Layer 1 only needs margin on this flange: about 10 mm to avoid dragging the floor, and about 10 mm for gripping offset (the gripper cannot grip the bale's lowest edge). Adding 1377 again lifts the whole gripper set, and the bale will hang in mid-air.
From layer 2 onward it is different. The resistive ruler measures the world height of the bale top, near the gripper bottom, not the flange. Only when going from "bale top" back to "flange for next-layer placement" do you add back the flange-to-gripper-bottom offset. The reference changes, so the formula changes — these are not two conflicting algorithms but two physical quantities.
3. Feeding: the arm ignores the conveyor, but must absorb brake sliding
The conveyor is an independent system: a through-beam sensor detects incoming bales; a VFD with brake stops them. When a bale is taken, the beam is clear and the belt runs; when a bale blocks the beam, the belt stops. The beam can slide along the belt to match braking distance at different speeds. After changing speed, adjust on site by hand — no need to write conveyor logic into the robot program.
The arm only cares about one thing: only after returning to the safe point above the conveyor does it check "bale present"; blocked counts as present, then a 1–2 s delay before it descends to grip.
Why not check the signal mid-travel, and why not dive down the moment the signal arrives? Because between the beam trigger and the VFD brake, the belt is still sliding. The delay, plus the time from the safe point down to the pick point, absorbs the slide. Use the signal too early and you grip a moving bale; use it too late or at the wrong place and you grasp air or scrape the belt.
One more thing is easily missed on site: the gripper must open before descending to the pick point. Descending with a closed gripper hits the bale; pushing bales with an open gripper scrapes neighbors. Open, close, retract — three states correspond to pick, place and push; don't collapse them into "just clamp".
4. In-box path: no diagonal insertion, rotation only outside the box
Flat and vertical bales have different rotation angles. If you rotate while entering, the bale or gripper envelope sweeps the box wall. Our rule:
Complete the rotation at box-mouth height, then go down vertically; when exiting, rise vertically to the box mouth, no rotation inside, then translate back to the conveyor.
After entering, we also do not "diagonally slam" toward the placement point. On site it is fixed in three segments:
1. Down vertically to the pre-placement point — XY unchanged, only height changes. The pre-placement point is set back from the final placement point opposite to the "about-to-press" direction, slightly raised. This gives buffer from the wall when entering, no rubbing. 2. Horizontal wall-hug — height unchanged, only XY, translating the bale to the wall-hug position. 3. Micro-lower to place — XY unchanged, slow descent, release.
Why three segments instead of one diagonal line to save cycle time? Because a diagonal line changes XY and Z at the same time. The bale starts approaching the wall while descending; any pose error or box-mouth deformation means wall scraping or jamming. Vertical guarantees "safe depth first", horizontal guarantees "wall-hug at a known height", micro-lower guarantees "final contact is controlled". The cycle adds a fraction of a second in exchange for repeatability, debuggability and overseas delivery.
Pre-placement, wall-hug and push-side points are not taught one by one by a veteran. Teaching only covers: each slot's final placement point (XY and rotation of the wall-hug target), plus box center, box bottom, conveyor and pick point. Everything else the program derives from "where to push". The box center must be taught as one dedicated point — all later "push toward the outer edge or the side wall" decisions judge by whether the placement point is on one side of the box center; never guess with the box's nominal dimensions.
5. Height closed loop: measure the highest surface of each layer, and deviation does not carry to the next layer
This is the real problem this solution solves.
The old practice was open loop: layer 1 by box bottom plus margin; above that, each layer by "nominal bale thickness × layer number". Nominal 200 mm treats the bale top as a plane. As soon as one bale bulges toward 300 mm, this layer is a big chunk higher than the program expects. Stacking on, the deviation is not a few millimeters but a whole layer out of place. On site the only fix is manual point patching; when the pressing state changes, the bulge moves and the patch fails.
We changed it: after each bale is released and settled, measure that bale's top; after all six in the layer are measured, take the highest surface as the bottom of the next layer. The parts that genuinely bulge are measured into this layer and do not pass down. Layer 6 no longer carries the accumulated error of "five layers all guessed as flat 200".
This is also why you cannot derive push-lift and probe depth from nominal thickness. If the lift is written as 200 + safety margin, then when a bale's top is high, the gripper lifts up still near the bulge and the lateral move scrapes it. Lift and probe follow the measured highest surface of this layer; nominal dimensions are only a process reference, not the truth for motion.
Why measure the highest, not the average
What the next layer is most likely to hit is not the average thickness but the protruding point. In one layer of six, most spots are near 200; if one spot reaches near 300, the average still looks "fine" — and the next layer placed by the average will land squarely on that bulge. Using the highest surface as the base, the next layer will never be lower than the true highest point — priority is not hitting. Small local hollows leave a slight gap — accept it, or let the bale settle by its own weight, downward only and amplitude-limited. This is the safe-side approach. In palletizing, if "looks tighter" costs a collision, nobody on the overseas site will clean it up for you.
Why a resistive ruler, and why mounted in the middle of the gripper
Vision solutions are sensitive to light, dust and in-box occlusion — harder to maintain in overseas factories. End-effector force control can act as a collision net but gives no absolute height of "where the next layer should be". A resistive ruler (linear displacement) is simple in structure: calibrated once in the factory, mostly a repeated loop on site.
Neither the sides nor the top of the gripper can host a sensor — the last bale has to be pulled out of the gap. The ruler can only sit between the two clamping plates. A small contact plate is added at the end, pressing the surface rather than a point, so it does not jab into a soft or uneven bale top. The measuring moment must be: bale already settled, gripper not yet withdrawn, arm stationary. Measure after withdrawal and the ruler has left the surface — the reading is meaningless.
The contact plate serves only height measurement. After extending, reading and retracting, it must be retracted before any lifting or pushing. Letting the probe ride along on lateral moves and presses is the easiest way to break the sensor. On site we have no "retracted" confirmation yet, so we make the retraction solid with a delay — hardware can be added later, the order cannot be skipped.
Measure first, then push
Pushing may slightly change the bale top. We chose to measure first then push, accepting that small post-push error. The reason is practical: measuring again after pushing makes the path more convoluted, the gripper has left the placement pose and the measuring point is no longer clean. The layer-height loop wants "don't hit in the next layer", not "chase every millimeter". The wall-hugging benefit of pushing outweighs that small height error.
Two more checkpoints before lowering — not one
Before entering the box, first ask: with the computed placement height, is the gripper's lowest point already below the box mouth? This is the coarse checkpoint. If the height system broke, a variable was not written, or it is still above the box mouth — stop here, no probing down.
At the box-mouth point, bale still clamped, just before straight descent, ask again: is this layer's placement height too deep compared to the theoretical layer? Layer 1 compares to box bottom plus margin; from layer 2 on, to the layers already placed and bale thickness. Too deep — stop. This is the fine checkpoint. It stops "computed too deep, will press through"; it does not stop a bulging bale top. A bulge grows upward, not the whole layer sinking down. Too high can only be handled by measuring the highest surface and lifting the next layer.
The two checkpoints do not catch the same kind of error. Checking only against theory may miss gross errors; checking only against the box mouth may release as long as "it fits through the door" — possibly already pressing through this layer. When the bale top is higher than the nameplate, the theoretical layer-depth check still thinks the height is safe — which is exactly when measurement is most needed. On-site incidents often happen when "the program believes it is right". The checks exist to stop that confidence.
6. Pushing: no cylinder, push with the arm; deliberately don't push the last bale
Putting the bale into the box is not enough. To fill the box, bales must hug the wall and neighbors. The old instinct adds a push-plate cylinder. We did not go that route.
The gripper already carries a small push plate for height measurement. If it also acts as the push actuator, measuring and pushing compete for the same stroke and the same protection, and when something fails you cannot tell whether the ruler was not retracted or the bale was not pushed home. Push stroke should follow bale width (lateral move ≈ bale width + 30 mm; press ≈ lateral extra + another 20 mm). Once a cylinder stroke is fixed, switching 25 kg / 35 kg means changing mechanics. The arm can translate by itself; stroke can follow the dimensions.
So the rule is blunt: pushing uses only the arm; the measuring plate extends only for measuring.
The order of six bales per layer is not random numbering but process order:
- First two bales placed flat, pushed toward the box's outer edge;
- Next two vertical bales against the side walls, each pushed toward its near wall;
- Bale 5, one of the middle vertical bales, is set to lean against bale 4;
- Bale 6, the last one, is not pushed.
The last bale is not pushed because there is nowhere to push — and the gripper must come out cleanly. Forcing it would crush the placed layer or wedge the gripper in the gap. Bale 5 leans toward bale 4 so the middle gap is left for the last bale to "place and finish", rather than both sides pressing in and eating up the last bale's space.
For bales that need pushing, after the measuring plate retracts and before the lift-lateral move, first close the empty gripper jaws. After releasing, the jaws are open; an open gripper moving laterally and pressing has a bigger envelope and scrapes neighbors and walls. Closing makes the gripper "slim" again. Then lift (bale thickness + safety margin), translate to the outer long side, descend to about half height, and press a short segment along "where to push".
Which way the lateral move goes is not along the push direction either. Once the push direction is fixed, the lateral move takes its perpendicular, choosing the side closer to the box center, to avoid moving out toward the box wall and sending the gripper outside the box. These directions are computed by the program from the placement point's position relative to the box center; the teach-in operator does not need to memorize axis letters.
7. Specifications can be parameterized; slots cannot magically grow from input dimensions
25 kg and 35 kg bales differ in length, width and height. Most motion quantities are formulas and should not be hard-coded into two programs:
- push lift ≈ bale thickness + safety margin;
- push probe ≈ half height + safety margin;
- lateral move ≈ bale width + lateral extra;
- the press stroke can keep following the lateral extra.
When switching specs, input the real dimensions and these quantities can be recomputed.
But the XY and rotation of placement points cannot. How bales sit in the box, how flat and vertical stagger, which wall each slot hugs — that is geometry and process, not substituting dimensions into a formula. 25 kg still needs a new set of taught layout points or a saved project. Box bottom, box center, conveyor and pick point are also site geometry. Cutting "what can be computed" from "what must be taught" prevents customers from thinking that changing three numbers switches bale types.
That is our attitude toward a parameterized process package: parameters reduce on-site programming but do not pretend site geometry does not exist. Being able to send one fewer person depends on closed loops and rules, not on one table covering every box in the world.
8. What this means for the industry
Forming-box bale packing has long had two extremes: expensive six-axis with vision, pushing up unit cost and maintenance complexity; or cheap open-loop four-axis, leaving the difficulty to a veteran on site. Overseas factories suffer most from the second — the machine can be bought, but the process is locked inside a few people who know how to edit points.
We chose a third path: four-axis is enough, but the on-site constraints must be written into the program. Height is a measured closed loop; path is "rotate outside, three segments inside, exit vertically"; pushing uses the arm instead of adding another fragile cylinder; safety uses the "pass the box mouth" and "against theoretical layer depth" two checkpoints. The goal is not laboratory-perfect fitting, but:
- when the bale surface bulges and springs back far above the nominal 200 mm, layer 6 is still placed on the true highest surface instead of slamming into it by the nameplate;
- logic tuned in the factory goes on site mostly as taught points, not rewritten rhythms;
- switching specs: motion parameters computable, layout points teachable and copyable — no need to invent a program from scratch.
The palletizing industry does not lack the word "automation". It lacks admitting that the bale top is not flat, the box is narrow, the gripper is thick — and writing those admissions into every motion. We publish these practices because they do not depend on a slogan but on walls we kept hitting on site.
In the future we will continue two things on this skeleton: in-factory calibration and protection of the height sensor, and packaging 25 kg / 35 kg into switchable process packages. Force-control collision avoidance, remote assistance and a local service network are the next layer of lowering overseas delivery cost. The height closed loop and in-box rules are the premise that makes those possible.
This article is based on the on-site practice of four-axis forming-box bale palletizing and packing. Specs: 35 kg bale (about 680 × 340 × 200 mm), 6 layers × 6 bales. Nominal thickness is the process target; after pressing the bale surface springs back and bulges — on site the highest point can reach about 300 mm. Different pressing lines and box types must be implemented with on-site teach-in and calibration; do not directly reuse the numbers.