MC_ChangeDynParam
MC_ChangeDynParam changes the acceleration and deceleration parameters for an active positioning process.
Requirements
The current dynamics can be modified if the set value generator type of the axis is set to "7 phases (optimized)" (global axis parameters). Otherwise only very limited modification is possible.
Restrictions
In some situations no new dynamic parameters can be accepted for safety reasons, and the current dynamic parameters are retained:
- If the target position would be exceeded (error 16#427F)
- If a stop with more rigorous dynamics had already been initiated (error 16#425D)
- If the axis is in a acceleration phase, and the velocity would exceed the parameterised travel speed due to weaker dynamic parameters (acceleration would reduce too slowly) (error 16#423A)
- If the axis is in a braking phase, and the direction of travel would reverse due to weaker dynamic parameters (negative acceleration cannot be reduced in time) (error 16#4289)
- Special case: internal optimisation is not possible (error 16#427E)
VAR_INPUT
VAR_INPUT
Execute : BOOL;
Acceleration : LREAL;
Deceleration : LREAL;
Jerk : LREAL;
END_VAR
Execute : The command is executed with rising edge. The block can be re-triggered during the movement.
Acceleration : Acceleration (=0). If the value is 0, the standard acceleration from the axis configuration in the System Manager is used.
Deceleration : Deceleration (=0). If the value is 0, the standard acceleration from the axis configuration in the System Manager is used.
Jerk : Jerk (=0). If the value is 0, the standard jerk from the axis configuration in the System Manager is used.
Note: The Jerk can be changed if the set point generator type "7 Phases (optimized)" is configured. (from TwinCAT 2.10 Build 1251 or TwinCAT 2.9 Build 1032)
VAR_OUTPUT
VAR_OUTPUT
Done : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR
Done : Becomes TRUE when the axis is at its destination and all monitoring activities (such as destination position monitoring) are positive.
Error: Becomes TRUE, as soon as an error occurs.
ErrorID : Supplies the error number when the Error output is set.
VAR_IN_OUT
VAR_IN_OUT
Axis : NCTOPLC_AXLESTRUCT;
END_VAR
Axis : Axis structure.
Requirements
Development environment | Target system type | PLC libraries to be linked |
---|---|---|
TwinCAT v2.8 Build | PC (i386) | TcMC.Lib |