Program code Comment
DEF REAL FIT_QUALITY=0
DEF REAL ROT_FRAME_LIMIT=5 ; Permits max. five degree rota-
tion of the part position.
DEF REAL FIT_QUALITY_LIMIT=3 ; Permits max. 3 mm offset between
the
ideal and the measured triangle.
DEF REAL SHOW_MCS_POS1[3]
DEF REAL SHOW_MCS_POS2[3]
DEF REAL SHOW_MCS_POS3[3]
Program code Comment
N100 G01 G90 F5000
N110 X0 Y0 Z0
N200 CORR_FRAME=MEAFRAME(IDEAL_POINT,MEAS_POINT,FIT_QUALITY)
N230 IF FIT_QUALITY < 0
SETAL(65000)
GOTOF NO_FRAME
ENDIF
N240 IF FIT_QUALITY > FIT_QUALITY_LIMIT
SETAL(65010)
GOTOF NO_FRAME
ENDIF
N250 IF CORR_FRAME[X,RT] > ROT_FRAME_LIMIT ; Limiting the 1st RPY angle.
SETAL(65020)
GOTOF NO_FRAME
ENDIF
N260 IF CORR_FRAME[Y,RT] > ROT_FRAME_LIMIT ; Limiting the 2nd RPY angle.
SETAL(65021)
GOTOF NO_FRAME
ENDIF
N270 IF CORR_FRAME[Z,RT] > ROT_FRAME_LIMIT ; Limiting the 3rd RPY angle.
SETAL(65022)
GOTOF NO_FRAME
ENDIF
N300 $P_IFRAME=CORR_FRAME ; Activate sample frame with setta-
ble frame.
; Check frame by positioning the
geometry axes to the ideal point.
N400 X=IDEAL_POINT[0,0] Y=IDEAL_POINT[0,1]
Z=IDEAL_POINT[0,2]
N410 SHOW_MCS_POS1[0]=$AA_IM[X]
N420 SHOW_MCS_POS1[1]=$AA_IM[Y]
N430 SHOW_MCS_POS1[2]=$AA_IM[Z]
Work preparation
3.8 Coordinate transformations (frames)
NC programming
646 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0