Creating Subroutines Called by G Functions
en-938872/2 5 - 15
5
IF [.IBX2(IY)] = 0 THEN [IY] = [IY]-3
ENDI
(and on tool axis)
IF [.IBX2(IZ)] = 0 THEN [IZ] = [IZ]+3 [LZ]=[LZ]-3
IF [.IBX2(IZ)] = 0 THEN E.880
ENDI
ENDI
(store the last Z dimension in 'ER=. Return if ER was not programmed)
IF [.IBE1(18)] = 0 THEN 'ER = [..IRX(IZ)]
ELSE [E]=[IZ]-1
*
1000+70007
(If programming is by diameter, correct 'ER)
IF E[E]=1 THEN 'ER='ER/2
ENDI
ENDI
[LZ]=[LZ]+26 ( LZ points to variables L926..L951)
(on the first block to be initialised - hole bottom dimension)
IF [..BG80] = 1 THEN L[LZ]=[..IRX(IZ)]
ENDI
(if programmed, store the new hole bottom dimension)
IF [.IBX(IZ)] = 1 THEN L[LZ] = [.IRX(IZ)]
ENDI
(test whether the orientation is consistent with the machining direction)
IF 'ER <> L[LZ] THEN
IF 'ER>L[LZ] AND [.RDX]<0 THEN E.890
ENDI
IF 'ER<L[LZ] AND [.RDX]>0 THEN E.890
ENDI
ENDI
(store the type of positioning)
[G0/1]=3
*
[.BG03][G0/1]=2
*
[.BG02]+[.BG01]+[G0/1] [G90/1]=90+[.BG91]
(store feed rate, dwell)
[RF]=[.RF]
(if ED is programmed, read it and if linear interpolation is specified, force
positioning of the axes already programmed)
IF [.IBE1(4)] = 1 THEN EDL929
BCLR [.IBE1(4)]
IF [G0/1] < 2 THEN G91 [dimension]=0
IF [.IBX1(IX)] = 1 THEN [I]=[IX]+10 G77 H10080 N[I] N[I]
ENDI
IF [.IBX1(IY)] = 1 THEN [I]=[IY]+10 G77 H10080 N[I] N[I]
ENDI
ENDI
ENDI
(store presence then disable the tool axis)
[I]=[.IBX(IZ)]+[.IBX(IX)]+[.IBX(IY)] G90
BCLR [.IBX(IZ)]