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.

get_tool_digital_output

This function checks the current output signal state of a tool-side digital contact point mounted on the robot arm (end-effector side), through the robot controller.
It allows users to verify whether a tool digital output pin is currently ON or OFF.

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

bool get_tool_digital_output(GPIO_TOOL_DIGITAL_INDEX eGpioIndex)
{ return _get_tool_digital_output(_rbtCtrl, eGpioIndex); };

Parameter

Parameter Name

Data Type

Default Value

Description

eGpioIndex

GPIO_TOOL_DIGITAL_INDEX

Index of the tool-side digital output pin to read

Return

Value

Description

0

OFF — Digital output signal is currently low (0 V)

1

ON — Digital output signal is currently high (24 V)

Example

#include "DRFLEx.h"
using namespace DRAFramework;

int main() {
    CDRFLEx drfl;

    // Read current status of tool-side digital output #1
    bool bOutputState = drfl.get_tool_digital_output(GPIO_TOOL_DIGITAL_INDEX_1);

    if (bOutputState) {
        printf("Tool output #1 is ON.\\n");
    } else {
        printf("Tool output #1 is OFF.\\n");
    }
}

This example shows how to monitor the ON/OFF state of a digital output pin mounted on the robot tool flange — typically used for actuating grippers, valves, or other peripheral devices controlled via tool-side I/O.