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 hold2run is not received within a 200 ms timeout, the robot automatically returns to the HOLD state and the motion is safely stopped.

Definition
DRFLEx.h within class CDRFLEx, public section (line 573)

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

Parameter
None

Return

Value

Type

Description

True

bool

Success — hold2run motion continued successfully.

Example

CDRFLEx drfl;
float target_pos[6] = {0, 0, 90, 0, 90, 0};
float vel = 30.0;
float acc = 60.0;
drfl.movej_h2r(target_pos, vel, acc); // Initiate hold2run motion
while (!drfl.get_current_pos() == target_pos) {
     drfl._hold2run();
     time.sleep(0.1);
    // 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.