You're reading the documentation for an older, but still supported version (1.33.4).
For information on the latest version, please have a look at 1.33.5.

hold2run

hold2run is a heartbeat-based run-permission command that allows a previously initiated hold2run motion to continue only while the command is periodically received. If no hold2run arrives for more than 500 ms, the controller quick-stops the motion (homing and user-home moves are stopped). Send hold2run well within 500 ms.

Definition
DRFLEx.h within class CDRFLEx, public section

bool hold2run() { return _hold2run(_rbtCtrl); };

Parameter
None

Return

Value

Type

Description

True

bool

Success — hold2run motion continued successfully.

Example

float target_pos[6] = {0, 0, 90, 0, 90, 0};
float vel[6] = {30.0, 30.0, 30.0, 30.0, 30.0, 30.0};
float acc[6] = {60.0, 60.0, 60.0, 60.0, 60.0, 60.0};
drfl.movej_h2r(target_pos, vel, acc); // Initiate hold2run motion
bool target_reached = false; // set by your own position check
while (!target_reached) {
     drfl.hold2run();
     std::this_thread::sleep_for(std::chrono::milliseconds(100));
    // Additional processing can be done here
}

hold2run does not generate a new motion trajectory. Instead, it acts as a heartbeat signal that grants run permission to the controller. The controller continues executing the existing hold2run motion only while valid heartbeats are received within the configured timeout window.