Milling macros


Results 1 to 13 of 13

Thread: Milling macros

  1. #1
    Registered
    Join Date
    Oct 2009
    Location
    USA
    Posts
    118
    Downloads
    0
    Uploads
    0

    Default Milling macros

    Can someone with an 0i control for a mill post these macros?

    Thanks


    Custom Macro B Canned Cycles
    The Custom Macro B canned cycles are fully tested examples of macros that
    you can use immediately, or copy and modify to implement your own custom
    cycles.

    O9170 Outside frame milling
    O9171 Inside frame milling
    O9172 Pocket frame milling
    O9173 Face milling
    O9174 Outside circle milling
    O9176 Inside circle milling
    O9177 Pocket circle milling
    O9179 Slot milling
    O9180 Row pattern drilling
    O9190 Rectangular frame drilling
    O9280 Bolt-hole circle drilling

    %
    O9170 (G170 OUTSIDE FRAME MILL)
    #2=#4003 (G90/G91 MODE)
    #130=#5041(INITIAL X POS)
    #131=#5042(INITIAL Y POS)
    #132=#5043(INITIAL Z POS)
    #133=#[2000+#4107](ACTIVE RADIUS)
    IF [#2 EQ 91] GOTO 3 (INCREMENTAL MODE)
    #130=0
    #131=0
    #132=0
    N3 #130=#130+#4 (FINAL X POSITION)
    #131=#131+#5
    #132=#132+#6 (FINAL Z POS - R PLANE)
    IF [#13 NE #0] GOTO 4
    #13=0
    N4 #7=#7-2*#9 (LENGTH - RADIUS)
    #8=#8-2*#9 (WIDTH - RADIUS)
    #9=#9+#13 (RADIUS+FINISH ALLOWANCE)
    IF [#14 NE #0] GOTO 5
    #14=#12 (FINISH FEED)
    N5 IF [#15 NE #0] GOTO 10
    #15=0.5*#12 (PLUNGE FEED)
    N10 IF [#16 EQ #0] GOTO 20 (STEP DEPTH)
    IF [#16 EQ 0] GOTO 20
    #23=#10/#16
    #17=FIX[#23] (ROUND OFF)
    #23=#10-#17*#16
    IF [#23 EQ 0] GOTO 25
    #17=#17+1 (NO. OF STEPS IN DEPTH)
    GOTO 25
    N20 #17=1
    #16=#10
    #23=0
    N25 G90 G00 Z#132 (MOVE TO R PLANE)
    G00 X#130 Y[#131-#8/2-#9-#11] (START POSITION)
    G41 G91 G01 X#11 F#12
    G03 X[-#11] Y#11 R#11
    (START OF MILLING CYCLE)
    N1 WHILE [#17 GT 0] DO 1
    IF [#17 GT 1] GOTO 18
    IF [#23 EQ 0] GOTO 18
    #16=#23
    N18 G01 Z[-#16] F#15(PLUNGE)
    G01 X[-#7/2] F#12 (MILL)
    G02 X[-#9] Y#9 R#9
    G01 Y#8 (WIDTH)
    G02 X#9 Y#9 R#9
    G01 X#7 (LENGTH)
    G02 X#9 Y[-#9] R#9
    G01 Y[-#8]
    G02 X[-#9] Y[-#9] R#9
    G01 X[-#7/2]
    #17=#17-1
    END 1
    N19 IF [#13 EQ 0] GOTO 30 (START OF FINISH CYCLE)
    #9=#9-#13 (DECREASE RADIUS BY FINISH ALLOWANCE)
    #11=#11+#133 (ADJUST CLEARANCE BY TOOL RADIUS)
    G03 X[-#11] Y[-#11] R#11
    G01 X[2*#11+#13]
    G03 X[-#11-#13] Y[#11+#13] R[#11+#13] F#14
    G01 X[-#7/2] (FINISH)
    G02 X[-#9] Y#9 R#9
    G01 Y#8 (WIDTH)
    G02 X#9 Y#9 R#9
    G01 X#7 (LENGTH)
    G02 X#9 Y[-#9] R#9
    G01 Y[-#8]
    G02 X[-#9] Y[-#9] R#9
    G01 X[-#7/2](END FINISH CYCLE)
    #11=#11-#133(ADJUST CLEARANCE BY TOOL RADIUS)
    N30 G03 X[-#11-#13] Y[-#11-#13] R[#11+#13] F#14
    G40 G01 X[#11/2]
    G90 G00 X#130 Z#132(Z MOVE UP)
    G#2 (PUTS BACK INTO G90/G91 MODE AS FOUND)
    M99
    %

    Similar Threads:


  2. #2
    Registered
    Join Date
    Oct 2012
    Location
    usa
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default macros

    Nice macros ! I would love to have these for slot milling. Anyone ?



  3. #3
    Registered
    Join Date
    Jan 2013
    Location
    United States
    Posts
    4
    Downloads
    0
    Uploads
    1

    Default

    Quote Originally Posted by pitri View Post
    Nice macros ! I would love to have these for slot milling. Anyone ?
    I do not currently have any slot milling macros, but would you be interested in trying out one of my 3D custom macros. Here is the first macro I ever wrote and it can machine 1/2 a sphere or cap any size radius on any size diameter.

    O7777(CAP 0-90 DEG FULL RAD. OD PART)
    (ABSOLUTE SURFACING MACRO)
    (START OF TANGENT/ TOP OF PART)
    (END OF TANGENT/ OD OF PART)
    (WORKS)

    (FORMAT G65/G66 CDTSKRZF)
    (C = #3 - CUSP HEIGHT/ DEG. OF ROTATION)
    (D = #7 - TOOL DIAMETER)
    (T = #20 - TOOL RADIUS/ BALL OR BULL)
    (S = #19 - PART DIAMETER)
    (K = #6 - PART CORNER RADIUS)
    (R = #18 - R PLANE)
    (Z = #26 - Z START ZERO)
    (F = #9 FEEDRATE)
    (******************************)

    IF[[#19/2]LT#6]GOTO1000
    #100=0
    #101=#6+#20
    #102=#3
    IF[#102GT15.]THEN#102=15.
    #102=ROUND[90./#102]
    #102=90./#102
    #103=#5001
    #104=[#103-.1]-[[#7/2]+[#19/2]]
    #105=#5002
    #113=#105
    #115=[#105+.1]+[[#7/2]+[#19/2]]
    #145=0
    IF[#7EQ[#20*2]]GOTO1
    #105=#105+[[#7/2]-#20]
    #145=#145+[[#7/2]-#20]
    N1G0G90X#104Y#115
    Z[#26+.1]
    G1Z#26F#9
    #106=#5003-#101
    WHILE[#100LE90.]DO1
    IF[#100GT90.]GOTO100
    #107=#105+[SIN[#100]*[#101]]
    #147=#145+[SIN[#100]*[#101]]
    #108=#106+[COS[#100]*[#101]]
    IF[#6EQ[#19/2]]GOTO10
    #107=#107+[[#19/2]-#6]
    #147=#147+[[#19/2]-#6]
    N10#100=#100+#102
    G1Z#108F#9
    G41Y#107
    X#103
    G02J-#147
    G03X[#103+.1]Y[#107+.1]J.1F[#9/2]
    G0Z[#108+.1]
    G40X#104
    END1
    N100G0G90Z#18
    X#103Y#113
    M99
    N1000M00( PART CORNER RAD. TOO BIG )



  4. #4
    Registered
    Join Date
    Sep 2009
    Location
    US
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default Re: Milling macros

    Hi everyone,

    So I have been wanting to create a macro for pocketing starting in the center of the pocket, and I'd like to dedicate variables for certain call outs, such as pocket length in x, pocket length in y, z depth, tool stepover, pass per depth, corner radius, etc.. My problem is I'm struggling with how to start out my sub routine so my cutter starts on center and my tool will stepover the amount I specified in a variable. Below is what I will be calling out for variables. Any help or thoughts on this would be greatly appreciated.

    #124= #24 ( X CENTER )
    #125= #25 ( Y CENTER )
    #126= #26 ( Z CENTER )
    #104= #4 ( I OR X LENGTH )
    #105= #5 ( J OR Y WIDTH )
    #106= #6 ( K OR Z DEPTH )
    #118= #18 ( R OR CORNER RADIUS )
    #117= #17 ( Q OR DEPTH OF EACH PASS )
    #121= #21 ( U OR DEPTH OF FINISH PASS )
    #120= #20 ( T OR TOOL NUMBER )
    #109= #9 ( F OR CUTTING FEED RATE )
    #108= #8 ( E OR PLUNGE FEED RATE )
    #107= #7 ( D OR PERCENT OF CUTTER DIA )



  5. #5
    Member
    Join Date
    May 2017
    Location
    United States
    Posts
    2
    Downloads
    0
    Uploads
    0

    Default Re: Milling macros

    Newbee!
    Is there such a thing as macros for dummies?
    I also need help with using the Renishaw probe on my Haas VF-5, can anyone point me in the right direction?



  6. #6
    Registered
    Join Date
    Sep 2009
    Location
    US
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default Re: Milling macros

    DynoDean

    what do you need help with on the probe?



  7. #7
    Member
    Join Date
    Feb 2018
    Location
    United Kingdom
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default Re: Milling macros

    Hello James
    That is a nice 1/2 Sphere Program you have got there. Is there any chance you can do a Mach 3 friendly version. As it stands Mach 3 doe's not like the IF statement in the program.



  8. #8
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    3286
    Downloads
    0
    Uploads
    0

    Default Re: Milling macros

    hy pkcnc, i have many parametric codes ... if you wish, i can create one for you

    i don't have experience with mach 3, but i can start by generating the toolpath, then customize it with mach 3 g-code syntax ( considering that you provide it )

    doe's not like the IF statement
    this means that you can not write all the logic inside the machine program, thus i guess that mach3 uses only linear code

    so, all the logic has to be somewhere else, like in a software application ... no problem, consider it done to begin, i need to know part shape before and after operation + tool shape

    raise by handling inner self conflicts, then even more, by trying not to be alone; emotions is all that truly matters ... war against awareness started more than a lifetime ago


  9. #9
    Member
    Join Date
    Feb 2018
    Location
    United Kingdom
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default

    Hello
    Basic shape is 1/2 a sphere, diameter is 100mm. Using a ball endmill 12mm diameter. Would be great if it can be done. The sphere is machined from a block 120 x 120 x120mm.



  10. #10
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    3286
    Downloads
    0
    Uploads
    0

    Default Re: Milling macros

    so you wish for half a sphere, with diameter 100 ? tool o12 ? ok

    if i give you the toolpath in xyz, can you make it work on your machine ? because i can't, i don't know the g-code for mach3

    also, please choose a strategy :
    ... cut a circle, then make a step in Z, cut another circle, then make a step in Z, and so on
    ...... or
    ... continous helix

    The sphere is machined from a block 120 x 120 x120mm.
    i can deliver a parametric for the finishing

    for roughing it would take me longer ... hmm ... what do you say ? are you ok only with finishing ? kindly

    raise by handling inner self conflicts, then even more, by trying not to be alone; emotions is all that truly matters ... war against awareness started more than a lifetime ago


  11. #11
    Member
    Join Date
    Feb 2018
    Location
    United Kingdom
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default

    Hi Toolpaths will be fine. Z step strategy for roughing out. And the continous helix for finishing if you can. Thanks.



  12. #12
    Member
    Join Date
    May 2017
    Location
    United States
    Posts
    2
    Downloads
    0
    Uploads
    0

    Default Re: Milling macros

    I posted this in 2017, I just got a responce this week and it was to the post below this one?
    Anyway I am looking for a soft wear program to use my Renishaw probe on my VF-5 for reverse engineering parts. A point cloud that can be turned into a solid.
    I want to output from the Haas controler to my laptop drawing program (BOB/CAD CAM)



  13. #13
    Member lucaswalker's Avatar
    Join Date
    Sep 2018
    Posts
    25
    Downloads
    0
    Uploads
    0

    Default Re: Milling macros

    Quote Originally Posted by DynoDean View Post
    I posted this in 2017, I just got a responce this week and it was to the post below this one?
    Anyway I am looking for a soft wear program to use my Renishaw probe on my VF-5 for reverse engineering parts. A point cloud that can be turned into a solid.
    I want to output from the Haas controler to my laptop drawing program (BOB/CAD CAM)
    Hi,

    I think MeshLab can do the job, and its free !

    You have to create a valid .xyz file from your point cloud, then search for the following page : "How to Create an STL file from a XYZ file in MeshLab" which give the procedure to obtain an stl from the point cloud.

    The resulting stl can be imported in any CAD i think.



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

Milling macros

Milling macros

Milling macros