588,190 active members*
4,767 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Haas Machines > Haas Mills > macro - motion pauses each loop
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Posts
    247

    macro - motion pauses each loop

    I'm trying to get a macro working that mills a helical bore
    I've wrote it with two different methods, and the motion still pauses at the end of each loop
    each loop being the next helical move incrementally down in Z

    The call looks like this:
    G65 P9012 X0 Y0 Z1. D2. R0. T.5 Q.1 F10.

    X,Y = center of bore
    Z = depth
    D = diameter
    R = top of bore
    T = tool diameter
    Q = depth increment
    F = feedrate

    the first method uses a subroutine and L count:

    Code:
    %
    O09012 
    #26= ABS[ #26 ] 
    #100= ROUND[ #26 / #17 ] 
    IF [ #100 LT [ #26 / #17 ] ] THEN #100= #100 + 1 
    #101= #26 / #100 
    #102= 0 - #101 
    #103= 1 
    #104= [ #7 / 2 ] - [ #20 / 2 ] 
    
    G00 X#24 Y#25 
    Y [ #25 + #104 ] 
    Z [ #18 + 0.1 ] 
    G03 I#104 Z#18 F#9 
    M97 P1000 L#100 
    G03 I#104 F#9 
    G00 Y#25 Z [ #18 + 0.1 ] 
    M30 
    N1000 
    G91 
    G03 I#104 Z#102 F#9 
    G90 
    M99 
    %
    the second uses an IF loop with a counter variable:

    Code:
    %
    O09012
    #26 = ABS[ #26 ]						
    #100 = ROUND [ #26 / #17 ]					
    IF[#100 LT [ #26 / #17 ] ] THEN #100 = #100 + 1  
    #101 = #26 / #100 					
    #102 = 0 - #101 							
    #103 = 1 						
    #104 = [ #7 / 2 ] - [ #20 / 2 ]					
    
    G00 X#24 Y#25 			
    Y [ #25 + #104 ]		
    Z [ #18 + 0.1]			
    G2 I#104 Z#18 F#9 		
    N1 
    IF [ #103 GT #100 ] GOTO 75 	
    G2 I#104 Z#102 F#9 			
    #102 = #102 - #101 			
    #103 = #103 + 1 			
    GOTO 1 						
    N75 
    G2 I#104 F#9 
    G00 Y#25 Z [ #18 + 0.1 ] 	
    M30
    %
    anybody got some help for me?
    it'd be much appreciated

  2. #2
    Join Date
    Jul 2005
    Posts
    12177
    Why did you write a macro for helical motion when Haas has this capacity in G02 and G03?

    G91 G03 I0. J-j.j Z-z.z L10

    Gives you ten circles of radius j.j going down a distance of z.z for each circle for a total depth of 10z.z.

    G90 G03 I0. J-j.j L1

    Takes the helical ramp out at the bottom (the L1 is actually redundant).
    An open mind is a virtue...so long as all the common sense has not leaked out.

  3. #3
    Join Date
    Jun 2006
    Posts
    247
    'cuz I wanna

    no seriously,
    I convert a lot of programs from my Tree machine w/ A2100 controller and it has a circular pocket canned cycle G26
    So I'm gonna alias this macro to G26 in the Haas and set up the variables to be as close to the tree configuration as possible, thereby eliminating as much editing as possible.
    Besides that, its quicker and easier type in the diameter and depth than it is to figure the J value and Z / L.
    I try to do stuff like this to make programming at the machine as quick and error - proof as possible - for me and the guys I train.

    Plus this macro is gonna evolve:

    It'll have a finish pass for one, with arc on and arc off

    it'll also have cycle types such as:
    -rough and finish each increment
    -rough each increment and finish at final depth
    -helical entry
    -pre-drilled hole entry

Similar Threads

  1. Spiral tool path from two circular motions
    By seapeace in forum Mastercam
    Replies: 8
    Last Post: 06-25-2008, 11:58 PM
  2. question on closed loop vs open loop (servo systems)
    By boonie in forum Servo Motors / Drives
    Replies: 20
    Last Post: 11-09-2007, 07:30 PM
  3. Macro WHILE DO END Loop (Lathe)
    By Jorge-D-Fuentes in forum G-Code Programing
    Replies: 18
    Last Post: 07-25-2007, 02:57 PM
  4. Lathe conversion - open loop vs closed loop
    By bhowden in forum Uncategorised MetalWorking Machines
    Replies: 7
    Last Post: 03-21-2006, 10:56 PM
  5. Unusually long pauses
    By NeoMoses in forum DNC Problems and Solutions
    Replies: 10
    Last Post: 04-25-2003, 10:31 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
  •