MC_SetCartTrans
This function block activates a Cartesian coordinate transformation. This type of transformation can offset and rotate the PCS relative to the MCS. The offset and rotation specifications are activated relative to the origin of the currently active PCS.
Block diagram
FB parameters
VAR_IN_OUT | ||
Variable name | Data type | Description |
AxesGroup | AXES_GROUP_REF | Axis group reference |
VAR_INPUT | ||
Variable name | Data type | Description |
Execute | BOOL | A rising edge activates a transformation. |
TransX | LREAL | X coordinate of the offset vector (Vx) |
TransY | LREAL | Y coordinate of the offset vector (Vy) |
TransZ | LREAL | Z coordinate of the offset vector (Vz) |
RotAngle1 | LREAL | Rotation angle about X axis (j1). |
RotAngle2 | LREAL | Rotation angle about Y axis (j2). |
RotAngle3 | LREAL | Rotation angle about Z axis (j3) |
ExecutionMode | UDINT | mcQueued = 2 |
VAR_OUTPUT | ||
Variable name | Data type | Description |
Done | BOOL | The Cartesian coordinate transformation was activated. |
Busy | BOOL | TRUE indicates that the function block is executing a job. |
Active | BOOL | TRUE indicates that the function block sent the job to the MC. |
CommandAborted | BOOL | TRUE indicates that the currently active command sent by the FB was aborted by another command for the axis group. |
Error | BOOL | TRUE indicates that an error occurred. |
ErrorID | WORD | Error code |
JobID | UDINT | Ordinal number of the last job sent by the FB. |
When the rotations j1, j2 and j3 are defined, they must be rotated in the sequence listed below and in the mathematical positive direction of rotation:
- Rotation at angle j3 about the Z axis
- Rotation at angle j2 about the Y axis (y´)
- Rotation at angle j1 about the X axis (e.g. x´´)