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.
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 |
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. |
q_xError |
q_etResult |
Enumeration value |
Description |
---|---|---|---|
FALSE |
0 |
Success |
|
TRUE |
35 |
The collision entity is empty. |
|
TRUE |
37 |
It is not possible to update a collision group. |
|
TRUE |
21 |
A collision group is not updated. |
|
TRUE |
51 |
The provided collision query interface is referring to an invalid type. |
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. |
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. |
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. |
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. |