54 EXAMPLE MANUAL
Program lines of the subroutine:
(SUB 50)
(IF NOSEW12 GT (P104-2*(P107/COS(P100/2))-
2*(P103-P107)*TAN(P100/2)) ERROR “WRONG DATA”) ............................... If cutter width > "d" => Error
;———————————————————————————————————————————————————————————————
; Roughing operation
;———————————————————————————————————————————————————————————————
(P115=FUP((P103-P107)/P106)) ............................................................................. Calculates Nr. of passes (P115).
(P106=(P103-P107)/P115) ......................................................................................... Recalculates the pass (P106).
G92 S500
G95 G96 FP109 SP108 T12 M4 M41
;
(P1=P102+2*P105, P2=P101+(P104/2)-(P107/COS(P100/2))-NOSEW12)
G G90 XP1 ZP2 ................................................................................................................ Move to point "A"
(P1=2*P105)
G1 G91 X-P1 ..................................................................................................................... Movement "A-B"
N50 (P1=2*P106, P2=P106*TAN(P100/2))
X-P1 Z-P2 ................................................................................................................. Movement "B-C"
(P2=P104-2*P107/COS(P100/2)-2*(P103-P107)*TAN(P100/2)+
2*(PPOSX/2-(P102/2-P103+P107))*TAN(P100/2)-NOSEW12)
Z-P2 ............................................................................................................................. Movement "C-D"
(P115=P115-1) ........................................................................................................ Counts down Nr. of passes
(IF P115 LE 0 GOTO N100) .............................................................................. If done with all roughing passes,
go to finishing stage.
(P1=2*P106, P2=P106*TAN(P100/2))
X-P1 ZP2 ................................................................................................................... Movement "D-E"
(P2=P104-2*(P107/COS(P100/2))-2*(P103-P107)*TAN(P100/2)+
2*(PPOSX/2-(P102/2-P103+P107))*TAN(P100/2)-NOSEW12)
ZP2 ............................................................................................................................... Movement "E-F"
(P115=P115-1) ........................................................................................................ Counts down Nr. of passes
(IF P115 GT 0 GOTO N50) ................................................................................ If done with all roughing passes,
go to finishing stage.
;———————————————————————————————————————————————————————————————
; Roughing operation
;———————————————————————————————————————————————————————————————
N100 G95 G96 FP110 SP108
(P1=P102+2*P105)
G0 G90 XP1 ZP101 ..................................................................Movement to point "1"
(P2=P101+(P104/2)-NOSEW12)
G1 XP102 ZP2 ..........................................................................Movement to point "2"
(P1=P102-2*P103)
(P2=P101+(P104/2)-P103*TAN(P100/2)-NOSEW12)
XP1 ZP2 ....................................................................................Movement to point "3"
(P1=P102-2*P103)
(P2=P101-(P104/2)+P103*TAN(P100/2))
XP1 ZP2 ....................................................................................Movement to point "4"
(P2=P101-(P104/2))
XP102 ZP2 ................................................................................Movement to point "5"
(P1=P102+2*P105, P2=P101-(P104/2))
XP1Z P2 ....................................................................................Movement to point "6"
(P1=P102+2*P105)
XP1 ZP101 ................................................................................Movement to point "1"
(RET)