MCV_InitPosition
The “MCV_InitPosition” FB initialises the command position of the interpolator of an SAI axis with the current command position of the position controller of this SAI axis. This FB is always used to compensate for position differences between of the interpolator and the position controller caused by commanding an instance of the FB MCV_AddCmdValues (see [MCP-CTRL] or by a axis coupling.
Blockdiagramm
Parameters of the FB
VAR_IN_OUT | ||
Variable name | Data type | Description |
axis | AXIS_REF | Axis reference |
VAR_INPUT | ||
Variable name | Data type | Description |
Execute | BOOL | TRUE, starts the initialisation of the command position of the interpolator with the command position of the position controller of the SAI axis. |
VAR_OUTPUT | ||
Variable name | Data type | Description |
Done | BOOL | TRUE, the command position of the interpolator of the SAI axis is initialised with the command position of the position controller. |
Error | BOOL | Is TRUE when an error occurs in the FB. |
ErrorID | WORD | Error code. |
Behaviour of the FB
- If an axis was shifted in the position controller after control unit start, it is not recognised if it is positioned later in the single axis interpolator. By commanding an MCV_InitPosition function block before positioning, the user can ensure that the specified absolute target position refers to the original coordinate system which was not shifted. In other words, this FB acts as if a possible shift is cleared (cf. NC command #CHANNEL INIT[CMDPOS] of the NC channel).
- The command is also updated by commanding MCV_SetFollowUp after tracking mode is deactivated.
Notice
Several CNC cycles are required to synchronise the position, i.e. this FB should not be used before each positioning for time-critical actions without good reason.