Connect with us

CNC Machine Help

Discussion in 'Project Construction Technologies' started by zanzan, Jun 7, 2016.

  1. zanzan

    zanzan

    5
    0
    Dec 6, 2014
    I am having issues with a CNC machine (grbl arduino) I recently purchased. My machine does not raise from the zero position to the first cutting point, it drags along the board and messes up my work. Any idea why that happens?


    2016-06-06_0-40-00.png
    This is what I am
    attempting to achieve

    2016-06-06_0-29-25.png
    This is how it looks in GRBL Controller Visualizer
    20160606_003822.jpg
    result when engraved.
     
  2. Minder

    Minder

    2,854
    593
    Apr 24, 2015
    Would need the relevent G-code for that portion of the move.
    If the top of your board is 0, then the tool requires a move in the minus to clear the board.
    M.
     
  3. zanzan

    zanzan

    5
    0
    Dec 6, 2014
    This is the GCODE


    %
    ( CopperCAM - 25/03/2016 / ISO-Mill Output )
    ( C:\COPPERCAM\CopperCAM.iso created 06/06/2016 at 21:06 )
    ( Workpiece dimensions: 35.563 x 30.323 x 1 mm )
    G21 G40 G54
    G80 G90 G94
    T1 M06 ( Basic Engraver )
    M03 S9000
    M07
    G00 X-4.291 Y16.566
    G00 Z0
    G01 F900 Z-0.25
    G01 F600 Y6.225
    G01 X-4.854 Y5.924
    G01 X-5.441 Y5.441
    G01 X-5.924 Y4.854
    G01 X-6.225 Y4.291
    G01 X-21.646
    G01 X-21.861 Y4.694
    G01 X-22.344 Y5.281
    G01 X-22.931 Y5.764
    G01 X-23.601 Y6.122
    G01 X-23.812 Y6.186
    G01 Y16.638
    G01 X-23.249 Y16.939
    G01 X-22.661 Y17.421
    G01 X-22.179 Y18.009
    G01 X-21.878 Y18.572
    G01 X-6.137
    G01 X-6.122 Y18.521
    G01 X-5.764 Y17.851
    G01 X-5.281 Y17.264
    G01 X-4.694 Y16.781
    G01 X-4.291 Y16.566
    G00 Z2
    G00 X-5.98 Y21.753
    G00 Z0
    G01 F900 Z-0.25
    G01 F600 X-5.764 Y22.159
    G01 X-5.281 Y22.746
    G01 X-4.694 Y23.229
    G01 X-4.024 Y23.587
    G01 X-3.296 Y23.808
    G01 X-2.54 Y23.882
    G01 X-1.784 Y23.808
    G01 X-1.056 Y23.587
    G01 X-0.386 Y23.229
    G01 X0.201 Y22.746
    G01 X0.684 Y22.159
    G01 X1.042 Y21.489
    G01 X1.262 Y20.761
    G01 X1.337 Y20.005
    G01 X1.262 Y19.249
    G01 X1.042 Y18.521
    G01 X0.684 Y17.851
    G01 X0.201 Y17.264
    G01 X-0.386 Y16.781
    G01 X-1.056 Y16.423
    G01 X-1.109 Y16.407
    G01 Y6.225
    G01 X-0.546 Y5.924
    G01 X0.041 Y5.441
    G01 X0.524 Y4.854
    G01 X0.882 Y4.184
    G01 X1.102 Y3.456
    G01 X1.177 Y2.7
    G01 X1.102 Y1.944
    G01 X0.882 Y1.216
    G01 X0.524 Y0.546
    G01 X0.041 Y-0.041
    G01 X-0.546 Y-0.524
    G01 X-1.216 Y-0.882
    G01 X-1.944 Y-1.102
    G01 X-2.7 Y-1.177
    G01 X-3.456 Y-1.102
    G01 X-4.184 Y-0.882
    G01 X-4.854 Y-0.524
    G01 X-5.441 Y-0.041
    G01 X-5.924 Y0.546
    G01 X-6.225 Y1.109
    G01 X-21.487
    G01 X-21.503 Y1.056
    G01 X-21.861 Y0.386
    G01 X-22.344 Y-0.201
    G01 X-22.931 Y-0.684
    G01 X-23.601 Y-1.042
    G01 X-24.329 Y-1.262
    G01 X-25.085 Y-1.337
    G01 X-25.841 Y-1.262
    G01 X-26.569 Y-1.042
    G01 X-27.239 Y-0.684
    G01 X-27.826 Y-0.201
    G01 X-28.309 Y0.386
    G01 X-28.667 Y1.056
    G01 X-28.888 Y1.784
    G01 X-28.962 Y2.54
    G01 X-28.888 Y3.296
    G01 X-28.667 Y4.024
    G01 X-28.309 Y4.694
    G01 X-27.826 Y5.281
    G01 X-27.239 Y5.764
    G01 X-26.994 Y5.895
    G01 Y16.638
    G01 X-27.556 Y16.939
    G01 X-28.144 Y17.421
    G01 X-28.626 Y18.009
    G01 X-28.984 Y18.679
    G01 X-29.205 Y19.406
    G01 X-29.28 Y20.163
    G01 X-29.205 Y20.919
    G01 X-28.984 Y21.646
    G01 X-28.626 Y22.316
    G01 X-28.144 Y22.904
    G01 X-27.556 Y23.386
    G01 X-26.886 Y23.744
    G01 X-26.159 Y23.965
    G01 X-25.403 Y24.039
    G01 X-24.646 Y23.965
    G01 X-23.919 Y23.744
    G01 X-23.249 Y23.386
    G01 X-22.661 Y22.904
    G01 X-22.179 Y22.316
    G01 X-21.878 Y21.753
    G01 X-5.98
    G00 Z2
    M09
    M05
    M02
    %
     
  4. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    How do you generate the GCode?
    You need to update your post processor...

    Look at the following:

    %
    G21 G40 G54 '''Options Set
    G80 G90 G94 '''Options Set
    T1 M06 ( Basic Engraver ) '''Set Spindle (Or Tool number)
    M03 S9000 '''Set Spindle RPM
    M07
    G00 X-4.291 Y16.566 '''Move to First XY Coord.
    G00 Z0 '''Move to Z0
    G01 F900 Z-0.25 '''Begin First Cut
    G01 F600 Y6.225
    G01 X-4.854 Y5.924
    G01 X-5.441 Y5.441
    .....
    G01 X-5.98 '''Last Cut Move
    G00 Z2 '''Move Away from bed
    M09
    M05
    M02
    %


    GCode is easy to learn
    G0 = Rapid Movements.
    G1 = Feed Movements.
    From the looks of things, the cutting height is adjusted with the 'Z' axis movement.

    Can you please confirm operation of your CNC machine?
    Does the Bit lower itself first... Then move before cutting?
    Or does the bit simply just move to the first cut location without adjusting it's height? (Most likely)

    From the looks of things, if the CNC bit is manually raised off the work piece *first* before you run the file, then it would not drag across the material like it has... But that's unreliable.
    Adjust the post-processor or program you are using to automatically raise the cutting head before the first G00 move has been issued. This will save you a lot of future head-ache.

    Please feel free to post your post-processor or screenshots of the settings and I can help you work through them.
     
    zanzan likes this.
  5. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Minus move would result in a deeper gouge in the material... too far, and it would cut into the table (or bed).
    I'm aware of different CNC setups, but assuming -Z movement is the solution without seeing example code is a little dangerous.
     
  6. Minder

    Minder

    2,854
    593
    Apr 24, 2015
    Correction, my mind was else where, the standard Cartesian coordinates is of course the Z moves UP in the +.
    Also in my opinion the initial Z should be positioned First to a posn above the work before the XY move, the Z could be at any position at that point.
    If unsure where the +Z is needed, do a dry run with no tool in the spindle and it should show up immediately.
    M.
     
    Gryd3 likes this.
  7. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Preferably before the spindle is turned on, but always before the first XY move.
    I would personally try inserting 'G00 Z2' After the T1 M06 line, immediately before the spindle speed set line... but would honestly like to see it much sooner.

    (It's not uncommon to return all of the CNC axis to a known location early on in the program. At least returning the Z axis to something known...)
     
  8. Minder

    Minder

    2,854
    593
    Apr 24, 2015
    Similar as when I set a mill or gantry machine up for individual as well as All-Axis option homing routine, I make sure the Z homes first and then XY together..
    M.
     
    Last edited: Jun 8, 2016
    Gryd3 likes this.
  9. zanzan

    zanzan

    5
    0
    Dec 6, 2014
    Thank you very much. I am playing around with Z0 and getting good results. I will let you know if it works perfectly.
     
  10. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Caution here though... The first G00 Z0 line I highlighted occurs *after* the first XY movement...

    G00 X-4.291 Y16.566 '''Move to First XY Coord.
    G00 Z0 '''Move to Z0

    These two lines are the first two movement lines in the Gcode you shared above.
    If you simply modify that Z0 to something else, the machine may still drag the bit through the material or along the CNC bed.
    It would be best to place an 'additional' line before this.

    G00 == Rapid Movement. ( Can move one or more Axis at the same time by using X, Y, or Z followed by the *position/Distance for each Axis)

    G00 Z2 ''' will Rapid Move the Z-Axis to 2mm high (or 2mm higher depending on operation mode)

    Easiest would be to put this Immediately before the "First XY Coord." movement.
    The rest of your code looks fine. The Code does move the cutting tool up by itself after a cut, and between cuts, so this should only be necessary before the very first move.


    Typical CNC GCode programs start with a number of 'G' and 'M' codes . This is typically the 'setup block' of the file which is supposed to 'cancel' any previous modes, and 'set' the modes required for the file.
    An example of this is 'G21' used at the very beginning. This sets the operation mode to 'mm' ... otherwise if you had previously operated in Inches, your program could end up wrong.
    After these 'mode-set' commands, the machine is typically moved 'rapidly' to it's beginning position with the G00 command . Look for this!
    If there is a G00 command that moves the X and|or Y direction *before* a G00 command that moves the Z direction, you may have a problem.
    After this first move, the machine typically 'feeds' into the material with the G01 command. This command can and often will have all 3 axis (X, Y and Z) but may only have Z when operated on the Type of CNC you have.

    GCode is simply a list of instructions and moves for the machine to make. Once you understand that G00 is 'rapid' and G01 is 'Feed' ... you should be able to read the file manually to determine if the machine makes any odd moves, or to determine what may have gone wrong.
    G00 should *never* make a move that would touch the material or table... This is a 'rapid' move and is often much too fast for the bit... This can result in damage to the bit or machine.
    Only the G01 command should issue a move that may touch the material.
     
    zanzan likes this.
  11. zanzan

    zanzan

    5
    0
    Dec 6, 2014
    Good day, I have been able to rectify the dragging issue by following your solution. However, I have another issue. When I generate a gcode, the spindle is expected to move to Z0 and then engrave 0.25mm into the board (Z-0.25) but my machine's Z axis ranges from 20 to -9.9 and 13.5 is where my spindle touches the PCB's surface. Is there a way that I could make Z13.725 my standard engraving position. I know I could manually change all Z-0.250 to 13.725 but that can be tiring if the code is very long. I am using a very cheap CNC machine.
     
  12. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    You should be able to 'home' or 'zero out' your CNC machine.

    There are couple different ways of doing this... from manually jogging the CNC bit down until it *just* touches the material and manually running "G92 Z0" . This will Over-ride and set the *current* CNC machine Z-Axis position to *read* and function as the new 0.

    However... The 'G54' at the beginning of your program set's a "Local Work piece" offset which may 'undo' this manual set. Please take a look at your CNC *controller* and look for anything related to 'Offsets', or mentions of G52 to G59 .

    *We are looking for a set of X, Y, and Z numbers that we can adjust to that the CNC machine *thinks* that the Z0 position is where you want it. This will greatly simplify things, as you can write all of your programs to reference the top of your material to 0, and cut at Z-0.250 without having to much around with the CNC files after it is made.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-