FB_CobotController - CalcInverseKinematics (Method)

Overview

Type:

Method

Available as of:

V1.0.1.0

This chapter provides information on:

Task

The function block is used to calculate the positions of the robot joints corresponding to a user defined cartesian pose related to a defined arm configuration.

Description

This method is used to calculate the user-defined positions of the robot joints, transferred at the input i_stCartesianPose to the corresponding positions of the robot joints. The corresponding positions of the robot joints are determined by the provided joint positions on the input i_stPositions. The result is written into the structure variable transferred at the input i_rstPosition.

The sent command is acknowledged by the Lexium Cobot control either as successful or as unsuccessful.

  • A successful command is reported by the property xCommandAcknowledged.

  • An unsuccessful command is reported by the property xCommandFailed. For detailed information verify the diagnostic outputs of the function block and the log data of FB_CobotControllerFeedback.rstData.stLogData.

Interface

Input Data type Description

i_stPosition

ST_Joints

Positions of the robot joints as a reference.

i_stCartesianPose

REFERENCE TO GEM.ST_CartesianPose

User defined Cartesian pose.

i_rstPosition

REFERENCE TO ST_Joints

Specifies the structure variable in which the positions of the robot joints corresponding to the user defined cartesian pose is written.

Output Data type Description

q_xError

BOOL

Value is TRUE if an error was detected. For details, refer to q_etResult and q_sResultMsg.

q_etResult

ET_Result

Provides diagnostic and status information as a numeric value.

If q_xError = FALSE, q_etResult provides status information. If q_xError = TRUE, q_etResult provides diagnostic/error information.

q_sResultMsg

STRING[80]

Provides additional diagnostic and status information as a text value.

Diagnostic Messages

q_xError

q_etResult

Enumeration value

Description

FALSE

Ok

0

The method was called successfully.

TRUE

CommandNotAcknowledged

7

The command is not acknowledged.

TRUE

Disabled

1

The function block is disabled.

TRUE

NotConnected

5

A connection to a Lexium Cobot controller is not established.

TRUE

NotReady

4

The function block is not ready to perform commands.

CommandNotAcknowledged

Enumeration name:

CommandNotAcknowledged

Enumeration value:

7

Description:

The command is not acknowledged.

Issue

Cause

Solution

The method was not called successfully.

The previous triggered command is not acknowledged yet.

The property xCommandAcknowledged reports the value FALSE.

Ensure that the property xCommandAcknowledged reports the value TRUE before calling a new command.

Disabled

Enumeration name:

Disabled

Enumeration value:

1

Description:

The function block is disabled.

Issue

Cause

Solution

The method was not called successfully.

The function block is disabled.

A disabled function block does not execute any actions and all outputs are set to the default value.

Ensure that the function block is enabled.

Enable the function block by setting the input i_xEnable to TRUE. The function block will report TRUE at its outputs q_xActive and q_xReady after the enable routine is successfully finished.

NotConnected

Enumeration name:

NotConnected

Enumeration value:

5

Description:

A connection to a Lexium Cobot controller is not established.

Issue

Cause

Solution

The method was not called successfully.

A connection to a Lexium Cobot controller is not established.

The property etConnectionState does not report the value ET_ConnectionState.Connected.

Ensure that a connection to a Lexium Cobot controller is established.

To establish a connection to a Lexium Cobot controller call the method Connect() or ConnectTLS().

NotReady

Enumeration name:

NotReady

Enumeration value:

4

Description:

The function block is not ready to perform commands.

Issue

Cause

Solution

The method was not called successfully.

The function block reports FALSE at the output q_xReady because a detected error is reported.

In case a sent command was acknowledged by the Lexium Cobot controller with a detected error, the property xCommandFailed reports the value TRUE in addition.

Verify the diagnostic outputs of the function block and solve the root cause of the detected error.

A rising edge at the input i_xErrorQuit will reset the detected error.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

The method was called successfully.