MC_GearIn (FB)
FUNCTION_BLOCK MC_GearIn
This function block commands a ratio between the velocity of the slave and master axis.
The slave ramps up to the ratio of the master velocity and locks in when this is reached. Any lost distance during synchronization is not caught up.
The gearing ratio can be changed while MC_GearIn is running by a rising edge at “Execute” or by using a consecutive MC_GearIn command without the necessity to MC_GearOut first
InGear is set the first time the ratio is reached.
After being InGear, a position locking is performed.
- Example of GearIn timing diagram
- InOut:
Scope
Name
Type
Comment
Input
ExecuteBOOLStarts the function block at rising edge
RatioNumeratorDINTGear ratio numerator, new value is updated only with rising edge of Execute input
RatioDenominatorDINTGear ratio denominator, new value is updated only with rising edge of Execute input
MasterValueSourceDecide to use the actual position or reference position of master axis
AccelerationLREAL[u/s°°2] Value of the acceleration (increasing energy of the motor), just applied until “insync” is reached. Range: >0. If value = 0, Acceleration will be equal to parameter paraMaxAccelerationAppl.If value > 0 and <= 1,Acceleration will be limited to 1.
DecelerationLREAL[u/s°°2] Value of the deceleration (decreasing energy of the motor), just applied until “insync” is reached. Range: >0. If value = 0, Deceleration will be equal to parameter paraMaxDecelerationAppl.If value > 0 and <= 1,Deceleration will be limited to 1.
BufferModeNot supported, default mcABORTING used
Output
InGearBOOLCommanded gearing completed
BusyBOOLThe function block is not finished
ActiveBOOLIndicates that the function block has control on the axis
CommandAbortedBOOLCommand is aborted by another command from other PLCopen function block
ErrorBOOLSignals that error has occurred within function block
ErrorIDError identification. For error details refer to Enumeration ERROR_ID
Inout
MasterReference to master axis
SlaveReference to slave axis