M5: Measurement
7.5 Setting zeros, workpiece measuring and tool measuring
Extended Functions
506 Function Manual, 03/2013, 6FC5397-1BP40-3BA1
Input variable Meaning
$AC_MEAS_ACT_PLANE Calculated as active plane unless otherwise specified *
$AC_MEAS_TYPE 10
* optional
The following output variables are written for measurement type 10:
Output variable Meaning
$AC_MEAS_TOOL_LENGTH Tool length
$AC_MEAS_RESULTS[0] Tool length in x
$AC_MEAS_RESULTS[1] Tool length in y
$AC_MEAS_RESULTS[2] Tool length in z
$AC_MEAS_RESULTS[3] Tool length L1
$AC_MEAS_RESULTS[4] Tool length L2
$AC_MEAS_RESULTS[5] Tool length L3
Example
Measuring the tool length
Program code Comment
DEF INT RETVAL
T0 D0
g0 x0 y0 z0 f10000
; Measure tool length
$AC_MEAS_VALID = 0 ; Set all input values to invalid
g1 z10 ; Move tool towards reference part
$AC_MEAS_LATCH[0] = 1 ; Pick up measuring point 1
$AC_MEAS_DIR_APPROACH = 5 ; Set approach direction -z
$AA_MEAS_SETPOINT[x] = 0 ; Set reference position
$AA_MEAS_SETPOINT[y] = 0
$AA_MEAS_SETPOINT[z] = 0
$AC_MEAS_ACT_PLANE = 0 ; Measuring plane is G17
$AC_MEAS_T_NUMBER = 0 ; No tool has been selected
$AC_MEAS_D_NUMBER = 0
$AC_MEAS_TYPE = 10 ; Set measuring type on tool length
RETVAL = MEASURE() , Start measuring process
if RETVAL <> 0 setal(61000 + RETVAL)
endif
if $AC_MEAS_TOOL_LENGTH <> 10 ; Query known tool length
setal(61000 + $AC_MEAS_TOOL_LENGTH)
endif
m30