IF_RobotMotion - SetTool (Method)

Overview

Type:

Method

Available as of:

V3.6.6.0

This chapter provides information on:

Task

Selecting a configured tool.

Description

With the method SetTool a configured tool can be selected as TCP for the robot motion.

In case the input i_udiToolId is set to zero an active tool is deactivated, so the commands and the feedback refers to the robot flange.

The tool can only be switched when no move commands are active or loaded for the robot.

Interface

Input

Data type

Description

i_udiToolId

UDINT

Tool to be activated. i_udiToolId = 0 disables the tool and switches back to the robot flange.

Further valid values are the IDs of the configured tools, see property raudiConfiguredToolIds.

Output

Data type

Description

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value not equal to GD.ET_Diag.Ok corresponds to a diagnostic message.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = ET_Diag.Ok -> Status message

q_etDiag <> ET_Diag.Ok -> Diagnostic message

q_sMsg

STRING[80]

Event-triggered message that gives additional information on the diagnostic state.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

ExecutionAborted

CommandsActive

79

There are active commands.

ExecutionAborted

InMotion

52

The robot is in motion.

InputParameterInvalid

ToolNotConfigured

260

The selected tool is not configured.

CommandsActive

Enumeration name:

CommandsActive

Enumeration value:

79

Description:

There are active commands.

Issue

Cause

Solution

The tool was not set.

There are active move commands for the robot.

Ensure that no move commands are active for the robot when the method SetTool(…) is called.

InMotion

Enumeration name:

InMotion

Enumeration value:

52

Description:

The robot is in motion.

Issue

Cause

Solution

The tool was not set.

The robot is in motion.

Ensure that the robot is not in motion when the method SetTool(…) is called.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The motion parameter has been set successfully.

ToolNotConfigured

Enumeration name:

ToolNotConfigured

Enumeration value:

260

Description:

The selected tool is not configured.

Issue

Cause

Solution

The tool was not set.

The tool selected with the input i_udiToolId is not configured.

Ensure that the tool with the tool ID is configured successfully.