587,012 active members*
3,664 visitors online*
Register for free
Login

Thread: macro

Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2014
    Posts
    15

    macro

    what is meaning of macro

  2. #2
    Join Date
    Mar 2006
    Posts
    31

    Re: macro

    It creates sub programs so you can reduce the size of the program. Lets say your milling a pocket 5" deep, but your only taking .05" DOC. That would be a lot of lines. Using macros, your program would basically change to a position move, Z depth, and then repeat the sub-program. The sub program would be the linear moves for the pocket that repeated every depth of cut.

    Heres an example of the same program with and without macros:
    Without Macros

    G00 G55 G90 G80 G40 G28 Z0.0
    M19
    M06 T8
    S2037 M03
    G00 X10.2594 Y0.2354
    G43 Z1.0 T8 H8 M08
    Z0.1
    G01 Z-0.0199 F24.4
    G41 D8X10.1326 Y0.2014
    X10.1126 Y0.1814
    G02 X9.98 Y0.1265 I-0.1326 J0.1326
    G01 X8.75
    G03 X8.75 Y-0.1265 I0. J-0.1265
    G01 X9.98
    G02 X10.1126 Y-0.1814 I0. J-0.1875
    G01 X10.1326 Y-0.2014
    G40 X10.2594 Y-0.2354
    Y0.2354
    Z-0.0398
    G41 D8X10.1326 Y0.2014
    X10.1126 Y0.1814
    G02 X9.98 Y0.1265 I-0.1326 J0.1326
    G01 X8.75
    G03 X8.75 Y-0.1265 I0. J-0.1265
    G01 X9.98
    G02 X10.1126 Y-0.1814 I0. J-0.1875
    G01 X10.1326 Y-0.2014
    G40 X10.2594 Y-0.2354
    Y0.2354
    Z-0.0597

    With Macros
    G00 G55 G90 G80 G40 G28 Z0.0
    M19
    M06 T8
    S2037 M03
    G00 X10.2594 Y0.2354
    G43 Z1.0 T8 H8 M08
    Z0.1
    G01 Z-0.0199 F24.4
    N100 P6601 M98
    G01 Y0.2354
    Z-0.0398
    N115 P6601 M98
    G01 Y0.2354
    Z-0.0597

    The sub program would look like this
    O6601
    ( ROUGH1 SIDE )
    ( ENDMILL0375:4REG )
    N520 G01 G41 D8 X10.1326 Y0.2014 F24.4
    N525 X10.1126 Y0.1814
    N530 G02 X9.98 Y0.1265 I-0.1326 J0.1326
    N535 G01 X8.75
    N540 G03 X8.75 Y-0.1265 I0. J-0.1265
    N545 G01 X9.98
    N550 G02 X10.1126 Y-0.1814 I0. J-0.1875
    N555 G01 X10.1326 Y-0.2014
    N560 G40 X10.2594 Y-0.2354
    N565 M99

  3. #3
    Join Date
    Mar 2006
    Posts
    31

    Re: macro

    It basically a repeat of designated lines, similar to a finish can cycle. It also work well on a lathe, if you want to run more than one part with a bar puller or a bar feeder.

  4. #4
    Join Date
    Feb 2015
    Posts
    174

    Re: macro

    grumpy is right on here. If i do something daily or tool change or repeatedly, i write a simple macro. IE: M6 means about ten lines of redundant code to me, get the machine out of the way, do some crap I don't think about, make this mess easy. Now depending the controller these can be protected against accidental deletion or alteration. Sorry so vague.

    OH! depending on the controller, you can assign your own code to a macro, OK that's COOL!

Similar Threads

  1. Accessing Macro Variable from another macro
    By ex-egll in forum Mach Wizards, Macros, & Addons
    Replies: 1
    Last Post: 02-01-2014, 06:52 AM
  2. Replies: 2
    Last Post: 12-19-2012, 01:28 PM
  3. Replies: 3
    Last Post: 02-13-2012, 07:20 PM
  4. Replies: 2
    Last Post: 03-27-2009, 09:15 PM
  5. Convert Fanuc Macro to Fadal Macro
    By bfoster59 in forum Fadal
    Replies: 1
    Last Post: 11-09-2007, 06:41 AM

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
  •