set_tool_digital_output_level
This function sets the output voltage level for digital output signals
on the robot tool flange (end-effector side).
By adjusting the voltage level, users can match the output signal to the requirements
of the connected peripheral device (e.g., grippers, solenoid valves, sensors).
This function is available only on the new flange version (v2).
Definition
DRFLEx.h within class CDRFLEx, public section (line 854)
bool set_tool_digital_output_level(int nLv)
{ return _set_tool_digital_output_level(_rbtCtrl, nLv); };
Parameter
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
nLv |
int |
12 |
The voltage level to be output to the tool digital output port |
Return
Value |
Description |
|---|---|
0 |
Error — Failed to set the tool output voltage level. |
1 |
Success — Voltage level successfully updated. |
Example
#include "DRFLEx.h"
using namespace DRAFramework;
int main() {
CDRFLEx drfl;
// Set tool flange digital output voltage level to 24V
bool result = drfl.set_tool_digital_output_level(24);
if (result)
printf("Tool digital output voltage set to 24V.\n");
else
printf("Failed to set digital output voltage.\n");
}
This example demonstrates how to configure the output power level
for the robot’s tool-side digital output pins.
Adjusting the voltage allows compatibility with different external actuators
or electronic modules that require specific operating voltages.