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
(T16 5/8 LONG SPOT DRILL)
G116T16P82 (G116 is my ATC macro)
(T82 .266 #H DRILL 64/59%)
(T83 5/16-18 TAP)
(*** CLEAN HOLES ***)
VC33=VC33+VC2 (part counter)
N99 VC2=1 (pgm data)
N0IF[VC1 GT VC2]N9
VC14=FUP[VC1/3] VC13=VC1-[[VC14*3]-3] (three 3s for 3 colums)
IF[VTLCN NE 16]N2 (x span ^) (y span ^)
N2IF[VTLCN NE 82]N3
N3IF[VTLCN NE 83]NEXT
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.