Buffer Modes

Some of the FBs have an input called BufferMode. With this input, the FB can either work in a Non-buffered mode (default behavior) or in a Buffered mode. The difference between those modes is when they start their action:

  • A command in a non-buffered mode acts immediately, even if this interrupts another motion
  • A command in a buffered mode waits untill the current FB sets its Done output (or InPosition, or InVelocity,..).

There are six buffer modes that can be specified at the BufferMode input of the function blocks.

Buffer mode Value Short name Description
MC_BUFFER_MODE_ABORT 0 Abort A move that specifies Abort aborts the active move, removes the next move from the queue, and immediately becomes the active move and begins executing
MC_BUFFER_MODE_BUFFERED 1 Buffer One of three events can happen with a move that specifies Buffer:
  • Case 1. If there is no active move, this move immediately becomes the active move and begin executing.
  • Case 2. If there is an active move but no next move queued, this move is queued as the next move, and begins executing when the active move has completed and decelerated to zero velocity.
  • Case 3. If there is an active move and a queued next move, this move does not execute but returns the error “queue full” at the ErrorID output.
MC_BUFFER_MODE_BLENDING_PREVIOUS 2 Blend to Previous A move specifying Blend-to-Active behaves the same as Buffer in cases 1 and 3. In case 2, this move is queued as the next move. The active move stays at its programmed velocity to its endpoint. When the active move reaches its endpoint, this move becomes active and begins to accelerate or decelerate to its programmed velocity
MC_BUFFER_MODE_BLENDING_NEXT 3 Blend to Next A move specifying Blend-to-Next behaves the same as Buffer in cases 1 and 3. In case 2, this move is queued as the next move. When the expected time is reached, the active move begins to accelerate or decelerate so that it reaches this move's programmed velocity at the time the active move reaches its endpoint
MC_BUFFER_MODE_BLENDING_LOW 4 Blend to Low A move specifying Blend-to-Low behaves like Blend-to-Active if the active move's velocity is lower than this move's velocity. It behaves like Blend-to-Next if this move's velocity is lower than the active move's velocity
MC_BUFFER_MODE_BLENDING_HIGH 5 Blend to High A move specifying Blend-to-High behaves like Blend-to-Active if the active move's velocity is higher than this move's velocity. It behaves like Blend-to-Next if this move's velocity is higher than the active move's velocity.

  • The MC_BUFFER_MODE_BLENDING_NEXT and MC_BUFFER_MODE_BLENDING_HIGH buffer modes may increase the acceleration to meet the target position at the specified velocity. The acceleration will be automatically re-calculated to reach the target position at the specified velocity if the specified acceleration is too small to reach the target velocity within the specified distance.

    For example, suppose the following absolute position moves are commanded:
    Move #1:
    Position = 90, Velocity = 180, Accel = 360
    Move #2 (with Blending High or Blending Next)
    Position = 360, Velocity = 360, Accel = 360

    To reach velocity = 360 within a distance of 90, the acceleration must be 720. The function block will automatically calculate and apply an acceleration of 720 to reach the target position at the specified velocity:

Concept Link IconSee Also