M5: Measurement
7.5 Setting zeros, workpiece measuring and tool measuring
Extended Functions
Function Manual, 03/2013, 6FC5397-1BP40-3BA1
491
Program code Comment
G1 _XX=20 _YY=10 F1000 ; 2. Approach measuring point
MEAS = 1 _ZZ=...
$AA_MEAS_POINT2[_xx] = $AA_MW[_xx] ; Assign measurement value to abscissa
$AA_MEAS_POINT2[_yy] = $AA_MW[_yy] ; Assign measurement value to ordinate
$AA_MEAS_POINT2[_zz] = $AA_MW[_zz] ; Assign measurement value to applicate
G1 _XX=20 _YY=20 F1000 ; 3. Approach measuring point
MEAS = 1 _ZZ=...
$AA_MEAS_POINT3[_xx] = $AA_MW[_xx] ; Assign measurement value to abscissa
$AA_MEAS_POINT3[_yy] = $AA_MW[_yy] ; Assign measurement value to ordinate
$AA_MEAS_POINT3[_zz] = $AA_MW[_zz] ; Assign measurement value to applicate
$AA_MEAS_SETPOINT[_xx] = 10 ; Define setpoints for P1
$AA_MEAS_SETPOINT[_yy] = 10
$AA_MEAS_SETPOINT[_zz] = 10
$AC_MEAS_FRAME_SELECT = 102 ; Select target frame - G55
$AC_MEAS_T_NUMBER = 1 ; Select tool
$AC_MEAS_D_NUMBER = 1
RETVAL = MEASURE() ; Start measurement calculation
if RETVAL <> 0
setal(61000 + RETVAL)
endif
; Calculation results for the solid angles
; Angle around the …
R0 = $AC_MEAS_RESULTS[0] ; Abscissa for the old WCS
R1 = $AC_MEAS_RESULTS[1] ; Ordinate
R2 = $AC_MEAS_RESULTS[2] ; Applicate
$P_UIFR[2] = $AC_MEAS_FRAME ; Write measurement frame in data management
(G55)
G55 G0 AX[_xx]=10 AX[_yy]=10 ; Activate frame and traverse
m30