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.
For information on the latest version, please have a look at 1.33.5.
set_digital_output (Manual Mode)
This section explains how to use set_digital_output during Manual (Teach) operations to manually turn ON or OFF digital output channels on the control box when using API version DRCF_VERSION == 2.
Typical usage
Control external devices such as grippers, relays, valves, or indicators.
Verify output signal wiring and polarity during installation.
Perform manual I/O testing before enabling Auto (Program) mode.
Note
With DRCF_VERSION 3, call the same function; see set_digital_output.
Example: Control digital outputs on control box
// Preconditions:
// - Connection established (open_connection)
// - Manual (Teach) mode active
// - External devices connected to control box output terminals
// 1) Turn ON DOUT_1 for 1 second
drfl.set_digital_output(GPIO_CTRLBOX_DIGITAL_INDEX_1, true);
printf("[DOUT_1] = ON\n");
std::this_thread::sleep_for(std::chrono::seconds(1));
// 2) Turn OFF DOUT_1
drfl.set_digital_output(GPIO_CTRLBOX_DIGITAL_INDEX_1, false);
printf("[DOUT_1] = OFF\n");
Tips
Verify output mode (Sink/Source) matches the external device type (NPN/PNP).
If output doesn’t change, check the external 24V supply and safety interlock state.
Combine with get_digital_output to confirm output states.