set_tool_digital_output (Manual Mode)

This section explains how to use set_tool_digital_output during Manual (Teach) operations. This function controls the digital output pins located on the robot’s tool flange (I/O interface). It is typically used to toggle external devices such as grippers, vision triggers, or sensors directly from the robot’s end-effector during teaching or testing.

Typical usage

  • Manually open or close a gripper connected to the tool I/O port.

  • Send a trigger pulse to a camera, welding torch, or dispenser module during manual alignment.

  • Control peripheral actuators while verifying system wiring and timing.

  • Test end-effector responses during manual commissioning or calibration.

Note

  • Tool I/O voltage level depends on hardware configuration (typically 24 V DC).

Example: Toggle gripper output pin from Teach Pendant

// Preconditions:
// - Connection established (open_connection)
// - Manual (Teach) mode active
// - Gripper or end-effector connected to tool I/O

printf("[Tool I/O] Opening gripper...\n");
drfl.set_tool_digital_output(GPIO_TOOL_DIGITAL_1, true);  // Gripper open signal
this_thread::sleep_for(chrono::seconds(2));

printf("[Tool I/O] Closing gripper...\n");
drfl.set_tool_digital_output(GPIO_TOOL_DIGITAL_1, false); // Gripper close signal
this_thread::sleep_for(chrono::seconds(1));

printf("[Tool I/O] Gripper output test completed.\n");

Tips

  • Useful for end-effector testing and verifying signal polarity during commissioning.

  • Combine with get_tool_digital_output to confirm output state after command.

  • Use short pulse intervals for camera or sensor triggers (e.g., 100–200 ms).

  • Always verify wiring and I/O protection before energizing tool outputs in real hardware setups.