587,890 active members*
3,016 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Fadal > Noob Drill Grid Pattern Macro Question
Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2006
    Posts
    8

    Noob Drill Grid Pattern Macro Question

    Hey guys, I was told/volunteered to run an Fadal at our shop. All I know about running VMCs is what i read in the manual, and learned from building my own home brewed stepper mill. So please have mercy and don't laugh at me too hard.

    Simple job drill some holes, 20 on X and 25 on Y, with .236" spacing between them. I can do it no problem when I program in absolute or incremental. Thing is programs tend to get long and I need to keep them in the control with very limited memory. I wanted to use macros but ran into some issues. My first hole gets drilled where I want, but all other rows are one hole short and shifted .236" on the X.

    Can anyone tell me what am I doing wrong? I just need it to be all square,

    Thanks in advance,

    KOzOK


    Heres the code,

    G90 G80 G40 G0 Z0
    M6 T4
    S2000 M3 M8
    G0 X0 Y0 E48
    Z.1 H4
    G81 X0 Y0 Z-0.025 R0.1 G98 F20.
    R9+0.0 R8+0.0
    #CLEAR
    #:LOOP
    #V1=V1+1
    #R9=R9+.236
    X+R9 Y+R8
    #IF V1<=19 THEN GOTO :LOOP
    #V1=0
    #V2=V2+1
    #R9=0
    #R8=R8+.236
    #IF V2<=24 THEN GOTO :LOOP

  2. #2
    Join Date
    Mar 2005
    Posts
    143
    Looks like it should work, if it will deal with the macros during the canned cycle.

    You could also use the macros to move the XY and call a subroutine at each position - sub would only be the drill cycle.

    There is a way to do this with just a couple of lines....

    I *think* this will work - i know I've done similar before but don't have my notes with me.

    G90 G80 G40 G0 Z0
    M6 T4
    S2000 M3 M8
    G0 X0 Y0 E48
    Z.1 H4
    G81 X0 Y0 Z-0.025 R0.1 G98 F20.
    G91
    X+.236 L20
    Y+.236 L25
    G80

    L20 & L25 may have to change to L19 &L24. Also, the first hole may or may not be at X0 Y0 depending on how the params are set.
    It may make a .236,.236 move before drilling.

  3. #3
    Join Date
    Mar 2003
    Posts
    900

    Smile

    Shizzlemah--
    Your program will make an "L" shped row of holes. It will do 20 holes in the X plus axis and then another 25 holes in the Y plus axis.
    I would suggest putting an L100 sub routine witha u-shped pattern and then calling an L1xx to make the number of Y rows required.
    The Macro approach is cleaner. As soon as I get a break, I will prove out the macro version and make any corrections necessary.

    Neal

  4. #4
    Join Date
    Mar 2003
    Posts
    900
    OK, guys--
    The macros program works correctly in Format 2. In Format 1 you get one extra hole at the beginning. Here is what I tested:
    %
    O3939( MACRO ARRAY PRG
    G90 G80 G40 G0 Z0
    M6 T4
    S2000 M3 M8
    G0 X0 Y0 E48
    Z.1 H4
    G81 X0 Y0 Z-0.025 R0.1 G98 F20.
    R9+0.0 R8+0.0
    #CLEAR
    #:LOOP
    #V1=V1+1
    #R9=R9+.236
    X+R9 Y+R8
    #IF V1<=19 THEN GOTO :LOOP
    #V1=0
    #V2=V2+1
    #R9=0
    #R8=R8+.236
    #IF V2<=24 THEN GOTO :LOOP
    G0 G80
    X0 Y0 Z0 H0 E0
    M2
    %

    Neal

  5. #5
    Join Date
    Mar 2005
    Posts
    143
    Ok here is my extra crappy program to do this...

    N4G90M6T3(M6=3/8 2FL)
    N5S4650M3M7
    N6E3X0Y0D3Z1.
    N7G0Z0.1
    N8G91
    N9G81R+0Z-0.1875F10.
    N10G91X0.25L9(FIRST ROW)
    N11G91X-2.25Y-0.25L0(INDEX)
    N12G91X0.25L9(SECOND)
    N13G91X-2.25Y-0.25L0
    N14G91X0.25L9(THIRD)
    N15G91X-2.25Y-0.25L0
    N16G91X0.25L9(4TH)
    N17G91X-2.25Y-0.25L0
    N18G91X0.25L9(5TH)
    N19G91X-2.25Y-0.25L0
    N20G91X0.25L9(6TH)
    N21G91X-2.25Y-0.25L0
    N22G91X0.25L9(7TH)
    N23G91X-2.25Y-0.25L0
    N24G91X0.25L9(8TH)
    N25G91X-2.25Y-0.25L0
    N26G91X0.25L9(9TH)
    N27G91X-2.25Y-0.25L0
    N28G91X0.25L9(10TH)
    N29G91X-2.25Y-0.25L0
    N30G91X0.25L9(11TH)
    N31G91X-2.25Y-0.25L0
    N32G91X0.25L9(12TH)
    N33G91X-2.25Y-0.25L0
    N34G91X0.25L9(13TH)
    N35G91X-2.25Y-0.25L0
    N36G91X0.25L9(14TH)
    N37G91X-2.25Y-0.25L0
    N38G91X0.25L9(15TH)


    Hey look, it's ugly code !!

  6. #6
    Join Date
    Dec 2006
    Posts
    8

    Smile

    Thanks for quick reply guys, i really appreciate it! I will give it a shot tommorow and let you all know how it went. Thanks again!

  7. #7
    Join Date
    Dec 2006
    Posts
    8
    :violin:
    Hey guys it's me again with same old story, it doesn't work. I tried using Neals program, in Format 2 , that didn't work. Gives me same exact results, extra hole in the beginning. My fixture x,y is set to first hole of my drill pattern. Also I switch to format 2 by doing SETP command, I'm not sure if that's correct way to do it. I appreciate any ideas guys,

    TIA,

    KOzOK

  8. #8
    Join Date
    Jan 2004
    Posts
    3154
    I believe that you need to CS the machine to reset the changes made. To be sure I like to completely power down when changing parameters.
    Although I have never changed formats, just an educated guess.
    www.integratedmechanical.ca

  9. #9
    Join Date
    Dec 2006
    Posts
    8
    Quote Originally Posted by DareBee View Post
    I believe that you need to CS the machine to reset the changes made. To be sure I like to completely power down when changing parameters.
    Although I have never changed formats, just an educated guess.
    Yeah I did do that, still no go. Machine does tell me that it's in format 2 . Blah I'll just go back to incremental ugly code, but it's such a PITA and I'am so lazy .

    KOzOK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •