Hello All,
I'm new here but have been working with CNC for a long time. (My first NC machine in 1975 was a Mandelli Ego 4 axis HMC with a Bendix 600 control with paper tape.) My favorite brand machine to this day is still Okuma. I've enjoyed reading this forum and thought I'd share some of my programming techniques to see if other programmers have done the same thing. (Wiz and others have made an ATC macro similar to mine.)
In another forum section a poster complained about a Fanuc 6M control not having the work offset option. (?) Anyhow what caught my eye was his thoughts about G92. "I don't like the idea of using G92, as I consider this very dangerous and very inconvenient if I have to restart my program from a different point than the start."
I've been using G92 safely for a long time on my Okuma machines instead of using the grid function. (which some machines don't have) I use system variables and mathematically set G92 with out having to move my axes to any particular spot first. I can restart after a power failure and go directly to the part I was working on. I can add skip code and other useful options.
Below is a short example program showing my 'G92 grid' handwork. I use system variables VMOFn (Origin of machine coord sys) and VAPAn (Actual position) to allow setting G92 from any axis position. VC3 is the X 'fixture offset' and VC4 is the Y offset. (I used H1 for Z) If x spacing is 3" then you would set VC3 to the value of X machine coordinate 3" to the left of part 1. VC4 would be 4" above part 1
This example Gang fixture holds nine parts with part numbering left to right, top to bottom: (Just like reading a book)
1 2 3
4 5 6
7 8 9
Three columns spaced 3" apart with 4" row spacing. VC1 is the part to be machined with VC2 as the limit. To run a partial load of say 2 parts set VC2 to 2. (No wasted time cutting air) You can safely restart with any tool and go to any part by changing the value in VC1. (I had one job that needed 90 offsets)
------------------PGM below --------------------------------------
(USE GANG FIXTURE IN LEFT)
(POSITION ON PALLET# 1)
(FOR CS PARTS SET VC9=1.4)
(SET VC2=9 FOR FULL LOAD)
IF[VC2 EQ 99]N99 (flag to load pgm data)
VC1=1 VC3=-12.161 VC4=7.998
G15H1
(
(T16 5/8 LONG SPOT DRILL)
G116T16P82 (G116 is my ATC macro)
M1
CALL O0
(
(T82 .266 #H DRILL 64/59%)
G116T82A118P83
M1
CALL O0
M9
(
(T83 5/16-18 TAP)
G116T83P16C1
M0
(*** CLEAN HOLES ***)
CALL O0
M9
G30P2
VC33=VC33+VC2 (part counter)
GOTO NEND
N99 VC2=1 (pgm data)
VTOFD[82]=.133
VZOFZ[1]=-5.144
NEND M2
(
O0
N0IF[VC1 GT VC2]N9
/3M8
VC14=FUP[VC1/3] VC13=VC1-[[VC14*3]-3] (three 3s for 3 colums)
G92X=VAPAX-VMOFX-[VC3+VC13*3]Y=VAPAY-VMOFY-[VC4-VC14*4]
IF[VTLCN NE 16]N2 (x span ^) (y span ^)
CALL O16
N2IF[VTLCN NE 82]N3
CALL O82
N3IF[VTLCN NE 83]NEXT
CALL O83
NEXT VC1=VC1+1
GOTO N0
N9 VC1=1
RTS
(
O16
G71Z.5
G0X0Y0Z1S300*VC9M3
NCYL G81Z-.115R.1F.004M53
BHC X0Y0I.9375J270K3
G0Z1
RTS
(
O82
G71Z.5
G0X0Y0Z1S850*VC9M3
NCYL G73Z-.75-VC8R.1F.004Q.1M53
BHC X0Y0I.9375J270K3
G0Z1
RTS
(
O83
G71Z.5
G0X0Y0Z1S80M3
NCYL G84Z-.65R.1F.055M53
BHC X0Y0I.9375J270K3
G0Z1
RTS
EDITS AS OF 06/05/02
Nice use of USER TASK II and system variables.
We do something similar but just use G15 fixture offsets and CALL the cutting the tool does on each part.
I can see where yours is nice to only run a partial load.
Best regards,