Skip to main content
Skip table of contents

Wait Until Displacement

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

Fieldbus Interface 

PMC_WaitUntilDisp 

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]

dispMode

USINT

How to define boundary location.

  • 0: using X only

  • 1: using Y only

  • 2: a straight line of arbitrary orientation

dispType

UINT

When to trigger wait release.

  • 0: Greater than boundary value

  • 1: Less than boundary value

  • 2: rising above boundary value

  • 3: falling below boundary value

Threshold

REAL

Used to Specify boundary location.

  • dispMode = 0: X = threshold

  • dispMode = 1: Y = threshold

  • dispMode = 2: AX + BY = threshold

posXFactor

REAL

In dispMode = 2, the A value of AX + BY = threshold

posYFactor

REAL

In dispMode = 2, the B value of AX + BY = threshold

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

DISPLACEMENT (4): use displacement/position as trigger source

triggerParameters

struct

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

  • triggerxbotID: ID of XBot to monitor

  • displacementTriggerMode: enum with X_ONLY (0), Y_ONLY (1), or AX_BY (2) = AX + BY options

  • displacementTriggerType: enum with GREATER_THAN (0), LESS_THAN (1), POSITIVE_CROSS (2) = rising above threshold, NEGATIVE_CROSS(3) = falling below threshold

  • displacementThresholdMeters: threshold to compare the monitored value to, meters

  • lineParamAx: the A in AX+BY displacementTriggerMode

  • lineParamBy: the B in AX+BY displacementTriggerMode

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 has reached a certain position

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 Displacement Trigger before executing its motion command:  XBot 2’s Wait Until command will monitor XBot 1’s position. Once XBot 1’s position reaches a certain threshold,  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.