Skip to main content
Skip table of contents

Wait Until Command Label

Monitor the specified XBot's execution command label. When the monitoring condition is met,  the wait until command will finish.

Fieldbus Interface

PMC_WaitUntilCmdLb

Inputs

Name

Data Type

Description

Execute

BOOL

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

cmdLB

UINT

Any 2 byte Command Label, user defined.

XbotID

USINT

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

TriggerXID

USINT

ID of the XBot that will be monitored/used to trigger release of the wait. Real XBot IDs [1,78]. Virtual XBot IDs [100,127]

TriggerType

USINT

When to trigger release.

  • 0: Start of command execution

  • 1: End of command execution

  • 2: Any point during command execution

TriggerCmdLb

UINT

Command label to monitor that will release the wait

LabelType

USINT

  • 0: Regular Motion Cmd Label

  • 1: Run Macro Cmd Label

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

Ack

BOOL

Command has been accepted by the PMC when Ack = TRUE.

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 

PMCRTN WaitUntil(ushort cmdLabel, int xbotID, TRIGGERSOURCE triggerSource, WaitUntilTriggerParams triggerParameters)

Parameters

Name

Type

Description

cmdLabel

ushort

Any 2 byte Command Label, user defined.

xbotID

int

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

triggerSource

enum

CMD_LABEL (3): use command label as trigger source

triggerParameters

struct

When triggerSource is set as CMD_LABEL, the following parameters are required:

  • triggerxbotID: ID of XBot to monitor

  • triggerCmdLabel: command label to monitor

  • CmdLabelTriggerType: enum with CMD_START (0), CMD_FINISH (1), or CMD_EXECUTING (2) options

Returns

Name

Type

Description

PMCRTN

PMCRTN enum

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

Conditions

Operating Conditions

Preconditions

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

Postconditions

If the XBot is ready to immediately begin executing the command, then the XBot will enter the Waiting state. Otherwise, the XBot state remains unchanged, but the command will be added to the XBot's motion buffer.

Description

Wait Until commands ensure an XBot does not execute additional commands until certain configurable conditions are met, this command waits until the specified XBot is executing a command with the specified command label.

Consider the following trajectory:

XBot 2 must wait for XBot 1 to complete its motion before XBot 2 can move to its target destination. 

XBot 2 can execute a Wait Until command using a Command Label Trigger before executing its motion command: XBot 2’s Wait Until command will monitor XBot 1’s current command that has the specified command label. When the XBot 1’s monitored command finishes, the Wait Until command is completed, allowing XBot 2 to execute its motion command at the earliest possible time

 

JavaScript errors detected

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

If this problem persists, please contact our support.