MC_MoveRelative (FB)¶
FUNCTION_BLOCK MC_MoveRelative
This function block commands a controlled motion of a specified distance. The motion ends in standstill (unless blended to a followup movement).
- Example
- Use of
MC_MoveRelativeThe illustration shows how two instances (FirstandSecond) of typeMC_MoveRelativeare combined.In the left-hand part of the illustration,Secondis called afterFirst. IfFirsthas reached the specified position distance 6000, the velocity is 0 andFirst.Doneis set. Then theSecondinstance will cause the axis to move to 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 actual position 3250. ThenSecondmoves the axis to the resulting position 7250.
- InOut:
Scope
Name
Type
Comment
Inout
AxisReference to axis
Input
ExecuteBOOLTRUE: Starts execution.DistanceLREALRelative distance for the motion in technical unit [u].
VelocityLREALMaximum velocity in techincal units per second [u/s].
Is always positive.
Is not necessarily reached.
AccelerationLREALAcceleration in [u/s²].
Is always positive.
Increasing motor energy
DecelerationLREALDeceleration in [u/s²].
Is always positive.
Decreasing motor energy
JerkLREALMaximum magnitude of jerk in [u/s³]
BufferModeMC_BUFFER_MODEDefines the chronological sequence of the FB relative to the previous block. If the function block is Busy, then only BufferMode=Aborting is allowed.
Output
DoneBOOLTRUE: Distance has been achieved.BusyBOOLTRUE: Function block is in operation.ActiveBOOLIndicates that the FB has control on the axis
CommandAbortedBOOLTRUE: Execution has been interrupted by another function block instance operating on the axis.ErrorBOOLTRUE: Error has occurred.ErrorIDSMC_ERRORError identification