Results 1 to 9 of 9

Thread: Need help with a drilling macro!

  1. #1
    Registered
    Join Date
    Apr 2010
    Location
    USA
    Posts
    10
    Downloads
    0
    Uploads
    0

    Need help with a drilling macro!

    Hi guys, I'm doing research on micro drilling in shape memory alloys, and I'm trying to get a macro working that will vary the pecking increment based on a formula that uses the tool's diameter and the hole depth.

    The main program (O00023) runs fine up until the point where it calls the macro O00024. The mill I'm using is a Haas OM2, and when I copy the code from my USB to the machine, it doesn't seem to "understand" what any of the variables mean. For example, the line:

    WHILE[#2 GT #3]DO1;
    becomes commented out like this:
    (WHILE[#2 GT #3]DO1?)

    Is there something wrong with the way I have this coded, or is possible that this machine's controller is not capable of running macros? How can I check this?

    I appreciate any help! Thanks.

    -Stephen

    Here's the code in question:

    %
    O00023
    ( Stephen - Drilling Program )
    (created 06/22/11)

    N35 G00 G17 G21 G40 G90
    (STANDARD START-UP SETTINGS)

    N45 T1
    (IDENTIFIES TOOLING)

    N50 G55 G00 X0. Y0. Z1.
    (MOVES MACHINE TO STARTING COORDINATES)
    (COORDINATES SET IN LINE G55 IN OFFSETS)
    (MUST SET ZEROES ON UPPER LEFT CORNER OF PART)

    N55 G43 H01
    (CALLS OUT TOOL LENGTH COMPENSATION)

    N60 S30000 M03
    (SETS SPINDLE SPEED AND TURNS ON CLOCK-WISE)


    N70 G65 P00024 L10 A0.1 B0.0 C-0.75 D0.2 I0.4 J3.0
    (G65 CALLS FOR MACRO)
    (L10 --> NUMBER OF TIMES TO REPEAT MACRO)

    N75 G90 G55 X0. Y0. Z5.
    (RETURNS TOOL TO START POSITION)

    N80 M30
    (ENDS PROGRAM)


    %
    O00024;
    ( Stephen - Drilling Macro)
    (created 06/22/11)

    WHILE[#2 GT #3]DO1;
    (Pecking Loop Start)
    #6=#2-#4;
    (Current Peck Depth)
    IF[#6 LT #3]THEN #6=#3;
    (Sets Peck Depth to Final Depth if it overshoots)
    G00 Z#2+0.2;
    (Stands off 0.2 mm)
    G01 Z#6 F#5;
    G00 Z#1;

    #2=#2-#4;
    (Resets Hole Depth for next pass)
    #8=-1.0*#6/#7;
    (Defines aspect ratio)
    #4=#7*[-1.5*#8+19.5]/9;
    (Sets new peck increment)


    END1;
    (Pecking Loop End)


    G91 X0.2 F200.
    (MOVES INCREMENTAL DISTANCE IN X DIRECTION)
    (NOT DEPENDENT UPON COORDINATES)

    M99;
    (RETURNS TO MAIN PROGRAM)


  2. #2
    Registered
    Join Date
    Apr 2010
    Location
    USA
    Posts
    10
    Downloads
    0
    Uploads
    0
    I just looked around a little bit and noticed I'm missing the "%" on O00024 program. Hope that's not all it is...


  3. #3
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    I am not up to par on the Haas syntax but calling a macro and using a local variable of "L" when there is not one that I know of may be causing your problem.

    IIRC the "L" for number of times to repeat is used with the M98 subcall and can not be used with a macro call of G65.

    Stevo


  4. #4
    Registered
    Join Date
    Apr 2010
    Location
    USA
    Posts
    10
    Downloads
    0
    Uploads
    0
    Hmm, if I remember right the sample in the manual I was looking at used L to loop, but I'll check on it.


  • #5
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    See the attachment for more information about G65.
    Attached Thumbnails Attached Thumbnails Need help with a drilling macro!-g65.pdf  


  • #6
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    I stand corrected. I thought that you could only use the L() for repetition only with the M98 call and not the macro call.

    Thanks for the info Sinha.

    Stevo


  • #7
    Registered TXFred's Avatar
    Join Date
    Aug 2009
    Location
    Austin, TX
    Posts
    959
    Downloads
    0
    Uploads
    0
    It sounds like the original poster's Haas mill doesn't have macro language enabled.

    If I remember right, you can turn it on and get 500 hours free. After that, you have to write a check to Haas.

    Frederic
    [URL="http://www.pure-geometry.com/"]Pure Geometry LLC[/URL]
    Vertical Lathe tool holders and more.


  • #8
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    You could very well be right Fred. It does seem to appear that way. I am not familiar with what happens in the Haas when trying to use this option when it is not installed. Another thing to try is to program in MDI #1=1. And try to run it and see if you get an alarm.

    Stevo


  • #9
    Registered
    Join Date
    Apr 2010
    Location
    USA
    Posts
    10
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by TXFred View Post
    It sounds like the original poster's Haas mill doesn't have macro language enabled.

    If I remember right, you can turn it on and get 500 hours free. After that, you have to write a check to Haas.

    Frederic
    You were right. They were disabled, but I turned it on and it's working great now.


  • Similar Threads

    1. macro value in drilling cycle
      By MPTD in forum Fadal
      Replies: 0
      Last Post: 10-28-2010, 02:58 PM
    2. Help with Drilling Macro
      By gtrrpa in forum Parametric Programing
      Replies: 4
      Last Post: 12-15-2009, 12:08 AM
    3. Replies: 2
      Last Post: 03-27-2009, 04:15 PM
    4. Convert Fanuc Macro to Fadal Macro
      By bfoster59 in forum Fadal
      Replies: 1
      Last Post: 11-09-2007, 12:41 AM
    5. Drilling Macro
      By mandrew35 in forum General CAM Discussion
      Replies: 14
      Last Post: 07-07-2003, 03:58 PM

    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.