600,772 active members*
2,736 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Benchtop Machines > GCode for peck drilling starts,but stops working properly
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2009
    Posts
    9

    GCode for peck drilling starts,but stops working properly

    This one has me stumped! Running Mach 3 on Sherline 2000 mill, using Windows 10 desktop. Project is drilling (81) 1mm holes around a 4x5 inch aluminum 1/4" plate. Drawn in CamBam 1.0, in millimeters which produced the gcode. When the code in run in mach 3, the following happens...

    At line 13 of code, the spindle has already moved to over the starting hole. As the spindle starts to descend from the 8mm Z height towards the goal of Z-14. The spindle stops downward movement at +2.9xxmm although the stepper (hand-wheel) continues to turn! I tried it several times and the spindle repeatedly get down to the +2.9xx mm (the last few digits change) mark and stops downward movement. This occurs at line 16 of the below first 20 lines of code. Further, I found nothing loose in the spindle and the Z axis works perfectly when moved up or down with either the MDI, or Dongle (TAP key) in Mach 3.

    I am only a hobbyist, but not a newbie, but this one is beyond my pay grade!! Any suggestions would be greatly appreciated!!
    Bob

    1: G21
    2: ( Made using CamBam - CamBam CNC Software )
    3: ( Stitch Plates for Wallet 4/9/2025 10:48:50 AM )
    4: ( Post processor: Mach3 )
    5: ( T0 : 1.0mm , T4 : 6.35mm )
    6: G90 G64 G40
    7: G91.1
    8: G0 Z8.0
    9: M0
    10: ( Stitch Holes = T0 )
    11: G17
    12: G0 X5.0 Y5.0
    13: G83 X5.0 Y5.0 Z-14.0 Q0.75 F30.0
    14: G83 Z-14.0
    15: G83 X11.0 Z-14.0
    16: G83 X17.0 Z-14.0

  2. #2
    Join Date
    Aug 2009
    Posts
    9

    Re: GCode for peck drilling starts,but stops working properly

    I made an error in 2d paragraph, 3d line. Should read "This occurs at line 13 of the below first 20 lines of code." Sorry!
    Bob

  3. #3
    Join Date
    Aug 2009
    Posts
    9

    Re: GCode for peck drilling starts,but stops working properly

    Apparently CamBam wrote the code incorrectly! I deleted the redundant lines, 12 & 14 and the problem disappeared!
    Bob

  4. #4
    Join Date
    Nov 2013
    Posts
    4961

    Re: GCode for peck drilling starts,but stops working properly

    Hi,
    you might get away with that code in Mach3 but it would not wash in Mach4. Mach4 follows the ANSI Gcode standard rather more closely, whereas Mach3 allowed shortcuts.

    In particular G83 is a 'canned cycle' and it is modal. That is to say that when a G83 block is encountered that becomes the prevailing motion mode of the machine until another modal block, say G0 or G2 comes along.

    In Mach4 and Fanuc21i on which Mach4 is modelled, if you use a G83 then ALL the parameters are required, i.e. X,Y,Z,Q and F. If one of those parameters is missing then the block would fail.
    A second and subsequent G83 pecking cycle, now that is the current motion mode need ONLY those parameters that change, and most specifically do not place a G83 in the second and subsequent blocks.

    For example:

    13: G83 X5.0 Y5.0 Z-14.0 Q0.75 F30.0

    15: X11.0 Z-14.0
    16: X17.0 Z-14.0

    17 X25 Y10
    18 X35 Y20
    19 X45 Y30 Z10

    I added lines 17,18 and 19 just for illustration. The code would produce a G83 peck cycle at x=5, y=5 with parameters z=-14, Q=0.75 and F=30
    Line 15 would repeat the cycle but at x=11, y=5 , z=-14, Q=0.75, F=30
    Line 16 would repeat the cycle but at x=17, y=5 z=-14, Q=0.75, F=30
    Line 17 would repeat the cycle but at x=25, y=10, z=-14, Q=0.75, F=30
    Line 18 would repeat the cycle but at x=35, y=20,z=-14, Q=0.75, F=30
    Line 19 would repeat the cycle but at x=45, y=30, but with z changed to z=-10, Q=0.75, F=30

    Not at all difficult to follow. Its been 10 years since I used Mach3, but believe it will operate in this way, even though it would tolerate an incomplete G83 block.
    Mach4, and many other controllers will not tolerate an incomplete G83. If you encounter a fault you might try this method of coding, it is after all how Gcode is supposed to work formally.

    Craig

  5. #5
    Join Date
    Aug 2009
    Posts
    9

    Re: GCode for peck drilling starts,but stops working properly

    Craig,
    Although I got the code to work by deleting lines 12 & 14, it sounds very close (if not spot on) to the guidance you provided!! Thank you! I also will be sending an email to CamBam, as it was their software that wrote the program.
    I also will be upgrading to Mach 4 in the near future. The guidance you provided will not be forgotten! THANKS!
    Bob

  6. #6

    Re: GCode for peck drilling starts,but stops working properly

    where is the rapid plane height (R)? X,Y,Z,R,F,Q

Similar Threads

  1. Drilling Techniques - Peck, no peck, etc
    By travisn in forum Drilling
    Replies: 8
    Last Post: 01-11-2022, 01:59 PM
  2. Replies: 1
    Last Post: 02-19-2015, 04:16 AM
  3. Make smoth starts and stops?
    By flyingpickles in forum Mach Software (ArtSoft software)
    Replies: 2
    Last Post: 02-12-2015, 11:37 PM
  4. Combining peck drilling cycle with deep hole peck
    By adams4182 in forum G-Code Programing
    Replies: 3
    Last Post: 07-28-2013, 09:07 PM
  5. M-Stops and starts
    By shane.vella in forum Machines running Mach Software
    Replies: 1
    Last Post: 09-25-2008, 07:48 PM

Tags for this Thread

Posting Permissions

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