FB_CobotController - SetPayload (Method)

Overview

Type:

Method

Available as of:

V1.0.1.0

This chapter provides information on:

Task

The function block is used to set the parameters of the payload which is mounted to the Lexium Cobot arm.

Description

This method is used to set the parameters of the payload which is mounted to the Lexium Cobot arm. The parameters to be set consist of the mass of the payload and its center of mass.

Pre-Conditions to successfully execute this command:

  • The control source of the Lexium Cobot must be Remote. For further information, refer to method GetControlSource(Method).

  • The Lexium Cobot arm must be enabled. FB_CobotControllerFeedback.rstData.xRobotEnabled reports the value TRUE.

  • No jog movement must be active. FB_CobotControllerFeedback.rstData.xInPosition reports the value TRUE.

  • No program must be running. FB_CobotControllerFeedback.rstData.xInPosition reports the value TRUE.

Result of this command:

  • The parameters of the payload which is mounted to the Lexium Cobot arm are set. Refer to GetControlSource(Method) to retrieve the configured payload.

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_stData

ST_Payload

Specifies the payload which is mounted to the Lexium Cobot arm.

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

MassRange

38

The mass is out of range.

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.

MassRange

Enumeration name:

MassRange

Enumeration value:

38

Description:

The mass is out of range.

Issue

Cause

Solution

The method was not called successfully.

The value transferred at the input i_stData.lrMass is not within a valid range.

At the input i_stData.lrMass, a value greater than or equal to 0.0 must be transferred.

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.