FB_CollisionEntityUpdate (Method)

Overview

Type:

Method

Available as of:

V1.0.0.0

This chapter provides information on:

Task

Performs an update of the collision entity.

Description

This method is used to update the internal representation of the collision entity.

On a call of this method, there are two possible behaviors that depend from the value of the input i_xUpdateGroups.

  • If on a call of the Update method, i_xUpdateGroups = FALSE, all the groups added to the entity must already be successfully updated (xUpdated = TRUE for each group).

  • If on a call of the Update method, i_xUpdateGroups = TRUE, the Update method of each group added to the entity is called and must be successful; otherwise, the Update call generates an error.

Interface

The function block implements the interface IF_CollisionEntity.

Access: PUBLIC

Input

Data type

Description

i_xUpdateGroups

BOOL

If set to TRUE, on a call of this method the Update method of each stored group is also called.

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

CollisionEntityEmpty

35

The collision entity is empty.

TRUE

CollisionGroupUpdateNotPossible

37

It is not possible to update a collision group.

TRUE

CollisionGroupNotUpdated

21

A collision group is not updated.

TRUE

CollisionEntityUpdateNotPossible

51

The provided collision query interface is referring to an invalid type.

OK

Enumeration name:

Ok

Enumeration value:

0

Description:

Success

CollisionEntityEmpty

Enumeration name:

CollisionEntityEmpty

Enumeration value:

35

Description:

The collision entity is empty.

Issue

Cause

Solution

Could not perform an update

There are no collision groups in the entity, meaning that udiNumberOfCollisionGroups = 0

Add at least one collision group to the entity 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

The input i_xUpdateGroups is set to TRUE, but it is not possible to perform a successful update on at least one of the groups.

Make sure that xConfigured = TRUE for all the collision objects in all the stored groups before calling the Update method with i_xUpdateGroups = TRUE.

CollisionGroupNotUpdated

Enumeration name:

CollisionGroupNotUpdated

Enumeration value:

21

Description:

A collision group is not updated.

Issue

Cause

Solution

Could not perform an update

The input i_xUpdateGroups is set to FALSE but not all the stored groups have xUpdated = TRUE.

Make sure that xUpdated = TRUE for all the stored groups before calling the Update method with i_xUpdateGroups = FALSE.

CollisionEntityUpdateNotPossible

Enumeration name:

CollisionEntityUpdateNotPossible

Enumeration value:

52

Description:

The provided collision query interface is referring to an invalid type.

Issue

Cause

Solution

Could not perform an update

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

To fix this error, make a successful call of the Reset method and then add again the required groups calling AddCollisionGroup.