Skip to main content
Skip table of contents

XY Motion

The linear motion command can be used to move the XBot towards the target position in a few ways:

  • Direct (straight line)

  • Move along the X-direction first, then move along the Y-direction

  • Move along the Y-direction first, then move along the X-direction

Fieldbus Interface

PMC_XYMotion

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]

Mode

USINT

0: Absolute Position. 1: Relative Positioning

Type_

USINT

0: Direct path to target. 1: X first, then Y. 2: Y first, then X

PosX

REAL

  • When Mode=0: Absolute X Coordinates (m)

  • When Mode=1: Relative X Coordinates (m)

PosY

REAL

  • When Mode=0: Absolute Y Coordinates (m)

  • When Mode=1: Relative Y Coordinates (m)

EndVel

REAL

Ending Speed (m/s), default = 0 m/s

MaxVel

REAL

Maximum Speed (m/s), default = 1.0 m/s

MaxAcc

REAL

Maximum Acceleration (m/s2), default = 10.0 m/s2

Radius

REAL

Turn Radius (m), if Type_ is 1 or 2

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.

TravelTime

REAL

Traveling time (s)

Ethernet Interface 

MotionRtn LinearMotionSI(ushort cmdLabel, int xbotID, POSITIONMODE positionMode, LINEARPATHTYPE pathType, double targetXmeters, double targetYmeters, double finalSpeedMetersPs, double maxSpeedMetersPs, double maxAccelerationMetersPs2, double cornerRadius = 0) 

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]

positionMode

enum

ABSOLUTE (0) = absolute positioning, RELATIVE(1) = relative positioning

pathType

enum

DIRECT (0) = direct to target; XTHENY (1) = X first, then Y; YTHENX (2) = Y first, then X

targetXmeters

double

Target X position, or relative increment in X, in meters

targetYmeters

double

Target Y position, or relative increment in Y, in meters

finalSpeedMetersPs

double

Final Speed  (m/s)

maxSpeedMetersPs

double

Max Speed (m/s)

maxAccelerationMetersPs2

double

Max Acceleration (m/s^2)

cornerRadius

double

Corner radius for XTHENY or YTHENX motion, in meters

Returns

Name

Type

Description

MotionRtn.PmcRtn

PMCRTN enum

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

MotionRtn.TravelTimeSecs

float

Time required to complete this command, in seconds

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 Motion state. Otherwise, the XBot state remains unchanged, but the command will be added to the XBot's motion buffer.

Description

The linear motion command can be used to move the XBot towards the target position in a few ways:

  • Direct (straight line)

  • Move along the X-direction first, then move along the Y-direction

  • Move along the Y-direction first, then move along the X-direction

Only the X- and Y-positions (also called the long axis) are controlled by this command. The Z-, Rx-, Ry-, and Rz-positions are maintained during this motion command. 

Using this command in X-then-Y or Y-then-X mode will send two separate linear commands with the same command label to the XBot. Direct mode only counts as one linear command. 

The target position can be specified either in absolute coordinates or relative coordinates. Relative coordinates are relative to the reference position of the XBot when the command begins execution. The maximum speed and acceleration must be specified. The input maximum speed and acceleration will be automatically adjusted if they are below or above the configured system limit settings.

Ending speed:

The desired ending speed must also be specified:

  • Ending speed = 0 means that the XBot will stop at the end target position

  • Ending speed > 0 can be used to connect multiple motion commands seamlessly (see below)

  • If the ending speed is unachievable within the distance available between the starting and end positions, the PMC will automatically limit the ending speed to an achievable value

If the ending speed is non-zero but no motion command is available to be run by the XBot when it is done executing the initial linear motion command, the XBot will:

  • Begin decelerating to a complete stop after reaching the target position

  • Backtrack to the target position in the shortest time possible after stopping completely

  • Therefore, it may appear as though the XBot has overshot its target position. If the target position is located close to the flyway boundary and would cause the overshoot to exceed the flyway boundary, then the command will be rejected

Blended Motion:

When a radius greater than 10 um is specified and the path type is either X-then-Y or Y-then-X, an arc motion will be automatically inserted between the two linear motion commands.

If a radius smaller than the minimum radius needed to maintain the specified maximum speed is inputted, the PMC will automatically lower the speed to a value within system limits. Blended Motion cannot be currently added to a Motion Macro.

The radius value is ignored if the path type is Direct.

Changelog

PMC v117.11.6 - Added Radius, which enables blended motion when path type is X-then-Y or Y-then-X

JavaScript errors detected

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

If this problem persists, please contact our support.