CNC Scrubbing Workpiece When Not Cutting

I’m currently having a problem with the cnc bit cutting the workpiece when it’s supposed to be traveling without cutting. I’ve set the Jog Height to 10mm, but it’s not anything like 10mm above the surface when it’s jogging. Any ideas on what else to try?

I assume you’re using Luban.

How are you setting your z origin before you start the job?

-S

Good morning S,

Yes, using Luban. To set the work origin, I do the following sequence:

  1. Clamp the work-piece to the base plate using the included clamps, using a pre-marked center on the work-piece to aid in getting it approximately aligned;
  2. I then select a file and press start;
  3. the Snapmaker shows the work orgin setting screen;
  4. I move the CNC head using the left-right, front-back and up-down on screen buttons;
  5. When I have centered the CNC head and moved it down so that a piece of paper, or the reference card car just be withdrawn, but wrinkles when pushed forward, as described in the tutorial video, I press the “set origin” button.

I do not have any values entered in Luban.in the x-y-z adjustment box on the workspace screen. I do set the target depth to be 6 mm. I’m using 1/4" plywood for my tests. Once this runs correctly on that scrap material, I will actually run the production cuts on 1/4" Oak project boards. (These two are slightly different thicknesses, but both will easily accommodate the .3mm deep recess I am creating. The project is to inlay a standard poker sized playing card into a panel that will be the lid of a box. I have used Fusion 360 for the design and I move the object to Luban in an STL file.

BTW: I was able to complete the phone holder test project. In fact, I have also used the 3D printer and laser cutter successfully too, so the basics are working. I have downloaded and modified a project for the 3D printer and made successive change arriving at a design which works well there for another production project. (I only say this so you know that I am achieving results in general but not currently with, what I thought, is a simple CNC project.

As a side note, is there an explanation of the x-y-z offset settings and what they are used for?

Good afternoon S,

G-Code Analysis of Playing Card Recess G-Code

I think I see the problem. As I’m looking at the G-code, it’s moving the bit (G0 command) after setting the height to zero (G0 Z0.00). It should never be doing that. All G0 commands should be executed above the surface, not at the surface. This explains why it drags its feet across the face of the work piece. Here is a photo of the resulting face of the work piece. The red brace shows the area that should NOT be touched by the tool. It shouldn’t be traveling over that area at all. It never cuts over there or shouldn’t anyway and it’s a waste of time.

[IMG_6473.jpg]
G-Code Breakdown

Here is the G-Code and my parenthetical analysis of what it is doing:

G90 (sets mode to absolute commands using origin, rather than relative to tool position)

G0 Z10.00 F1500 (zip to Z=10.00 mm, above the work surface, Z=0.00 is the face of the work piece)

G0 X-49.40 Y-49.40 (move to -49.40, -49.40 which is the lower lefthand corner of the 100x100 mm work piece)

G0 Z4.00 (move the bit to 4mm above work piece)

M3 P100 (Not sure what this does)

G0 X32.20 Y-43.40 (move to 32.2,-43.40, lower right hand corner of recess in work piece)

G1 X31.00 Z-0.20 F300 (Cut to -43.40, 31, -.2 at speed 300. This line appears to be correct, it spins up the bit and lowers it .2mm, which is correct and then moves left 1mm)

G1 X29.80 F1000 (move still spinning bit left .2mm at speed 1000mm)

G1 X-30.20 (Move spinning bit left to -30.20. Bit is still in work piece. Not sure why this isn’t -32mm ish as that would be the left extent of the recess I’m trying to cut, but maybe it has to do with the diameter of the bit. Probably that.)

G0 Z0.00 (WTF?! It raises the bit to the surface of the work piece (z=0)

G0 X-49.40 Y-43.40 (and then moves across the work piece to the edge!)

;First, this move is inefficient. It moves to the far right edge of the work piece where we will never be cutting. Second, it hasn’t lifted the bit above z=0, so it’s scraping across the face of the fucking work piece! Third, the bit is still spinning. While G0 is a move command, unless you stop the bit, it continues to turn. So the machine is flying across the work piece at a speed that it thinks will encounter no resistance, move speed, instead of cutting)

G0 X-32.60 Y-42.20 (Now it moves to the edge of the recess, where it could have gone directly in the last move.)

G1 X-31.40 Z-0.20 F300 (Now it lowers the bit into the work piece to Z=-0.20 and travels across the recess, cutting a row pass.)

G1 X-30.20 F1000 (not sure what this is for. Perhaps for making a clean edge on the left edge of the recess?)

G1 X31.00 (it makes a row pass to the right.)

G0 Z0.00 (it goes to depth zero)

G0 X49.00 Y-42.20 (and runs out to the fucking edge of the work piece again to the right.)

G0 X32.20 Y-41.00 (Now it goes to the right edge of the recess to be cut)

G0 Z0.00 (sets the height to zero)

G1 X31.00 Z-0.20 F300 (sets the height to -0.20, speed = 300mm/minute (minutes or seconds, not sure which probably minutes. seconds seems too fast. And moves to X=31, another row cut.) (It keeps going like this, cut the recess a row at a time interspersed with random jaunts to the edge of the work piece, which aren’t efficient and which at Z=0.00, wreck the face of the work piece.)

G1 X29.80 F1000

G1 X-31.40

G0 Z0.00

G0 X-49.40 Y-41.00

G0 X-32.60 Y-39.80

G1 X-31.40 Z-0.20 F300

G1 X-30.20 F1000

G1 X31.00

G0 Z0.00

G0 X49.00 Y-39.80

G0 X32.20 Y-38.60

G1 X31.00 Z-0.20 F300

G1 X29.80 F1000

G1 X-31.40

G0 Z0.00

If you’re already creating the design in Fusion 360, why aren’t you using it for the CAM too?
Luban is barely usable for CNC. It’s okay for use with reliefs and necessary with 4th axis. Otherwise it’s not worth using.

-S

Good to know you guys feel that way. To answer your question, I’m using it because that’s the tool you provided, and that’s the tool you presented in your manual.

I will probably switch to Fusion for CNC in the future. In the meantime, for this straight forward project, what did was your opinion of my analysis of the G-code?

You must have me confused with someone else. SM staff is pretty much non-existent on this forum - at least since Edwin left the company. I’m just an SM owner who tries to help people out from time to time as are most of the others giving advice and help on here.

As far as your g-code goes, you need to share it as is. Can’t see any of the starting code or know if something else is missing or wonky. I don’t have the attention span to get into a line by line analysis without seeing it unadulterated. Maybe someone else will. If you want to post your actual g-code then we can look at it. Or use tools like ncviewer.com to take a look at it and see what it’s actually doing.

G0 Z0.00 doesn’t set height to 0. It’s a move command. It tells the head to move to a position, which in this case, since it’s only a Z coordinate, is height 0. In 3d printing G0 is move without extruding, G1 is move while in extruding. In CNC G0 is a fast move and G1 is at a previously set speed.

So it does look like it’s doing exactly what you tell it and going to your z-origin. If you want it to clear it should be set to a positive number.

-S

I apologize. You’re correct. I assumed your comments were from Snapmaker. Thank you for taking the time to respond thoughtfully to my post. I took your advice and got Fusion360 and that helped a lot. I was eventually able to create the very simple recess I was attempting with Fusion360.

The G-code that Fusion360 output was very easy to follow. In fact after a little bit of review, I realized I could code the simple rectangular recess I was trying to make by hand if it weren’t for the fillets on the corners.

On trick that I learned to just sort of nudge the bit deeper rather than going back to the design for one more incremental fix, was to set the z-offset another 10th of a millimeter deeper and rerun the job.

I’m learning a lot and generally very pleased with the functionality of the machine out of the box.

Thanks again for your post S.

1 Like