del_tcp

This function deletes a previously registered TCP (Tool Center Point) entry from the robot controller. Only TCPs that were manually added (via add_tcp) can be deleted. Once removed, the TCP will no longer be available for selection until it is re-registered.

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

bool del_tcp(string strSymbol) {
    return _del_tcp(_rbtCtrl, strSymbol.c_str());
};

Parameter

Parameter Name

Data Type

Default Value

Description

strSymbol

string

The name of the TCP to delete.
Must correspond to an existing TCP previously registered in the controller.

Return

Value

Description

0

Error — failed to delete TCP

1

Success — TCP deletion completed successfully

Example

#include "DRFLEx.h"
using namespace DRAFramework;

int main() {
    CDRFLEx drfl;

    float fTCP[6] = {10.f, 10.f, 10.f, 0.f, 0.f, 0.f};

    // (1) Register a new TCP
    drfl.add_tcp("tcp#1", fTCP);

    // (2) Set it as the active TCP
    drfl.set_tcp("tcp#1");

    // (3) Delete the registered TCP
    drfl.del_tcp("tcp#1");
}

This example demonstrates how to register a new TCP, activate it, and then remove it from the controller’s registry when it is no longer needed.