MC_GearIn (FB)¶
FUNCTION_BLOCK MC_GearIn
The function block couples the slave axis to the master axis, and applies a certain velocity ratio between master and slave.
When MC_GearIn is started, the slave axis is ramped up to the
given ratio of the master velocity.
Coupling takes place once this is achieved. The distance travelled during
the coupling is not compensated for.
While MC_GearIn is in operation, the velocity ratio can be changed
by sequential MC_GearIn commands. To do this, no preceding call of
MC_GearOut is necessary.
InGear is set as soon as the desired velocity ratio is reached.
Once InGear is set, the type of coupling depends on the current
control mode. In the standard case, i.e. in the position
control mode, the coupling is performed with the position values.
For example, with a ratio of 1:2, the slave is moved by exactly half
the distance of the master.
If velocity control mode is used, then the coupling is performed
with the velocity values. For example, with a ratio of 1:2, the slave
will move with half the master velocity in each cycle.
Ratio Reached: Velocity ratio has been reached.
- InOut:
Scope
Name
Type
Initial
Comment
Inout
MasterReference to master axis.
Masterneeds not to be stationary.SlaveReference to slave axis
Input
ExecuteBOOLRising edge: Starts the execution of the function block.
RatioNumeratorDINT1
Numerator of the quotient for the desired velocity ratio
RatioDenominatorUDINT1
Denominator of the quotient for the desired velocity ratio
AccelerationLREALMaximum acceleration for ramping up in [u/s²]
DecelerationLREALMaximum deceleration for ramping up in [u/s²]
JerkLREALMaximum jerk for ramping up in [u/s³]
BufferModeMC_BUFFER_MODEDefines the chronological sequence of the FB relative to the previous block. Only the BufferModes
Aborting,BufferedandBlendingPreviousare supported.BlendingPreviousmeans that the configured velocity (including the direction) of the previous movement is used as the blending velocity, even if this movement has the opposite direction. If the function block is Busy, then only BufferMode=Aborting is allowed.Output
InGearBOOLTRUE: Coupling has taken place. The slave moves with the given velocity ratio of the master.BusyBOOLTRUE: Function block is in operation.ActiveBOOLIndicates that the FB has control on the axis
CommandAbortedBOOLFALSE
TRUE: Execution has been interrupted by another function block instance operating on the axis.ErrorBOOLTRUE: Error has occurred.ErrorIDSMC_ERRORError identification