Okuma - Helical macro


Results 1 to 10 of 10

Thread: Okuma - Helical macro

  1. #1
    Registered
    Join Date
    Feb 2007
    Location
    Way too far up north
    Posts
    8
    Downloads
    0
    Uploads
    0

    Default Okuma - Helical macro

    Hi,

    The first one i made worked fine using r-comp both in, round and out, but i can max use a 10mm cutter to make a 20mm hole.
    and that sux when i allready have a 12 and 16 in the chain.

    There for Im making a new macro and where i need to read out the value of cutter no. 5

    but something is wrong !! :???:

    I dont know if my cutter value read is correct ?
    Also its like Y dont go 100 when G41 (maby because of zero movement!!)
    It also looks like the 360 hole moves in Y !!

    anyone ????

    ***
    (CALL MACRO)
    G113 HR=100 HQ=20 HZ=-4 F1220 D5
    ***
    OICIR (G113)
    ()
    (PRE-POS. IN CENTER OF HOLE)
    ()
    (MACRO DESC.)
    (CIRCLE IN)
    (360 HOLE IN CUTTER COMP. WITH OR WITHOUT INT.POL.HELICAL)
    (CLEAN UP OR NOT)
    (CIRCLE OUT)
    ()
    (HR=HOLE RADIUS)
    (HQ=NO. OF REPEATS)
    (MUST BE 1 OR BIGGER)
    (HZ=INCREMENTEL Z FOR HELICAL)
    (MUST BE 0 OR LESS)
    ()
    VC1=VDCOD (ACTIVE CUTTER OFFSET NO - D-NUMBER)
    VC2=VTOFD[VC1] (VALUE OF D OF ACTIVE CUTTER OFFSET NO.)
    VC3=HR-VC2 (HOLE RADIUS - D-VALUE)
    ()
    G40 G91 G3 X0 Y=VC3 J=VC3/2 (CIRCLE IN)
    G91 G1 G41 X0 Y0 (ACTIVATE CUTTER COMP.)
    COPY Q=HQ (REPEAT)
    G91 G3 X0 Y0 J=-HR Z=HZ (360 HOLE INT.POL.HELICAL)
    COPYE (REPEAT END)
    IF [HZ EQ 0] N10 (IF NOT HELICAL DONT CLEAN UP)
    G91 G3 X0 Y0 J=-HR (BOTTOM CELAN UP)
    N10 G40 (KILL CUTTER COMP.)
    G91 G3 X0 Y=-VC3 J=-VC3/2 (CIRCLE OUT)
    G90 (ABSOLUTE)
    RTS (RETURN TO MAIN PROGRAM)
    %

    ***

    VC1=VTOFD[VDCOD]
    VC2=HR-VC1
    ()
    G40 G91 G3 X0 Y=VC2 J=VC2/2
    COPY Q=HQ
    G3 J=-VC2 Z=HZ
    COPYE
    IF [HZ EQ 0] N10
    G3 J=-VC2
    N10 G3 X0 Y=-VC2 J=-VC2/2
    G90

    Best...

    Leon

    Similar Threads:
    Last edited by LeonH; 02-17-2007 at 07:18 PM. Reason: Why use cutter comp.!


  2. #2
    Registered broby's Avatar
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    811
    Downloads
    0
    Uploads
    0

    Default

    Hello Leon,
    I have an Okuma MA600 Machining Centre and developed a Helical milling macro many years ago. This subroutine allows us to easily and very quickly program a hole of virtually any diameter with any appropriate tool. As long as the tool will allow helical ramping it will be able to be used in this routine.

    I have set up a G Code macro link on the machine to link the library subroutine to G103... refer your manuals if you do not know how to do this... or ask me and I will post instructions for you.

    anyway... the library file contains the following code in a file called HELLIMILL.LIB (on the machine)

    OHELI
    (MILL HELICAL SUBROUTINE)
    IF [PD EQ EMPTY ] NALM2
    IF [PE EQ EMPTY ] NALM3
    IF [PF EQ EMPTY ] NALM4
    IF [PP EQ EMPTY ] NALM5
    IF [PS EQ EMPTY ] NALM6
    IF [PW EQ EMPTY ] NALM7
    IF [PZ EQ EMPTY ] NALM8
    IF [PR EQ EMPTY ] NALM9
    N2 TODR=PD/2 (RADIUS OF MAJOR DIAMETER)
    N4 RATE=PS*PE*PF (CALCULATE LINEAR FEEDRATE)
    N8 DPTH=PW-PZ (ACTUAL DEPTH OF HOLE)
    N10 QTYP=DPTH/PP (QUANTITY OF PASSES REQUIRED TO MILL THREAD)
    N12 QTYP=ROUND[QTYP+0.5] (ROUNDUP THE NUMBER OF PASSES)
    N14 PTCH=[DPTH/QTYP]*-1 (CALC ACTUAL PITCH REQ)
    N16 PASS=0 (COUNTER FOR NUMBER OF PASSES MILLED)
    N18 G0 Z=PR (RAPID TO "R" PLANE)
    N20 G1 Z=PW F6000. (FEED TO "W" WORKING SURFACE)
    N22 G91 G41 DA X=TODR Z0 F=RATE (MOVE FROM CENTRE OF HOLE TO DIAMETER, TURNING ON CUTTER RAD COMP)
    NJP1 G3 X0 Y0 I-[TODR] J0 Z=PTCH F=RATE (FULL PITCH)
    N24 PASS=PASS+1 (INCREMENT COUNTER)
    N26 IF [PASS LT QTYP] NJP1 (JUMP BACK TO NEXT PASS CONDITION)
    N28 G3 X0 Y0 I-[TODR] J0 (FULL CIRCLE CLEANUP)
    N30 G1 G40 X-[TODR] Z0 F=RATE*5 (BACK TO CENTRE)
    N32 G0 G90 Z=PR (CLEAR HOLE)
    N34 GOTO NEND
    NALM2
    VNCOM[1]=1
    MSG(MISSING DATA "D")
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    NALM3
    VNCOM[1]=1
    MSG(MISSING DATA "E")
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    NALM4
    VNCOM[1]=1
    MSG(MISSING DATA "F")
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    NALM5
    VNCOM[1]=1
    MSG(MISSING DATA "P")
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    NALM6
    VNCOM[1]=1
    MSG(MISSING DATA "S")
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    NALM7
    VNCOM[1]=1
    MSG(MISSING DATA "W")
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    NALM8
    VNCOM[1]=1
    MSG(MISSING DATA "Z")
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    NALM9
    VNCOM[1]=1
    MSG(MISSING DATA "R")
    M00
    NMSG
    VNCOM[1]=0
    NEND G90
    RTS
    %

    To use the program, follow the example below

    Helical Milling Programming MA600
    Definitions:
    G103 G Code for the Helical program VIA G-Code Macro setting.
    G100 Cancel Subprogram same as using G80 for std drilling cycles
    D Hole Diameter
    E Number of Flutes on the cutter
    F Feed rate per Flute
    P Z amount per rev. Pitch, in MM
    R Reference Z Height
    S RPM of tool
    W Top surface of hole (Z).
    Z Depth of hole.

    Sample program:
    Mill a hole 62mm diameter 70mm deep using a 4 flute 40mm diam tip tool.

    N1 M3 S1432
    N2 M8
    N3 G0 Xstartpos Ystartpos
    N4 G56 HA Z700
    N5 Z20. (reference height)
    N6 G103 D62 E4 F0.15 P4. R20. S1432 W0. Z-70.
    N7 Xpos Ypos
    N8 Xnext Ynext
    or
    N9 ARC or BHC or LAA...
    N10 G100
    N11 G0 Z20.
    N12 M5
    N13 M209
    N14 Z700
    N15 M6
    N16 M1
    ...

    As you might be able to see, the use of the helical milling routine is as simple as drilling a hole! The main tricks to remember when using the G103 command is to not just position at the first point and call the routine, as in like a drilling cycle, and then list the points for the next hole... but to list the first point and all other points on the line after the G103 line and make sure you cancel the cycle with a G100!
    I have included comments for most lines to explain what they do... the bulk of the library file is actually taken up with alarm statements to help the user at the machine if any part of the G103 command is missing.
    As the macro uses incremental mode for machining the hole, you can position the tool anywhere on the job and call this routine very easily.
    I have found this macro to be VERY handy and a very fast way of programming helical milled holes.
    Let me know if you find it useful.
    Regards
    Brian.



  3. #3
    Registered
    Join Date
    Feb 2007
    Location
    Way too far up north
    Posts
    8
    Downloads
    0
    Uploads
    0

    Default

    Hi Brian,

    Nice MODIN you got there...

    MODIN is very usefull if you have to make a lot of holes, but that is very selden that we do that.

    My CALL macro G113 was released last week on our Okuma's and I have changed a version to Fanuc too.

    All the text in the macro is in Danish!

    The only thing i have not tested is how to call it.
    Current we "G113 PR=100 PQ=5 PZ=-5 D5 F1020" works 100%
    But mayby "G113 R100 Q5 Z-5 D5 F1020" works too, I will test that later.

    Pre-pos. in center of hole, in Z0 or Z-xx

    R = hole radius
    Q = repeats (must be 1 or more)
    Z = pitch pr. rev. (must be 0 (no helical) or less (helical))

    ---

    $OG113.SSB %
    OG113 (G113 CALL)
    ()
    (REV.004)
    ()
    (TESTET PÅ OSP5000M OG 7000M)
    ()
    (-------------- MAKRO BESKRIVELSE --------------)
    ()
    (MAKROEN KRAEVER USER TASK II OPTION)
    (INT.POL.HELICAL)
    ()
    (CIRKEL IN)
    (CIRKEL RUNDT 360GR. MED ELLER UDEN HELICAL)
    (RYD BUND ELLER EJ)
    (CIRKEL UD)
    ()
    (MAKROEN HAR VARIABEL FINDES-KONTROL)
    (SAMMEN MED VARIABEL VAERDI-KONTROL)
    (OG ALARM FUNKTION MED BL0DT STOP - M00)
    ()
    (OBS HAARDE ALARMER KAN OPNAAS VED)
    (VUACM OG VDOUT)
    ()
    (-----------------------------------------------------------------)
    ()
    (POSITIONER I CENTER AF HUL)
    (I Z0 - ENME OVERFLADE VED HELICAL)
    (ELLER I Z-XX VED HZ=0)
    (**** OBS ****)
    (DENNE MAKRO BORER IKKE)
    ()
    (----------------------OPKALD: ----------------------)
    ()...
    (G56 H5 D5 S2700 X0 Y0 Z5)
    (G1 Z0 F200)
    (INT.POL.HELICAL)
    (G113 PR=100 PQ=5 PZ=-5 F1020)
    (G0 Z5.)
    (X400 Y250)
    (G1 Z-10)
    (BL0DT IND OG UD)
    (G113 PR=100 PQ=1 PZ=0 F1020)
    (G0 Z5)
    ()
    (-------------------- INFO -------------------------------)
    ()
    (PR=HUL RADIUS)
    (PQ=GENTAGELSER)
    (SKAL VAERE ST0RRE END 0)
    (PZ=INCREMENTEL Z FOR HELICAL)
    (SKAL VAERE 0 ELLER MINDRE)
    ()
    (------------------------------------------------------------)
    ()
    VC1=VDCOD (HENT D-NUMMER)
    VC4=VFCOD (HENT FEED)
    ()
    (KONTROL INDSKRIVNING VIA NULPUNKTMAKRO - HVIS I HAR SAADAN EN)
    (G111 H50 VC1=VC1 VC2=VC2 VC3=VC3)
    ()
    (--- VARIABEL KONTROL FINDES ELLER EJ ---)
    ()
    IF [PR EQ EMPTY] NALM1
    IF [PQ EQ EMPTY] NALM2
    IF [PZ EQ EMPTY] NALM3
    IF [VC1 EQ EMPTY] NALM4
    IF [VC1 EQ 0] NALM4
    IF [VC4 EQ EMPTY] NALM5
    IF [VC4 EQ 0] NALM5
    ()
    VC2=VTOFD[VC1] (HENT VKT.RADIUS I VKT.LISTE)
    VC3=PR-VC2 (RADIUS KOMP)
    ()
    (--- VARIABEL VAERDI KONTROL - KAN DET LADE SIG G0RE ---)
    ()
    IF [PR LE 0] NALM6 (RADIUS <= 0 SAA ALARM)
    IF [PQ LT 1] NALM7 (Q < 1 SAA ALARM)
    IF [PZ GT 0] NALM8 (Z > 0 SA ALARM)
    IF [VC3 LE 0] NALM9 (HUL-RADIUS MINUS R-KOMP <= 0 SAA ALARM)
    ()
    (--- MASKIN BEVAEGELSER ---)
    ()
    G40 G91 G3 X0 Y=VC3 J=VC3/2 (CIRKEL IND)
    COPY Q=PQ (GENTAGE XX GANGE)
    G3 J=-VC3 Z=PZ (HULLET RUNDT EVT. MED HELICAL)
    COPYE (GENTAGE SLUT)
    IF [PZ EQ 0] N10 (HVIS EJ HELICAL GAA TIL)
    G3 J=-VC3 (RYD BUND NAAR HELICAL)
    N10 G3 X0 Y=-VC3 J=-VC3/2 (CIRKEL UD)
    GOTO NEND (GAA TIL SLUT)
    ()
    (----- ALARMER MED BL0DT STOP - M00 -----)
    ()
    NALM1 (ALARM "PR=XX" MANGLER)
    VNCOM[1]=1
    MSG(ALARM "PR=XX" HUL RADIUS MANGLER I G113)
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    ()
    NALM2 (ALARM "PQ=XX" GENTAGELSE MANGLER)
    VNCOM[1]=1
    MSG(ALARM "PQ=XX" GENTAGELSE MANGLER I G113)
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    ()
    NALM3 (ALARM "PZ=XX" MANGLER)
    VNCOM[1]=1
    MSG(ALARM "PZ=XX" MANGLER I G113)
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    ()
    NALM4 (ALARM "D" MANGLER)
    VNCOM[1]=1
    MSG(ALARM "D" MANGLER)
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    ()
    NALM5 (ALARM "F" MANGLER)
    VNCOM[1]=1
    MSG(ALARM "F" MANGLER)
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    ()
    NALM6 (ALARM "PR" ER FOR LILLE)
    VNCOM[1]=1
    MSG(ALARM "PR" ER FOR LILLE)
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    ()
    NALM7 (ALARM "PQ" GENTAGELSE SKAL VAERE 1 ELLER ST0RRE)
    VNCOM[1]=1
    MSG(ALARM "PQ" GENTAGELSE SKAL VAERE 1 ELLER ST0RRE)
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    ()
    NALM8 (ALARM "PZ" SKAL VAERE 0 ELLER MINUS)
    VNCOM[1]=1
    MSG(ALARM "PZ" SKAL VAERE 0 ELLER MINUS)
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    ()
    NALM9 (ALARM FRAESER ER FOR STOR TIL HUL)
    VNCOM[1]=1
    MSG(ALARM FRAESER ER FOR STOR TIL HUL)
    M00
    NMSG
    VNCOM[1]=0
    GOTO NEND
    ()
    NEND G90
    RTS
    %

    Last edited by LeonH; 02-27-2007 at 05:10 AM.
    Thanks,
    Leon Hulstroem


  4. #4
    Registered
    Join Date
    Feb 2007
    Location
    Way too far up north
    Posts
    8
    Downloads
    0
    Uploads
    0

    Default

    Hi again :-)

    Quote Originally Posted by broby View Post
    NJP1 G3 X0 Y0 I-[TODR] J0 Z=PTCH F=RATE (FULL PITCH)
    N24 PASS=PASS+1 (INCREMENT COUNTER)
    N26 IF [PASS LT QTYP] NJP1 (JUMP BACK TO NEXT PASS CONDITION)

    I wonder if your counter is faster then the COPY function ??
    I guess it can only be, I hate that little pause when looping.
    I cant mill thead with COPY :-/ not that we do that very often, but it would be nice to be able to.

    Thanks,
    Leon Hulstroem


  5. #5
    Registered broby's Avatar
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    811
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by LeonH View Post
    Hi Brian,
    All the text in the macro is in Danish!

    The only thing i have not tested is how to call it.
    Current we "G113 PR=100 PQ=5 PZ=-5 D5 F1020" works 100%
    But mayby "G113 R100 Q5 Z-5 D5 F1020" works too, I will test that later.
    %
    Hi Leon,
    Looks like there is a lot of similarity between our programs!
    Bit of a bummer the language thing, but never fear, I could see what you were doing most of the time!

    I have never used the "copy/copye" commands, always used loop counters.
    Seemed to me to be more inherently understandable, and there is no pause between loops.

    Be aware that when you setup your G113 code to use it as G113 R100 Q5... you will have to refer to the parameters as PR for the R parameter PQ for the Q parameter etc.

    I have a thread milling program that I use heaps, that is very similar to the helical macro, needs a bit of work to really clean it up to be even better, but that is on the one day list, as the problems are not that big a deal at the moment.

    What kind of work do you mostly do?

    We mainly concern our manufacturing to spare parts for earth moving equipment, mining equipment, gear box overhauls, gear refurbishment and a range of other general engineering jobs.

    Regards
    Brian.



  6. #6
    Registered
    Join Date
    Feb 2007
    Location
    Way too far up north
    Posts
    8
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by broby View Post
    I have never used the "copy/copye" commands, always used loop counters.
    Seemed to me to be more inherently understandable, and there is no pause between loops.
    COPY/COPYE is a function I use alot. But it will be less with our macro.

    Be aware that when you setup your G113 code to use it as G113 R100 Q5... you will have to refer to the parameters as PR for the R parameter PQ for the Q parameter etc.
    So I will have to enter PR=R etc. in my macro

    What kind of work do you mostly do?

    We mainly concern our manufacturing to spare parts for earth moving equipment, mining equipment, gear box overhauls, gear refurbishment and a range of other general engineering jobs.
    We currently do sub-contracting only. Mening that we make all kind of parts, currently it is parts for meat-grinders, label-printing machines, air/hyd.-cylinder parts.
    Some parts are small and others is 250+kg.

    I mostly operate our Okuma pallet machine and our new Mazak Variax 500-5x
    The Mazak is like meeting a hole new world for me, I thing it will be some time before I get used to Mazatrol (thank GOD for ISO)
    I guess when operating the 2 most advanced mill's in the shop I also tense to get the most advanced milling.
    Most of the stuff I make is multi axis positioning (97% - 2½D the rest is 3D)
    The rest of our 5 mill's only do 2D jobs.

    Have you ever used VUACM and VDOUT for hard stop rather then M00 ?
    I lag samples of use :-(
    Google dont give me any usable describtion on the settings and the OSP manuel sux

    Thanks,
    Leon Hulstroem


  7. #7
    Registered broby's Avatar
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    811
    Downloads
    0
    Uploads
    0

    Default

    Hi Leon,
    PR=R? No that is not the way it works.
    In the calling line (i.e. the program for the part) you use G113 R100. Q5 Z-5 D5 F1020.
    Then in the subprogram you will be referring to them using "P" infront of the letter used, i.e. the R100 would be referenced by way of PR in the sub. PQ for looking at Q, PZ for Z, PD for D and PF for F.
    This can be checked by using a common variable to display the value passed in such as VC1=PR
    Run the program and you will see VC1 take on the value of R on the G113 line.
    The "P" represents Parameter, so to refer to any letter used with the custom G code routine, stick a P infront of it in the subprogram code and you should be able to use it.
    Mind you, our OSP-E100M did not like me using a T parameter in one of my macros, seems like it wanted the "T" reserved to be used for tooling or some such rot... I had wanted to use "T" to represent the "Top" surface on Z for the process to start at and then penetrate to a depth of "Z". Ended up having to use "W" and calling the top surface the "Work" surface.
    Hope this helps.
    Regards
    Brian.

    PS where is "Way Up North"? I am located approx 300km south of Perth, the capitol of Western Australia.



  8. #8
    Registered broby's Avatar
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    811
    Downloads
    0
    Uploads
    0

    Default

    Forgot...
    I agree with regards to Mazatrol... seems alien after spending so many years using ISO!
    From what I can see from our two Integrex machines (Integrex 50 and Integrex400) the language is very powerful and easy to use, Once you come to grips with changing the way you look at programming!
    The only thing is... I always look at it like I don't have "full control" over what and how and when the machine is going to do something!
    But then, I manage to keep my distance from them most of the time, so all is well anyway.
    Brian.



  9. #9
    Registered
    Join Date
    Feb 2007
    Location
    Way too far up north
    Posts
    8
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by broby View Post
    PS where is "Way Up North"? I am located approx 300km south of Perth, the capitol of Western Australia.
    Oh man U are up early and Im up late *ss*

    You are GMT+9 down under..
    Im GMT+1 on the top in Korsoer, on the isle Sealand in Denmark.. weather is currently -5 and 5-50cm snow.
    And its 17min past midnight, so its bedtime. I have to be in the shop at 0600 :-/

    Thanks,
    Leon Hulstroem


  10. #10
    Registered broby's Avatar
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    811
    Downloads
    0
    Uploads
    0

    Default

    Seems like you are up rather late!
    Not to early for me. I normally start work around 6am anyway.
    Been getting fried with temps up around mid to high 30's last few days, this morning it actually rained for the first time for ages.
    Catch you later.
    Brian.



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Okuma - Helical macro

Okuma - Helical macro