MC_MoveAdditive (FB)¶
FUNCTION_BLOCK MC_MoveAdditive
This function block causes a controlled motion that adds the specified distance to the last specified target position.
The axis is thereby in the discrete_motion mode. The current target position can result from a preceding motion of MC_MoveAdditive that was aborted.
If the function block runs in the continuous_motion mode, the specified distance is added to the current position during the processing time.
- Example
- Use of
MC_MoveAdditiveThe illustration shows how theFirstinstance of the typeMC_MoveAbsoluteand theSecondinstance of the typeMC_MoveAdditiveare combined. The axis is in the discrete_motion mode.In the left-hand part of the illustrationSecondis called afterFirst. IfFirsthas reached the specified position of 6000, the velocity is 0 and theDoneis set,Secondwill cause the axis to move to the position 10000.In the right-hand part of the illustration, the execution is started bySecondwhileFirstis still operating. The motion ofFirstis interrupted and aborted by theTestsignal which is transmitted during the constant velocity phase ofFirst. The distance 4000 is added to the last commended position of 60000. ThenSecondmoves the axis to the resulting position 10000.
Sequence of two complete actions: Sequential execution of two complete motions
Second motion interrupts first motion: Motion of “Second” interrupts the motion of “First”
- InOut:
Scope
Name
Type
Initial
Comment
Inout
AxisReference to axis
Input
ExecuteBOOLFALSE
TRUE: Starts executionDistanceLREAL0
Relative distance for the motion in technical unit [u]
VelocityLREAL0
Maximum velocity
Is always positive in [u/s].
Does not need to be achieved.
AccelerationLREAL0
Acceleration
Is always positive in [u/s²].
Increasing motor energy
DecelerationLREAL0
Deceleration
Is always positive in [u/s²].
Decreasing motor energy
JerkLREAL0
Is always positive in [u/s³].
Output
DoneBOOLFALSE
TRUE: Distance has been achieved.BusyBOOLFALSE
TRUE: Function block is in operation.CommandAbortedBOOLFALSE
TRUE: Execution has been interrupted by another function block instance operating on the axis.ErrorBOOLFALSE
TRUE: Error has occurred.ErrorIDSMC_ERROR0
Error identification