586,123 active members*
3,264 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2010
    Posts
    188

    simplify my program PLEASE!

    hello everyone,
    i'm hoping some one can help me out with this.
    my shop is currently producing many gears/spline profiles using our cnc mills.
    since this is something we are going to be doing for a while i would like to simplify my programming so as to produce code quicker, in turn pruduce parts faster. currently i am producing programs that utilize tool radius comp and run multiple tools around a given profile. my problem is, every time i do a tool change the full list of code is output, so if the program has five tools, you will see five large blocks of code that are all identicle. there has to be a better way to do this? i hope i havn't confused you i'm having trouble explaining what exactly i am looking for. i'll try to make up an example...


    how my program looks now (three tools, profile cutter, top rad. bot rad)


    T1
    X2.0 Y2.0
    ECT
    ECT
    ECT
    ECT
    ECT
    T2
    X2.0 Y2.0
    ECT
    ECT
    ECT
    ECT
    ECT
    T3
    X2.0 Y2.0
    ECT
    ECT
    ECT
    ECT

    AND WHAT I WOULD LIKE TO SEE IS

    T1
    ???
    T2
    ???
    T3
    ???
    X2.0 Y2.0
    ECT
    ECT
    ECT
    ECT
    ECT

    i'm very new to this, i'm sure there is a very simple way to accomplish this i just can't seem to figure it out.

    thanks in advance

  2. #2
    Join Date
    Mar 2003
    Posts
    2932
    You can use main and subprograms to accomplish this. Store both O1000 and O1001 in the memory.

    O1000 (MAIN PROGRAM)
    T1
    M98 P1001 (CALL SUB 1001)
    T2
    M98 P1001
    T3
    M98 P1001
    M30

    O1001 (SUB PROGRAM)
    X2.0 Y2.0
    ECT
    ECT
    ECT
    ECT
    ECT
    M99 (RETURN TO MAIN)

  3. #3
    Join Date
    Aug 2009
    Posts
    684
    You could put your contour into a separate program and call it up after initializing each tool and moving it to the correct start point eg: -

    o0001 (main pgm)
    T1 M6
    S? M3
    G0 G90 G17 G40 X? Y?
    G43 H1 D1 Z? M8
    M98 P0002
    G91 G28 Z0 M9
    M5

    T2 M6
    S? M3
    G0 G90 G17 G40 X? Y?
    G43 H2 D2 Z? M8
    M98 P0002
    G91 G28 Z0 M9
    M5

    T3 M6
    S? M3
    G0 G90 G17 G40 X? Y?
    G43 H3 D3 Z? M8
    M98 P0002
    G91 G28 Z0 M9
    M5
    M30

    Separate Sub-Pgm: -

    o0002 (sub)
    G1 X? Y? F?
    etc
    etc
    M99




    If you have Macro B capability:-

    You can use G65 rather than M98 and pass arguments for Offsets, Z position and Feedrate, to shorten your main program: -

    G65 P0002 H? D? Z? F?

    in sub program: -

    G43 H#11 D#7 Z#26
    G1 X? Y? F#9
    etc
    etc
    M99

    If you want to keep it all in a single program you need to have Macro B capability. Use GOTO and N sequence numbers, and specify the arguments/return point with #__ = ?.

    It might look like this: -

    o0001
    N10 T1 M6
    S? M3
    G0 G90 G17 G40 X? Y?
    G43 H1 D1 Z? M8
    #9=500
    #14=20
    GOTO50

    N20 T2 M6
    S? M3
    G0 G90 G17 G40 X? Y?
    G43 H2 D2 Z? M8
    #9=800
    #14=30
    GOTO50

    N30 T3 M6
    S? M3
    G0 G90 G17 G40 X? Y?
    G43 H3 D3 Z? M8
    #9=800
    #14=40
    GOTO50

    N40 M30

    N50
    G1 X? Y? F#9
    etc
    etc
    G91 G28 Z0 M9
    M5
    M99 P#14

    There are other combinations/variations of those techniques - choose the format that best suits the situation.

    DP

  4. #4
    Join Date
    Aug 2010
    Posts
    188
    thanks all! i will most likely just try ou the sub programs for now, maybe as i get a little more advanced i'll try some of the other suggestions.
    thanks again!

Similar Threads

  1. Mazatrol Program into a G Code Program
    By fuzzman in forum Mazak, Mitsubishi, Mazatrol
    Replies: 15
    Last Post: 09-25-2012, 04:27 PM
  2. Programming knurling - anyways to simplify?
    By compunerdy in forum G-Code Programing
    Replies: 2
    Last Post: 05-13-2010, 08:08 AM
  3. Simplify Body
    By Luis Franco in forum UG NX
    Replies: 1
    Last Post: 10-26-2009, 03:09 PM
  4. trying to simplify my program
    By johnpiero in forum G-Code Programing
    Replies: 4
    Last Post: 11-18-2008, 01:56 AM
  5. Replies: 11
    Last Post: 10-09-2005, 05:45 AM

Posting Permissions

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