FB_CobotController - General Information

Overview

Type:

Function block

Available as of:

V1.0.1.0

Inherits from:

-

Implements:

IF_CobotController

This chapter provides information on:

Task

The function block is used to interact with a Lexium Cobot.

Description

The function block provides several methods and properties to establish a TCP connection to a Lexium Cobot controller and to interact with it by sending commands or getting feedback data. The function block is implemented as a TCP client. An individual instance of the function block must be instantiated for each Lexium Cobot controller to establish a TCP connection.

Interface

Input Data type Description

i_xEnable

BOOL

A rising edge FALSE –> TRUE activates and initializes the function block.

A falling edge TRUE –> FALSE deactivates the function block.

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

i_xErrorQuit

BOOL

When an error is detected and reported at the diagnostic outputs of the function block, the machine enters an error state.

A rising edge at this input resets the error and the diagnostic outputs.

The function block resumes its working state.

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_xActive

BOOL

TRUE: The POU is active and must continue its processing until FALSE.

FALSE: The POU is inactive.

q_xReady

BOOL

TRUE: The POU is ready to operate and can accept user commands.

FALSE: The function block is not ready to accept user commands.

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_etDiagExt

Enumeration value

Description

FALSE

Disabled

1

The function block is disabled.

FALSE

WaitUntilDisabled

3

The function block is being disabled.

FALSE

Working

2

The function block is enabled and working.

TRUE

AddressInUse

15

The requested address is already in use.

TRUE

CaseLabelUnknown

21

The case label is undefined.

TRUE

CertificateInvalid

20

The certificate is invalid.

TRUE

CertificateNotFound

17

The certificate was not found.

TRUE

CertificateVerificationFailed

18

The verification of the certificate was not successful.

TRUE

CommandCallFailed

23

The command call was not successful.

TRUE

CommandResponseCorrupt

13

The command response is invalid.

TRUE

CommandResponseError

14

The command response reports a detected error.

TRUE

ConnectionClosedByPeer

37

The connection is closed by peer.

TRUE

ConnectionRefused

16

The connection was refused.

TRUE

InitTlsContextFailed

19

The initialization of the TLS context was not successful.

TRUE

RespondedCommandInvalid

12

The responded command is invalid.

TRUE

ResultUnknown

8

The result is undefined.

TRUE

Timeout

9

A timeout occurred.

AddressInUse

Enumeration name:

AddressInUse

Enumeration value:

15

Description:

The requested address is already in use.

Issue

Cause

Solution

The function block cannot execute operations.

The IP address / port combination is not unique.

Verify that the combination of IP address and port is unique and not used by another client.

For FB_CobotController, port 10001 (refer to Gc_uiPortCobotController) is used to establish a connection to a Lexium Cobot controller.

CaseLabelUnknown

Enumeration name:

CaseLabelUnknown

Enumeration value:

21

Description:

The case label is undefined.

Issue

Cause

Solution

The function block cannot execute operations.

A case instruction did not cover the requested value.

Contact your Schneider Electric representative.

CertificateInvalid

Enumeration name:

CertificateInvalid

Enumeration value:

20

Description:

The certificate is invalid.

Issue

Cause

Solution

The function block cannot execute operations.

The certificate located in the folder Trusted Certificates in the Security Screen does not have a private key.

For further information, refer to the Security Screen (Machine Expert > V2.0 > Software > Programming > Menu Commands Online Help > Security Screen ) in the Online Help.

Contact your Schneider Electric representative.

CertificateNotFound

Enumeration name:

CertificateNotFound

Enumeration value:

17

Description:

The certificate was not found.

Issue

Cause

Solution

The function block cannot execute operations.

The certificate could not be found in the certificate store of the controller.

The LXM_Cobot certificate must be in the folder Trusted Certificates in the Security Screen.

For further information, refer to the Security Screen (Machine Expert > V2.0 > Software > Programming > Menu Commands Online Help > Security Screen ) in the Online Help.

CertificateVerificationFailed

Enumeration name:

CertificateVerificationFailed

Enumeration value:

18

Description:

The verification of the certificate was not successful.

Issue

Cause

Solution

The function block cannot execute operations.

The certificate is not trusted or is not valid.

The LXM_Cobot certificate must be in the folder Trusted Certificates in the Security Screen.

For further information, refer to the Security Screen (Machine Expert > V2.0 > Software > Programming > Menu Commands Online Help > Security Screen ) in the Online Help.

CommandCallFailed

Enumeration name:

CommandCallFailed

Enumeration value:

23

Description:

The command call was not successful.

Issue

Cause

Solution

The function block cannot execute operations.

The Lexium Cobot controller reported that the command call was not successful.

Contact your Schneider Electric representative.

CommandResponseCorrupt

Enumeration name:

CommandResponseCorrupt

Enumeration value:

13

Description:

The command response is invalid.

Issue

Cause

Solution

The function block cannot execute operations.

The command response of Lexium Cobot controller is invalid and cannot be interpreted.

Contact your Schneider Electric representative.

CommandResponseError

Enumeration name:

CommandResponseError

Enumeration value:

14

Description:

The command response reports a detected error.

Issue

Cause

Solution

The function block cannot execute operations.

The command sent to the Lexium Cobot Controller was not successfully executed. The command response contains an error.

Refer to q_sResultMsg for further information about the reported error.

Refer to FB_CobotControllerFeedback.rstData.stLogData for further information about the reported error.

ConnectionRefused

Enumeration name:

ConnectionRefused

Enumeration value:

16

Description:

The connection was refused.

Issue

Cause

Solution

The function block cannot execute operations.

The attempt to establish a connection is unsuccessful because the Lexium Cobot controller denied it.

