Results 1 to 3 of 3

Thread: macro - motion pauses each loop

  1. #1
    Registered
    Join Date
    Jun 2006
    Location
    usa
    Posts
    247
    Downloads
    0
    Uploads
    0

    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
    Registered
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    11985
    Downloads
    0
    Uploads
    0
    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
    Registered
    Join Date
    Jun 2006
    Location
    usa
    Posts
    247
    Downloads
    0
    Uploads
    0
    '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. Need Help!- Spiral tool path from two circular motions
    By seapeace in forum Mastercam
    Replies: 8
    Last Post: 06-25-2008, 06:58 PM
  2. question on closed loop vs open loop (servo systems)
    By boonie in forum Servo Motors and Drives
    Replies: 20
    Last Post: 11-09-2007, 01: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, 09:57 AM
  4. Lathe conversion - open loop vs closed loop
    By bhowden in forum General Metal Working Machines
    Replies: 7
    Last Post: 03-21-2006, 04:56 PM
  5. Unusually long pauses
    By NeoMoses in forum Machine Problems, Solutions , Wireless DNC, serial port
    Replies: 10
    Last Post: 04-25-2003, 05:31 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.