FB_CollisionGroupUpdate (Method)

Overview

Type:

Method

Available as of:

V1.0.0.0

This chapter provides information on:

Task

Performs an update of the collision group.

Description

This method is used to update the internal representation of the group of objects. In order to successfully call this method, the objects which are part of the group must be configured (for example xConfigured = TRUE for each object).

Interface

The function block implements the interface IF_CollisionGroup.

Access: PUBLIC

Output

Data type

Description

q_xError

BOOL

The output is set to TRUE if an error has been detected during the execution.

q_etResult

ET_Result

POU-specific output on the diagnostic; q_xError = FALSE -> Status message; q_xError = TRUE -> Diagnostic message.

q_sResultMsg

STRING(80)

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

Diagnostic Messages

q_xError

q_etResult

Enumeration value

Description

FALSE

Ok

0

Success

TRUE

CollisionGroupEmpty

22

A collision group is empty.

TRUE

CollisionObjectNotConfigured

12

The object is not configured.

TRUE

CollisionGroupUpdateNotPossible

37

It is not possible to update a collision group.

OK

Enumeration name:

Ok

Enumeration value:

0

Description:

Success

CollisionGroupEmpty

Enumeration name:

CollisionGroupEmpty

Enumeration value:

22

Description:

A collision group is empty.

Issue

Cause

Solution

Could not perform an update

There are no collision objects in the group, meaning that udiNumberOfCollisionObjects = 0

Add at least one collision object to the group before calling the Update method.

CollisionObjectNotConfigured

Enumeration name:

CollisionObjectNotConfigured

Enumeration value:

12

Description:

The object is not configured.

Issue

Cause

Solution

Could not perform an update

At least one of the collision objects is not configured, meaning that for that collision object the property xConfigured is FALSE.

Make sure that xConfigured = TRUE for all the collision objects in the group before calling the Update method.

CollisionGroupUpdateNotPossible

Enumeration name:

CollisionGroupUpdateNotPossible

Enumeration value:

37

Description:

It is not possible to update a collision group.

Issue

Cause

Solution

Could not perform an update

At least one of the configured interfaces in the property raifCollisionObjects has been set to zero.

To resolve this error, make a successful call of the Reset method and then add again the required objects calling AddCollisionObject.