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 ofMC_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 - Axis- Reference to axis - Input - Execute- BOOL- TRUE: Starts execution.- Distance- LREAL- Relative distance for the motion in technical unit [u]. - Velocity- LREAL- Maximum velocity in techincal units per second [u/s]. - Is always positive. 
- Is not necessarily reached. 
 - Acceleration- LREAL- Acceleration in [u/s²]. - Is always positive. 
- Increasing motor energy 
 - Deceleration- LREAL- Deceleration in [u/s²]. - Is always positive. 
- Decreasing motor energy 
 - Jerk- LREAL- Maximum magnitude of jerk in [u/s³] - BufferMode- MC_BUFFER_MODE- Defines the chronological sequence of the FB relative to the previous block. If the function block is Busy, then only BufferMode=Aborting is allowed. - Output - Done- BOOL- TRUE: Distance has been achieved.- Busy- BOOL- TRUE: Function block is in operation.- Active- BOOL- Indicates that the FB has control on the axis - CommandAborted- BOOL- TRUE: Execution has been interrupted by another function block instance operating on the axis.- Error- BOOL- TRUE: Error has occurred.- ErrorID- SMC_ERROR- Error identification