Machine & Workpiece Coordinate Variables
The variables in this section are used to access positional data. Setting positional data through system variables is supported, but not recommended.
The linear axes of the machine are identified using the letters XYZ for primary linear axes, UVW for secondary linear axes and E for an extending (or quill) axis. The rotary axes of the machine are identified using the letters ABC for the main rotary axes, N for the first attachable rotary and D for second attachable rotary. The ABC letters can optionally be followed by H or T to distinguish a rotary head axis from a rotary table axis. Prior to V23, the XYZ axes of the SIDE head of a merging lathe were identified as UVW axes; starting with V23 either XYZ or UVW axes variables can be used.
A leading L character indicates the last position of the axis.
The $[L]{ABC[TH]}J and $[L]{ND}J Variables
$AJ $ATJ $AHJ $BJ $BTJ $BHJ $CJ $CTJ $CHJ $LAJ $LATJ $LAHJ $LBJ $LBTJ $LBHJ $LCJ $LCTJ $LCHJ $NJ $DJ $LNJ $LDJ
Joint A, B and C-axis rotation Type: Numeric, Read-only |
|
Joint nutating N and D-axis rotation Type: Numeric, Read-only |
These variables contain machine A, B, C and nutating N and D rotary axis joint positions, which include the effects of tool length and fixture (workpiece) compensation, as calculated by Virtual Machine.
$AJ, $BJ and $CJ refer to the current A, B and C rotary head or table axis joint positions. $NJ refers to the primary nutating axis joint position. $DJ refers to the dual nutating axis joint position.
If your machine has two axes of the same type (for example, B-axis head and table axes), specific names exist; $ATJ, $BTJ and $CTJ refer to table axes and $AHJ, $BHJ and $CHJ refer to the corresponding head axes.
Variables beginning with an L are last axis position variables. For example, $LCHJ contains the last C-axis head joint value.
The $[L]{ABC[TH]}M and $[L]{ND}M Variables
$AM $ATM $AHM $BM $BTM $BHM $CM $CTM $CHM $LAM $LATM $LAHM $LBM $LBTM $LBHM $LCM $LCTM $LCHM $NM $DM $LNM $LDM
Machine A, B and C-axis rotation Type: Numeric, Read-only |
|
Machine nutating N and D-axis rotation Type: Numeric, Read-only |
These variables contain machine A, B, C and nutating N and D rotary axis positions. These are similar to the joint axes listed above, but do not include the effects of tool length compensation or fixture (workpiece) compensation. $AM, $BM and $CM refer to the current A, B and C rotary head or table axis positions. $NM refers to the primary nutating axis position. $DM refers to the dual nutating axis position.
If your machine has two axes of the same type (for example, B-axis head and table axes), specific names exist; $ATM, $BTM and $CTM refer to table axes and $AHM, $BHM and $CHM refer to the corresponding head axes. In subsequent sections, table specific names may be identified by the fact that they are composed of the generic variable name plus the letter T. Similarly, head axis specific names contain the letter H.
Variables beginning with an L are last axis position variables. For example, $LCHM contains the last C-axis head value.
If the machine does not have the named axis, the corresponding value will be zero.
The $[L]{XYZUVWE}J Variables
Joint X, Y, Z, U, V, W and E-axis positions Type: Numeric, Read-only |
$XJ $YJ $ZJ $UJ $VJ $WJ $EJ $LXJ $LYJ $LZJ $LUJ $LVJ $LWJ $LEJ
These variables contain the machine X, Y, Z, U, V, W and Extending (E) axis joint positions, which include the effects of tool length and fixture (workpiece) compensation, as calculated by Virtual Machine. $XJ, $YJ, $ZJ, $UJ, $VJ, $WJ and $EJ represent current axes positions.
Variables beginning with an L are last axes joint position variables. For example, $LUJ contains the last U-axis (or secondary X-axis) joint value.
If the machine does not have the named axis, the corresponding value will be zero (0).
The $[L]{XYZUVWE}M Variables
Machine X, Y, Z, U, V, W and E-axis positions Type: Numeric, Read-only |
$XM $YM $ZM $UM $VM $WM $EM $LXM $LYM $LZM $LUM $LVM $LWM $LEM
These variables contain the machine X, Y, Z, U, V, W and Extending (E) axis positions. These are similar to the joint axes listed above, but do not include the effects of tool length compensation or fixture (workpiece) compensation. $XM, $YM, $ZM, $UM, $VM, $WM and $EM represent current axes positions.
Variables beginning with an L are last axes position variables. For example, $LUM contains the last U-axis (or secondary X-axis) value.
If the machine does not have one of the named axes, the corresponding value will be zero (0).
The $[L]{XYZ}W and $[L]{IJK}W Variables
$XW $YW $ZW $LXW $LYW $LZW $IW $JW $KW $LIW $LJW $LKW
LCS X, Y and Z-axis coordinates Type: Numeric, Read/Write |
|
LCS I, J and K-vector coordinates Type: Numeric, Read-only |
These variables contain the local coordinate system (LCS) X, Y and Z coordinates of the tool tip and the I, J and K cosine vectors of the tool axis when a local coordinate frame is active. If a local coordinate frame is not active then these variables return machine coordinates instead (e.g., $ZW returns $ZM when a local coordinate frame is not active). $XW, $YW, $ZW, $IW, $JW and $KW refer to the current position. Names beginning with L are last coordinate values.