Results 1 to 3 of 3

Thread: Macro to REDUCE crashes

  1. #1
    Join Date
    Dec 2011
    Location
    Illinois / Wisconsin border
    Posts
    190
    Thanks
    29
    Thanked 22 Times in 21 Posts

    Default Macro to REDUCE crashes

    I'm sharing a simple macro to use in a production program to evaluate tool offsets prior to using an invalid offset value.
    I've used this as a G06 after a tool change. The processing time is negligible however, the prevention is (almost) priceless for a wrong offset being used.

    This is written for a Fanuc with Type III offsets and can be used with tool-life;

    %
    O9019(TOOL LENGTH VERIFICATION MACRO)
    (USAGE)
    (G06 X350.00 M330.00 E26.0 F13.0 T99)
    (X=MAX LENGTH)
    (M=MIN LENGTH)
    (E=MAX DIAMETER)
    (F=MIN DIAMETER)
    (T=OFFSET NUMBER IF NOT 1)
    (USE T99 IF OFFSET IS 99)
    (SET PARM# 6059=6)

    N1(OFFSET NUMBER)
    IF[#20GE1.]GOTO2
    #20=1.

    N2(MIN LENGTH COMPARE)
    IF[#13EQ#0]GOTO3
    IF[[#[11000+#20]+#[10000+#20]]LT#13]GOTO200

    N3(MAX LENGTH COMPARE)
    IF[#24EQ#0]GOTO4
    IF[[#[11000+#20]+#[10000+#20]]GT#24]GOTO210

    N4(MIN DIAM COMPARE)
    IF[#9EQ#0]GOTO5
    IF[[#[12000+#20]+#[13000+#20]]LT#9]GOTO220

    N5(MAX DIAM COMPARE)
    IF[#8EQ#0]GOTO6
    IF[[#[12000+#20]+#[13000+#20]]GT#8]GOTO230

    N6
    M99

    N200#3000=1(TOOL OFFSET TOO SHORT)
    N210#3000=2(TOOL OFFSET TOO LONG)
    N220#3000=3(TOOL DIAMETER TOO SMALL)
    N230#3000=4(TOOL DIAMETER TOO LARGE)
    M0
    %

    ************* EXAMPLE IN PROGRAM ************
    N249(4 INCH FINISH FACE MILL)
    G0G17G21G40G80G90
    T249
    M6
    G6M266.1F50.E52.
    T282(286. MM RGH BORE READY POS)
    N249
    (DATUM -X- FACE)
    G0G90G56X0Y0B180.S4775M3
    G43Z316.5H1



    of course, always use caution and care when using code you're unfamiliar with. Please feel free to ask questions if you have them.

  2. #2
    Join Date
    Mar 2010
    Posts
    171
    Thanks
    0
    Thanked 18 Times in 17 Posts

    Default Re: Macro to REDUCE crashes

    I execute the offset code (only) of the program in the MDI mode, manually bring the tool to a known position, and check if the position display is as expected.

  3. #3
    Join Date
    Aug 2010
    Location
    Somerset, UK
    Posts
    11
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default Re: Macro to REDUCE crashes

    Hi
    You haven't said which Fanuc version you have, but you could also try parameter 3290 bit 1 (GOF), this protect's the geometry offset so if the operator tries to alter it control comes up with "WRITE PROTECT", you could also try 3290 bit 0 (WOF) which I think protects the wear offset, I've not check 3290 bit 0.

    the above parameter should work on 0i, 18i, 16i series

    It may or may not help

    Regards

    Mark

Similar Threads

  1. macro a to macro b conversion needed
    By bantamjack in forum Programming / Applications
    Replies: 25
    Last Post: 03-01-13, 08:03 PM
  2. Difference between Brothers macro and Fanucs macro?
    By BigBrothersWatching in forum Programming / Applications
    Replies: 1
    Last Post: 10-20-11, 06:14 AM
  3. smaller macro
    By Minimiller in forum General CNC & Manufacturing Discussion
    Replies: 8
    Last Post: 05-20-11, 06:16 PM
  4. Macro Help
    By gtrrpa in forum Machine Repair & Troubleshooting
    Replies: 4
    Last Post: 04-16-11, 10:36 AM
  5. ATC What is a macro out
    By cnc_swe in forum Machine Repair & Troubleshooting
    Replies: 8
    Last Post: 02-26-11, 02:22 PM

Posting Permissions

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