Checking the states of axis compensation in the NC program
V.A variables
The following V.A. variables can be used to check from the NC program whether a compensation programmable via the COMP command is initialised or already active for a specific axis and the value of the compensation..
Notice
Read access to the variables with the identifier LFlush causes flushing of the NC channel.
For example, flushing the NC channel can result in the error ID 20651 if tool radius compensation (G41/G42) is active.
Check for initialisation
CROSS_COMP_INIT.X | Is cross compensation initialised for the axis? If yes, then 1 | Boolean | 0 , 1 | LFlush |
PLANE_COMP_INIT.X | Is plane compensation initialised for the axis? If yes, then 1 | Boolean | 0 , 1 | LFlush |
LEAD_COMP_INIT.X | Is leadscrew error compensation activated for the axis? If yes, then 1 | Boolean | 0 , 1 | LFlush |
TEMP_COMP_INIT.X | Is temperature compensation initialised for the axis? If yes, then 1 | Boolean | 0 , 1 | LFlush |
FRICT_COMP_INIT.X | Is friction compensation initialised for the axis? If yes, then 1 | Boolean | 0, 1 | LFlush |
CROSSTALK_COMP_INIT.X | Is crosstalk compensation initialised for the axis? If yes, then 1 | Boolean | 0, 1 | LFlush |
Check for activation
CROSS_COMP_ACTIVE.X | Is cross compensation active for the axis? If yes, then 1 | Boolean | 0 , 1 | LFlush |
PLANE_COMP_ACTIVE.X | Is plane compensation active for the axis? If yes, then 1 | Boolean | 0 , 1 | LFlush |
LEAD_COMP_ACTIVE.X | Is leadscrew error compensation active for the axis? If yes, then 1 | Boolean | 0 , 1 | LFlush |
TEMP_COMP_ACTIVE.X | Is temperature compensation active for the axis? If yes, then 1 | Boolean | 0 , 1 | LFlush |
FRICT_COMP_ACTIVE.X | Is friction compensation active for the axis? If yes, then 1 | Boolean | 0, 1 | LFlush |
CROSSTALK_COMP_ACTIVE.X | Is crosstalk compensation active for the axis? If yes, then 1 | Boolean | 0, 1 | LFlush |
BACKLASH_COMP_ACTIVE.X | Is backlash compensation active for the axis? If so, then 1 | Boolean | 0, 1 | LFlush |
Read current compensation values:
As of CNC Build V2.11.2810 the following V.A. variables of the current compensation values are available. | ||||
LEAD_COMP_CURR.X | Current compensation value of LSEC for the axis | Real | [mm, inch] | LFlush |
CROSS_COMP_CURR.X | Current compensation value of cross compensation for the axis | Real | [mm, inch] | LFlush |
PLANE_COMP_CURR.X | Current compensation value of plane compensation for the axis | Real | [mm, inch] | LFlush |
TEMP_COMP_CURR.X | Current compensation value of temperature compensation for the axis | Real | [mm, inch] | LFlush |
FRICT_COMP_CURR.X | Current compensation value of friction compensation for the axis | Real | [mm, inch] | LFlush |
CROSSTALK_COMP_CURR.X | Current compensation value of crosstalk compensation for the axis | Real | [mm, inch] | LFlush |
BACKLASH_COMP_CURR.X | Current compensation value of backlash compensation for the axis | Real | [mm, inch] | LFlush |
Programing Example
Check the states of the axis compensation
N010 G74 X1 Y2 Z3
N020 $IF V.A.CROSS_COMP_INIT.X != TRUE
N030 #MSG ["Cross_Comp for X not init."]
N040 $ENDIF
N050 $IF V.A.TEMP_COMP_INIT.X != TRUE
N060 #MSG ["Temp_Comp for X not init."]
N070 $ENDIF
N080 X [ COMP ON CROSS TEMP ]
N090 $IF V.A.CROSS_COMP_ACTIVE[0] != TRUE
N100 #MSG ["Cross_Comp for X not active"]
N110 $ENDIF
N120 $IF V.A.TEMP_COMP_ACTIVE[0] != TRUE
N130 #MSG ["Temp_Comp for X not active"]
N140 $ENDIF
N150 ...