Results 1 to 3 of 3

Thread: Question Help me improve this custom macro, also freebie chip breaker macro for lathe

  1. #1
    Registered MCImes's Avatar
    Join Date
    Sep 2011
    Location
    USA
    Posts
    109
    Downloads
    0
    Uploads
    0

    Question Question Help me improve this custom macro, also freebie chip breaker macro for lathe

    Hello,
    This custom macro was set up by the factory on a couple of our swiss machines to help control chips. It works awesome so feel free to use it if you have some unruly chips.

    As the program exists you can only turn in Z. This works fine most of the time but I would like to be able to program in some taper in X. Could you guys tell me if this would be possible?

    All it does is turn/dwell/turn/dwell ect.

    Z=end
    Q=turn distance before dwell
    D=Dwell in seconds
    F=Feed

    Here is the existing program:

    O0061(G1 MACRO: SET PARAMETER 6050 TO 61)
    (CHANGE TO O9010 WHEN INSTALLED)
    IF[#7LE0]GOTO5
    IF[#9LE0]GOTO6
    IF[#17LE0]GOTO7
    IF[#26LE0]GOTO8
    #501=#5042
    IF[#501GT#26]GOTO10

    WHILE[#501LT#26]DO1
    N1G01Z#501F#9
    G04X#7
    #501=#501+#17
    END1
    G01Z#26F#9
    M99

    (CUTTING Z+ TO Z-)
    N10
    #501=#5042
    WHILE[#501GT#26]DO1
    N1G01Z#501F#9
    M99

    N5#3000=1(D MISSING)
    N6#3000=2(F MISSING)
    N7#3000=3(Q MISSING)
    N8#3000=4(Z MISSING)

    _______________________________________________________________

    So, here's my (uneducated) thinking on how to improve this

    #501=#5042---------------------- (#501=current Z position)
    #502=[[#26-#5042]/#17] ---- [turn length/peck distance] (formula to get # of "pecks")
    #10=#503------------------------- (didnt look up what # U actually is so its 10 for this example)
    #503=[#503/#502 ] -------------(per peck U move)

    WHILE[#501LT#26]DO1
    N1
    G1 Z#501 U#503 F#9
    G4 X#7
    #501=#501+#17
    END1
    G1 Z#26 U#503 F#9
    M99

    Could this work? thoughts? thanks!
    __________________
    Process Development machinist / CNC training consultant


  2. #2
    Registered
    Join Date
    Feb 2012
    Location
    USA
    Posts
    1
    Downloads
    0
    Uploads
    0
    You don't need to use #10; you can simply use #503 and enter the amount of taper compensation you would like to see. The #10 will work however, though you will still need to use #503 to enter the amount of taper adjustment. Please note that if you have "#503=(any value here)" in your program, it will reset to this value any time you run through your program even if you attempt to make an adjustment to #503 on the variable page.


  3. #3
    Registered
    Join Date
    Jun 2012
    Location
    United States
    Posts
    5
    Downloads
    0
    Uploads
    0

    macro help???

    Hi everyone,

    I know that my question maybe will be to simple for someone, but I need help anyway.

    I want to create a macro that check the axis position during the g-code execution and if it is in exact position turn the output ON and in another position turn the output OFF.

    Any help will very appreciated.

    thanks

    darli


Similar Threads

  1. Problem- Question about Custom Macro AGAIN!!!!!
    By ixoxi999 in forum Fanuc
    Replies: 4
    Last Post: 04-25-2012, 04:19 AM
  2. Replies: 3
    Last Post: 02-13-2012, 01:20 PM
  3. Help writing chip breaker custom macro
    By MCImes in forum Fanuc
    Replies: 10
    Last Post: 10-31-2011, 12:34 PM
  4. custom macro question
    By sinha_nsit in forum G-Code Programing
    Replies: 28
    Last Post: 04-18-2009, 07:44 AM

Posting Permissions


 


About CNCzone.com

    We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

Follow us on

Facebook Dribbble RSS Feed


Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.