XY coordinate

Hello, I am trying to make very precise plastic work, and wonder how can I send the router bit to an exact position in my work area?

 

If you mean the center of the bit, then that’s what the X and Y coordinates of the machine are giving you. You’ll need to use the dual end stop configuration and do some work to square up your machine if you need the two axes to truly be perpendicular to each other (and therefore your cut edges in X and Y).

If you mean the edge of the bit, then you’ll need to configure whatever software you’re using to account for the actual diameter of the bit (which may differ from the stated diameter). This is normal behavior for Fusion 360 (the one CAM package I know even a little about) and probably for others. Obviously you need a way to measure the bit as well.

But personally I’m slightly confused by the question. More or less the only thing the machine does is send the gantry to a particular location. It’s just that getting whatever precision you require means understanding how it behaves, sources of error, etc. etc. It really comes down to what you mean by “exact” and the precision configuration of your machine and work. There will be some error. Even $1M CNC machines have tolerances.

One thing that might help is looking up what G92 does. In brief, it tells the machine, “Where you are right now? Call that coordinate 0,0.” Doesn’t have to be 0,0, but hopefully that makes some sense.

I’m a total beginner myself, so hopefully none of this comes across as anything other than my possibly uninformed attempt to help a fellow novice. :slight_smile:

1 Like

Hi Craig, sorry I should inform my machine is Endstop. but depending on the draw I made it starts everywhere, that is is the reason for the question, I wonder if I have to cut a plastic I will have to use a sheet of at least double size so the cut will be in the sheet.

I am only doing draws, after I have a little experience I will set the Router that is already here asking to be used :slight_smile:

By the way I am trying to find how to set the Z axis so I don’t need to adjust the pen height every time I start a new draw. All I found is to adjust for using bit.

 

Does your drawing include G92?

If you need something to be in a repeatable location in the machine, then you can do that with endstops. For example, if you have a fixture on your spoil board and you just keep putting new blanks in and cutting the same pattern in them, then you can do that repeatably.

  1. Don’t use G92 at all.
  2. In your CAM software, put the origin at the 0,0 location of your endstops. Something like the front left corner.
  3. Home the machine before each job.
  4. Ideally, you’d also want to home Z with a touch plate, or else you will still need G92 Z0 to set the Z height, but it won’t be accurate.

You should be able to turn of the machine, take an international vacation, come back and cut the next blank as if you never left.

1 Like

Ah, you are using the dual endstops - excellent, that’s just what those are for. You should be able to get excellent repeatability, then, assuming your steppers are not skipping steps. But you have to zero your coordinates to a known location, because stepper motors don’t have any notion of absolute position. They only know “move 1mm this way”. When you turn the machine on, it just has to assume it’s at zero and it’s up to you to either manually or via programming get lined up with some known reference.

What I do is to move the gantry close to the corner I have identified as X=0, Y=0, turn on the machine, and then home X&Y through the LCD. The g code for this is, I believe, G28 X Y. But as I always do it via the LCD I’m not totally sure. You should see the machine move to the end stops, back off, and then move to the end stop again.

At this point your machine is in a known position in X and Y, and square if you did the endstop setup correctly. I don’t know off the top of my head if Marlin then sets its internal notion of X and Y to zero - it does when I do it via the LCD but I’m not sure if that would be true if issuing g code directly. You could certainly do a G92 x0 Y0 - then you’d know that the machine would be set to believe itself to be at 0,0. From that point, if you move to (say) X=15,Y=123, it should always be the same point, within the limits of repeatability of the machine. I’ve measured with a dial indicator on mine, and it’s quite good indeed. Yours will vary depending on the details of your build, but there’s no reason to expect that you shouldn’t be able to get to the point where you can very reliably move to an absolute position.

As for the Z axis, a z probe is super easy to make. You just need some wires that run to a pair of alligator clips. I bought these: https://www.amazon.com/gp/product/B0002KRABU/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1. With the machine off, connect them to the - and S leads of the Zmin input on the board. Then attach one alligator clip to a piece of metal and the other to the router bit. Move the bit above the metal and issue a G28 Z. Much like with the end stops, the bit will move down until it touches the metal and completes the circuit, then back off and do it again more slowly. If you know the thickness of your z probe (just measure it with some sort of calipers), then you know the Z position of the end of the bit. If it’s, say, 0.5mm, then issue a G92 Z0.5 to tell the machine that it’s at z coordinate 0.5.

Here is the G Code I put at the start of most of my programs (well, Fusion 360 puts it there). My z probe is 26.2mm tall, which is why there’s a G92 26.2.

G90
G21
M84 S0
G92 X0 Y0 Z0
; COMMAND_TOOL_MEASURE
M0 Attach ZProbe
G28 Z
G92 Z26.2
G0 Z27 F50
M400
M0 Detach ZProbe

I like the g code explainer at https://cimera42.github.io/gcode-explainer/ for describing what each command does, so I’ll leave you to use that if you want to know what they all do, although I’m happy to explain further (to the extent that I understand).

Oh, and if you need to do any tool changes, obviously you’ll have to re-probe z, since there’s no guarantee the new bit will have the same stick-out as the old one. You shouldn’t need to home X and Y, though, unless you turn off the steppers.

1 Like

I should also mention that a simpler alternative, if you’re doing less than a few repeated tasks is to just drill a little hole with your bit at 0,0,0 and then job the machine back to that spot before running G92. I’ve never had endstops and I use this trick when I’m doing things like having one carve job and then a through job to remove the part.

1 Like

That is what I will try to do, thanks for your time, nice explanation.

Thanks you, Jeffeb3, you are always helping me :slight_smile:

1 Like