5 - 14 en-938872/2
ENDI
(go to bottom of hole)
[dimension]=L[LZ] G1 F[RF] G77 H10080 N[I] N[I]
ENDI
N100
(dwell specified by EF)
IF [.IBE1(6)]=1 THEN G4 FL931
ENDI
(retract to ER)
[dimension] = 'ER [I]=[IZ]+10 G0 G77 H10080 N[I] N[I]
G997 G9 M[M998]
G[G90/1] G[G0/1] F[RF] E11005=[diam]
Subroutine %10080 called by cycle %10083
%10080
(analyse drilling, tapping cycles, etc.)
IF [.IBE0(6)] = 1 THEN FL905
ENDI
IF [.IBE0(19)] = 1 THEN SL918
ENDI
IF [.IBE0(20)] = 1 THEN TL919
ENDI
BCLR [.IBE0(6)]/[.IBE0(19)]/[.IBE0(20)]
(read spindle rotation direction and M block sequencing)
[M3/4]=3
*
[.BM03] [M3/4]=4
*
[.BM04]+[M3/4]
[M998]=[.BM999]-[.BM997]+998 M997
(read tool axis number)
[IZ] = [.RDX]
IF [IZ] < 0 THEN [IZ] = -[IZ]
ENDI
(G21, G22 prohibited during a machining cycle)
[E]=[.BG21]+[.BG22] G79 [E]>0 N85
(plane and tool axis compatible?)
IF [.BG20]=1 THEN [Gplan]=20
ELSE [Gplan]=[.BG19]-[.BG17]+18
[E]=[Gplan]+[IZ] G79 [E]<>20 N83
ENDI
(read axis ranks and station in tool axis L900)
[LZ]=922+[IZ] G79 N[IZ]
N1 [IX]=5 [IY]=6 G79 N3+1
N2 [IX]=4 [IY]=6 G79 N3+1
N3 [IX]=4 [IY]=5
(choose primary or secondary axis)
(on the axis perpendicular to the tool axis)
IF [.IBX2(IX)] = 0 THEN [IX] = [IX]-3
ENDI