Programming Example - Siemens SINUMERIK 840D sl Programming Manual

Measuring cycles
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

5.9.4.2

Programming example

CYCLE119 application:
%_N_ Check _MPF
;Calculate new frame according to transferred points and correct in active frame
;Apply (_COR=9999) if distortion is _RES < 1.2 mm:
DEF REAL
_SETPOINT[3,3],_MEASPOINT[3,3]
DEF REAL _RES, _RESLIMIT
DEF INT _ALARM
DEF FRAME _REFRAME
N10 G17 G54 T1 D1
N20 _SETPOINT[0,0]=SET(10,0,0)
N30 _SETPOINT[1,0]=SET(0,20,0)
N40 _SETPOINT[2,0]=SET(0,0,30)
;Program section for determining actual workpiece coordinates of the 3 points:
...
;Assignment of derived values:
N100 _MEASPOINT[0,0]=SET(11,0,0)
N110 _MEASPOINT[1,0]=SET(1,20,0)
N120 _MEASPOINT[2,0]=SET(1,0,30)
;Calculation with compensation in G54:
N200 CYCLE119(_SETPOINT,_MEASPOINT,
_ALARM,_RES,_REFRAME,9999,1.2)
IF (_ALARM==0) GOTOF _OKAY
MSG ("Error: " <<_ALARM)
M0
GOTOF _END
_OKAY: G54
N400 G0 X... Y... Z...
...
N500 _END: M2
Measuring cycles
Programming Manual, Release 04/2006, 6FC5398-4BP10-0BA0
Measuring Cycles for Milling and Machining Centers
5.9 CYCLE997 workpiece: Measuring a sphere and ZO determination
;Setpoint coordinates 1st point (X1,Y1,Z1)
;Setpoint coordinates 2nd point (X2,Y2,Z2)
;Setpoint coordinates 3rd point (X3,Y3,Z3)
;Actual value coordinates 1st point
(X1,Y1,Z1)
;Actual value coordinates 2nd point
(X2,Y2,Z2)
;Actual value coordinates 3rd point
(X3,Y3,Z3)
;Alarm occurred
;Activate corrected frame (ZO)
;Traverse in corrected frame
5-141

Advertisement

Table of Contents
loading

Table of Contents