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

jog (Manual Mode)

This is a function for executing the control of jog movement for each axis of the robot in the robot controller.

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

bool jog(JOG_AXIS eJogAxis, MOVE_REFERENCE eMoveReference, float fVelocity) {
    return _jog(_rbtCtrl, eJogAxis, eMoveReference, fVelocity);
};

Parameter

Parameter Name

Data Type

Default Value

Description

eJogAxis

JOG_AXIS

Refer to the Definition of Constant and Enumeration Type.

eMoveReference

MOVE_REFERENCE

Refer to the Definition of Constant and Enumeration Type.

fVelocity

float

Jog Velocity
+: Positive Direction
0: Stop
-: Negative Direction

Return

Value

Description

0

Error

1

Success

Example

#include "DRFLEx.h"
#include <thread>
#include <chrono>
using namespace DRAFramework;

int main() {
    CDRFLEx drfl;
    // (Assume connection / mode / servo are already prepared in the sample environment)

    // 1) Coarse approach along BASE +X at 20% speed (hold-to-run style)
    drfl.jog(JOG_AXIS_TASK_X, MOVE_REFERENCE_BASE, 20.0f);
    std::this_thread::sleep_for(std::chrono::milliseconds(800)); // keep jogging for 0.8s
    drfl.jog(JOG_AXIS_TASK_X, MOVE_REFERENCE_BASE, 0.0f);        // stop jogging

    // 2) Fine approach along TOOL -Z at 5% speed
    drfl.jog(JOG_AXIS_TASK_Z, MOVE_REFERENCE_TOOL, -5.0f);
    std::this_thread::sleep_for(std::chrono::milliseconds(600)); // creep closer
    drfl.jog(JOG_AXIS_TASK_Z, MOVE_REFERENCE_TOOL, 0.0f);        // stop jogging

    // 3) Safety back-off along BASE -X at 10% speed, then stop
    drfl.jog(JOG_AXIS_TASK_X, MOVE_REFERENCE_BASE, -10.0f);
    std::this_thread::sleep_for(std::chrono::milliseconds(500));
    drfl.jog(JOG_AXIS_TASK_X, MOVE_REFERENCE_BASE, 0.0f);

    return 0;
}

This example demonstrates a teach workflow: a coarse approach in the BASE frame, a fine approach in the TOOL frame with a small negative Z jog (tool toward the work), and a safety back-off. Each jog is sustained for a short duration and then stopped by sending velocity 0.