MC_GearOutExt
From TwinCAT 2.11 onwards, the slave axis is moved without acceleration when it is uncoupled and continues to move at the constant speed that is set. There is no positioning around the master travel distance converted with the coupling factor, but a behavior as after a MC_MoveVelocity is established.
MC_GearOutExt is an extended universal decoupling command. With this command the slave axis is feed with a sequence command directly after decoupling. Therefore, a smooth transition from a coupled movement to a discrete movement is possible.
Remark: The sequence command can only be executed if the slave axis is decoupled in the movement. In the standstill, no sequence command is possible.
If the Set Point Generator Type is set to '7 Phases (optimized)', the slave axis will reduce its acceleration to zero after it is being decoupled and it will then continue moving endless at constant velocity. The decoupled axis will not be positioned to any target position.
The behavior is comparable to a move commanded by MC_MoveVelocity.
With TwinCAT 2.10 the set point generator type is selectable.
From TwinCAT 2.11 the setting is fixed to '7 Phases (optimized)'.
If a project is upgraded from TwinCAT 2.10 to TwinCAT 2.11, the behavior will be as described here. After updating an existing application to TwinCAT 2.11, it might be necessary to adapt the PLC program.
VAR_INPUT
VAR_INPUT
Execute : BOOL;
Mode : E_DecoupleMode;
Position : LREAL;
Velocity : LREAL;
Acceleration : LREAL;
Deceleration : LREAL;
Jerk : LREAL;
END_VAR
Execute : The command is executed with rising edge.
Mode: describes the sequence command, that is executed directly after the decoupling of the slave axis.
TYPE E_DecoupleMode :
(
MC_DECOUPLEMODE_STOP, (* 0 Stop after decoupling *)
MC_DECOUPLEMODE_ORIENTEDSTOP, (* 1 Oriented stop after decoupling *)
MC_DECOUPLEMODE_ENDLESS, (* 2 endless motion at actual velocity after decoupling *)
MC_DECOUPLEMODE_ENDLESS_NEWVELO, (* 3 endless motion at parameterized velocity after decoupling *)
MC_DECOUPLEMODE_NEWPOS, (* 4 stop at parameterized position after decoupling *)
MC_DECOUPLEMODE_NEWPOSANDVELO, (* 5 move at parameterized velocity after decoupling and stop at parameterized position *)
MC_DECOUPLEMODE_INSTANTANEOUSSTOP (* 6 instantaneous stop (jump to velocity zero) *)
);
END_TYPE
Position : Absolute target position to be used for positioning. If the mode OrientedStop is used, the Position is a modulo position.
Velocity : Maximum travel velocity (>0).
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 deceleration 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.
VAR_OUTPUT
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR
Done : Becomes TRUE, if decoupling was successful. And if according to the following command the target position or the constant velocity was reached.
Busy : Becomes TRUE, as soon as the block is active. Busy becomes TRUE with a rising edge at Execute and becomes FALSE again after the block finished or aborted its operation. A rising edge at Execute will then be accepted.
CommandAborted : Becomes TRUE, if the command could not be fully executed. The reason may be an error, a stop or a superimposed travel command.
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
Slave : NCTOPLC_AXLESTRUCT;
END_VAR
Slave : Axis structure of the slave.
Requirements
Development environment | Target system type | PLC libraries to be linked |
---|---|---|
TwinCAT v2.10 Build 1313 | PC (i386) | TcMC.Lib |