The method AttachTargetToEntity attaches a target to the specified entity.
The inputs i_udiTargetId and i_udiEntityId are valid.
If i_udiEntityId refers to a conveyor, then also provide a valid reference position i_lrReferencePosition.
The cartesian pose (position and orientation) corresponds to the orientation convention ZYX. If the orientation convention is different, the event is not set.
The entity ID is set to 1 if a target is to be attached to a global pose. For this, you can use the enumeration element Global in the enumeration ET_SystemEntity in the SchneiderElectricRobotics Toolbox library.
The event is written to the internal events buffer and to the OPC UA structure by the method Update.
Input |
Data type |
Description |
---|---|---|
i_udiTargetId |
UDINT |
ID of the target to be attached to the entity. The ID must be unique. |
i_udiEntityId |
UDINT |
ID of the entity to which the target is to be attached. |
i_lrReferencePosition |
LREAL |
The reference position on the entity where the target is to be attached to.
NOTE: This input is only needed when i_udiParentId is a conveyor.
|
i_stCartesianPose |
The cartesian pose of the target. |
|
i_etColorId |
The color configured for the target. |
Output |
Data type |
Description |
---|---|---|
q_xError |
BOOL |
Indicates TRUE if an error has been detected. For details, refer to q_etResult and q_sResultMsg. |
q_etResult |
Provides diagnostic and status information as a numeric value. |
|
q_sResultMsg |
STRING [80] |
Provides additional diagnostic and status information as a text message. |
q_xError |
q_etResult |
Description |
---|---|---|
FALSE |
Ok |
The event was set. |
TRUE |
TargetIdInvalid |
The event was not set. |
TRUE |
EntityIdInvalid |
The event was not set. |
TRUE |
OrientationConventionInvalid |
The event was not set. |
TRUE |
ColorIdInvalid |
The event was not set. |
FALSE |
BufferFull |
The event was set. |
FALSE |
ReferencePositionIgnored |
The event was set. |