Verify that only one connection to a Lexium Cobot controller is established.

ConnectionClosedByPeer

Enumeration name:

ConnectionClosedByPeer

Enumeration value:

37

Description:

The connection is closed by peer.

Issue

Cause

Solution

The function block cannot execute operations.

The established TCP connection was closed by the Lexium Cobot controller.

Re-establish the connection to the Lexium Cobot controller using the method Connect() or ConnectTLS().

Disabled

Enumeration name:

Disabled

Enumeration value:

1

Description:

The function block is disabled.

Issue

Cause

Solution

The function block cannot execute operations.

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.

InitTlsContextFailed

Enumeration name:

InitTlsContextFailed

Enumeration value:

19

Description:

The initialization of the TLS context was not successful.

Issue

Cause

Solution

The function block cannot execute operations.

Internal error was detected while initializing the TLS context.

A maximum of 10 TLS connections can be established at the same time.

Ensure that no more than 10 TCP connections using TLS are established.

RespondedCommandInvalid

Enumeration name:

RespondedCommandInvalid

Enumeration value:

12

Description:

The responded command is invalid.

Issue

Cause

Solution

The function block cannot execute operations.

The responded command of the Lexium Cobot controller does not correspond to the last command sent.

Contact your Schneider Electric representative.

ResultUnknown

Enumeration name:

ResultUnknown

Enumeration value:

8

Description:

The result is undefined.

Issue

Cause

Solution

The function block cannot execute operations.

A case instruction did not cover the reported result.

Contact your Schneider Electric representative.

Timeout

Enumeration name:

Timeout

Enumeration value:

9

Description:

A timeout occurred.

Issue

Cause

Solution

The function block cannot execute operations.

A timeout occurred while establishing a connection with the Lexium Cobot controller.

Re-establish the connection to the Lexium Cobot controller by calling the method Connect() or ConnectTLS().

A timeout occurred while retrieving the response to an assigned command from the Lexium Cobot controller. The established connection to the Lexium Cobot controller was disconnected.

Re-establish the connection to the Lexium Cobot controller by calling the method Connect() or ConnectTLS().

WaitUntilDisabled

Enumeration name:

WaitUntilDisabled

Enumeration value:

3

Description:

The function block is being disabled.

The input i_xEnable of the function block was set from TRUE to FALSE.

The function block will be disabled.

Working

Enumeration name:

Working

Enumeration value:

2

Description:

The function block is enabled and working.

Methods

Name Description

CalcForwardKinematics

Calculates the cartesian pose corresponding to user defined positions of the robot joints.

CalcInverseKinematics

Calculates the positions of the robot joints corresponding to user defined cartesian pose.

ClearFault

Clears a detected collision error/warning of the Lexium Cobot.

Connect

Establishes a connection to the TCP server of a Lexium Cobot controller without using TLS encryption.

ConnectTLS

Establishes a connection to the TCP server of a Lexium Cobot controller using TLS encryption.

DisableRobot

Disables the Lexium Cobot arm.

Disconnect

Disconnects an established connection from the TCP server of a Lexium Cobot controller.

EnableRobot

Enables the Lexium Cobot arm.

GetControlSource

Retrieves the source controlling the Lexium Cobot.

GetCoordinateSystems

Retrieves the user defined coordinate systems of the Lexium Cobot.

GetLoadedProgramName

Retrieves the name of the loaded program from the Lexium Cobot controller.

GetPayload

Retrieves the configured parameters of the payload which is mounted to the Lexium Cobot arm.

GetSystemVariables

Retrieves the user defined system variables of the Lexium Cobot controller.

GetTCPs

Retrieves the user defined TCPs of the Lexium Cobot.

JogStart

Starts a jog movement of the Lexium Cobot.

LoadProgram

Loads a program by name on the Lexium Cobot controller.

SetSystemVariable

Sets a user defined system variable of the Lexium Cobot controller.

MoveC

Executes a circular movement for the Lexium Cobot.

MoveJ

Executes a joint movement for the Lexium Cobot.

MoveL

Executes a linear movement for the Lexium Cobot.

MoveTCP

Executes a joint movement for the Lexium Cobot based on a target pose.

PauseProgram

Pauses the running program on the Lexium Cobot controller.

PowerOff

Switches the power off the Lexium Cobot arm.

PowerOn

Switches the power on the Lexium Cobot arm.

RegisterLoggerPoint

Registers the function block to the Application Logger.

ResumeProgram

Resumes to the loaded program on the Lexium Cobotcontroller.

SelectCoordinateSystem

Selects the coordinate system in which the Lexium Cobot must move.

SelectTCP

Selects the TCP with which the Lexium Cobot must move.

SetAnalogOutput

Sets an analog output of the Lexium Cobot cabinet.

SetDigitalOutput

Sets a digital output of the Lexium Cobot.

SetSpeedOverride

Sets the speed override of the Lexium Cobot controller.

SetPayload

Sets the parameters of the payload which is mounted to the Lexium Cobot arm.

StartProgram

Starts the loaded program on the Lexium Cobot controller.

StopRobotMovement

Stops the execution and aborts the running program on the Lexium Cobot controller or stops robot movements executed by move commands.

Properties

Name Data type Accessing Description

etConnectionState

ET_ConnectionState

Read

Specifies the connection state of the function block to the Lexium Cobot controller.

xCommandAcknowledged

BOOL

Read

TRUE: The sent command is acknowledged by the Lexium Cobot controller as successful.

xCommandFailed

BOOL

Read

TRUE: The sent command is acknowledged by the Lexium Cobot controller as unsuccessful.

xTLSUsed

BOOL

Read

TRUE: A connection to the TCP server of a Lexium Cobot controller using TLS encryption is established.