beautypg.com

Data type: axis_ref, Data type declaration, Variable declaration example – Yaskawa MotionWorks IEC Toolboxes User Manual

Page 397: Code example, Axis_ref

background image

PLCopen Toolbox: DataTypes

MotionWorks IEC61131-3 Toolboxes: 2013-09-13

384

Data Type: AXIS_REF

The AXIS_REF data type identifies an axis and thus provides the interface to the hardware or virtual axes.
AXIS_REF is used as VAR_IN_OUT in all Motion Control Function Blocks described in this Online help. It is
represented as an input and an output connected by a horizontal line in the graphical representation of a
function block.

The value of AxisNum is determined by the logical axis number assigned in the Hardware Configuration. See
the Configuration tab for each axis.

Data Type Declaration

TYPE

AXIS_REF:STRUCT

AxisNum:UINT;

END_STRUCT;

END_TYPE

Variable Declaration Example

Code Example

AxisX.Number:=UINT#0;

MCMoveAbsoluteX(Axis:=AxisX, Execute:=FALSE);

AxisX:=MCMoveAbsolutX.Axis;

AxisY.Number:=UINT#0;

MCMoveAbsoluteY(Axis:=AxisY, Execute:=FALSE);

AxisX:=MCMoveAbsolutY.Axis;