set_palletizing_mode

This function maintains path tracking and velocity around the wrist singularity point during palletizing application motion. There is no instability in the wrist singular region when the B-axis of the robot is commanded to 0° or 180°.

This mode improves motion smoothness and precision during repetitive pick-and-place or stacking operations in palletizing applications.

Definition
DRFLEx.h within class CDRFLEx, public section

bool set_palletizing_mode(unsigned char iMode)
{
    return _set_palletizing_mode(_rbtCtrl, iMode);
};

Parameter

Parameter Name

Data Type

Default Value

Description

iMode

unsigned char

Sets palletizing mode
0: disable palletizing mode
1: enable palletizing mode

Return

Value

Description

0

fail — function call unsuccessful

1

success — palletizing mode changed successfully

Example

// Enable palletizing mode
// This stabilizes wrist motion near 0° or 180° to prevent singularities
Drfl.set_palletizing_mode(1);

// Move to the starting position of palletizing task
float startPos[6] = {600, 0, 300, 180, 0, 180};
float vel[2] = {50, 50};
float acc[2] = {60, 60};
// Drfl.movej(startPos, vel, acc);

// Simulate repetitive stacking motion (pseudo-code)
for (int i = 0; i < 3; ++i) {
    float placePos[6] = {600, i * 100.0f, 150, 180, 0, 180};
    // Drfl.movel(placePos, vel, acc);
    std::this_thread::sleep_for(std::chrono::seconds(1));
}

// Disable palletizing mode after stacking operation
Drfl.set_palletizing_mode(0);

This example enables palletizing mode to stabilize wrist motion around singular angles (0° or 180°) during repetitive stacking tasks. After completing the operation, palletizing mode is disabled to return the robot to normal motion behavior.