Skip to main content
Skip table of contents

Motion Buffer Control

This command manipulates the XBot Motion Buffer, the available options are:

  • Block: The motion buffer corresponding to the specified XBot will be blocked from sending next command in the buffer to the XBot

  • Unblock: The motion buffer will be unblocked and the XBot will resume executing commands in its motion buffer

  • Clear: The buffer of commands for the specified XBot will be cleared 

Fieldbus Interface

PMC_MotionBufferCtrl

Inputs

Name

Data Type

Description

Execute

BOOL

Execution of the function block begins on a rising edge of this input.

Level

USINT

0: Block Buffer; 1: Release Buffer; 2: Clear Buffer

XbotID

USINT

ID of the XBot. 0 = All XBots. Real XBot IDs [1,78]. Virtual XBot IDs [100,127]

PM_Controller

PMControllerType

Data structure that specifies which PMC to connect to. There should be only 1 instance of this variable for each connected PMC.

Outputs

Name

Data Type

Description

Done

BOOL

Execution successful. Function block is finished. (Note: Done will not become TRUE if Execute is already FALSE) 

Busy

BOOL

Function block is active and must continue to be called.

Aborted

BOOL

Command aborted by another command.

Error

BOOL

If there is an error in processing the command, then Error = TRUE, otherwise, FALSE.

ErrorID

UINT

0x0: All OK. Otherwise, please see PMC Reply Codes.

Ethernet Interface 

MotionBufferReturn MotionBufferControl(int xbotID, MOTIONBUFFEROPTIONS bufferOption)

Parameters

Name

Type

Description

xbotID

int

ID of the XBot. Real XBot IDs [1,78]. Virtual XBot IDs [100,127]

bufferOption

enum

BLOCKBUFFER (0) = block buffer; RELEASEBUFFER (1) = release buffer; CLEARBUFFER (2) = clear buffer

Returns

Name

Type

Description

MotionBufferReturn.PmcRtn

PMCRTN enum

ALLOK (0): Command Accepted. Otherwise, please see Ethernet Reply Codes.

MotionBufferReturn. MotionBufferStatus

struct

  • bool isBufferBlocked: true if buffer is blocked, false if buffer is not blocked

  • int bufferedMotionCount: number of motions stored in the specified XBot’s motion buffer

  • int firstBufferedMotionCmdLabel: command label of the first command in the specified XBot’s motion buffer

  • int lastBufferedMotionCmdLabel: command label of the last command in the specified XBot’s motion buffer

  • int xbotID: ID of the XBot that this return is describing

Conditions

Operating Conditions

Preconditions

XBot is in the Idle state, Obstacle Detected state, Motion state, Stopped state, Hold Position state, or Waiting state.

Postconditions

The XBot’s buffer will be blocked immediately. Since the buffer only contains future commands for the XBot, the current command executed by the XBot will finish executing as normal.

Description

This command manipulates the XBot Motion Buffer, the available options are:

  • Block: The motion buffer corresponding to the specified XBot will be blocked from sending next command in the buffer to the XBot

  • Unblock: The motion buffer will be unblocked and the XBot will resume executing commands in its motion buffer

  • Clear: The buffer of commands for the specified XBot will be cleared 

The maximum number of commands stored in the buffer is 1000, which can be upgraded to a higher number. Contact us if larger buffers are needed.

If a Stop Xbot command is received by PMC for a particular XBot, the XBot will be stopped and all buffer commands will be cleared.

If an XBot enters the Obstacle Detected state, its motion buffer will not be cleared. Once the obstacle is cleared, the XBot will resume completing the pending commands in its motion buffer.

If an XBot enters the Stopped state, typically due to it being unable to resume its previous motion, its motion buffer will be cleared. This usually occurs when an XBot enters an obstacle during Trajectory or Stream motions.

Each XBot motion command buffer status can be checked from the command label in XBot status, indicating which motion command the XBot is running.

 

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.