MC_PositionCorrectionLimiter
The function block MC_PositionCorrectionLimiter writes a correction value (PositionCorrectionValue) at the actual position of an axis. Depending on the correction mode the data are fed either directly or filtered to the axis.
![]() | To use this function block successfully, the "Position Correction" parameter must be activated in the System Manager. The function block should only be executed on enabled axes. |
Inputs
VAR_INPUT
Enable : BOOL;
PositionCorrectionValue : LREAL;
CorrectionMode : E_AxisPositionCorrectionMode;
Acceleration : LREAL;
CorrectionLength : LREAL;
END_VAR
Name | Type | Description |
---|---|---|
Enable | BOOL | Activates continuous writing of the correction value "PositionCorrectionValue". It must be TRUE as long as new correction values are to be accepted. |
PositionCorrectionValue | LREAL | Correction value to be added to the actual value of the axis. |
CorrectionMode | Depending on this mode, the correction value "PositionCorrectionValue" is written either directly or filtered. | |
Acceleration | LREAL | Depending on the "CorrectionMode" the maximum acceleration to reach the new correction value is specified here. In the case of PositionCorrectionMode_Fast this value has a direct effect on the position delta by PLC-tick. Maximum permissible correction value Position delta = acceleration * (PLC cycle time)2. If acceleration is parameterized as 0.0, the position correction is not limited. |
CorrectionLength | LREAL | Becomes active when the "CorrectionMode" matches PositionCorrectionMode_FullLength. A change in the "PositonCorrectionValue" is distributed over this correction length. |
Inputs/outputs
VAR_IN_OUT
Axis : AXIS_REF;
END_VAR
Name | Type | Description |
---|---|---|
Axis | Axis data structure that unambiguously addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state. |
Outputs
VAR_OUTPUT
Busy : BOOL;
Error : BOOL;
ErrorID : UDINT;
Limiting : BOOL;
END_VAR
Name | Type | Description |
---|---|---|
Busy | BOOL | TRUE as soon as the function block is active. FALSE when it returns to its original state. |
Error | BOOL | TRUE, if an error occurs. |
ErrorID | UDINT | If the error output is set, this parameter supplies the error number. |
Limiting | BOOL | TRUE if the required correction value "PositionCorrectionValue" is not yet fully accepted. |
Requirements
Development environment | Target system type | PLC libraries to include |
---|---|---|
TwinCAT v3.0.0 | PC or CX (x86 or x64) | Tc2_MC2 |