CNC: Tool Offsets, Coordinate Systems, Confusion

  • After having (quite literally) blown up my el-cheapo CNC control board, I've replaced it with a Duet Wifi. I've got most of the stuff working so far, but now I'm stuck - at a point that probably has little to do with Duet specifics. I'm using M585 to probe the tool height, and while that works electromechanically, I'm having a hard time wrapping my head around the different coordinate systems, tool offsets and so on. I understand that a lot of stuff is possible, but what is the setup I should be working towards if I want to be able to get my CNC to process programs generated by Fusion 360? My machine homes to the back right top corner of its working area, so towards the X/Y/Z positive endstops, is that correct - or rather, is that sensible? I've adjusted the homing scripts so that the front left corner of the working area is equal to X0 Y0 after homing. I know the Z axis can move down roughly 90 mm until the chuck touches the working surface, so after probing with a tool of say 35 mm length, what should the offsets and positions look like? What coordinate systems would I be working with, and how should they be setup? Sorry if I sound a bit confused - I am...

  • @vwegert said in CNC: Tool Offsets, Coordinate Systems, Confusion:

    I understand that a lot of stuff is possible, but what is the setup I should be working towards if I want to be able to get my CNC to process programs generated by Fusion 360? My machine homes to the back right top corner of its working area, so towards the X/Y/Z positive endstops, is that correct - or rather, is that sensible?
    Has a good (if long) discussion on the whole topic. Remember that not everything there is applicable to the current Duet CNC implementation.

    My machine co-ordinate system matches the homing motion; eg top right and back (like yours), this is a very traditional home position; in most machines this is when then worktable is most accessible, it's quite sensible in that regard.

    I do this at home on my 1612; all three axes are always negative for machine co-ordinates, the machine works entirely in the third quadrant.

    But this is just the machine co-ordinates; and these are never used for CNC operations. Once you have the piece mounted you jog to it's origin point and set the workspace origin there. This is what your gcode will treat as it's origin.

    Look at G10 and G53 through G92 in the gcode manual, Especially G54. There are quite a few prior discussions here too.

    The only real golden rule is that the Z axis should home upwards, and the homing cycle must home Z before any other axes move. This is practical, driving the tool down or sideways into the workpiece is usually catastrophic.

  • Thanks, @EasyTarget, that confirms part of what I've already figured out. The rule of thumb appears to be: Don't mess with the machine coordinate system after homing, set the approproiate WCS origin instead - right?
    However, I'm still unsure about several things:
    What does DWC display - always machine coordinates, or does it adjust to the WCS selected?
    What about the tool length offset - is that a change in the coordinate system, or is it just an offset that is applied to the G0/G1 movement commands? The offset changes the coordinates displayed by DWC, so that's got me a bit confused.
    I'm using a PCB with a known thickness to probe the tool height, so I need to adjust the offset by the thickness of the PCB

  • @vwegert
    Yes; the normal way is to set machine zero at your home; even if that leaves all your work space 'machine negative' and then manually set a workspace zero at the work/gcode origin.

    I have a confession, I don't use Duet for my CNC's so I just don't know how DWC will present this; I'd hope it uses the current workspace co-ordinates but I have no experience to back this up.
    Similarly I have never played with tool offsets, I've only ever contact probed with the tool and always use the tool tip as zero.
    I don't want to guess an answer; unless others here can chip in I suggest putting something soft under your tool (so nothing breaks if things drive the wrong way) and then probing + offsetting on that, and working out the operation yourself. Sorry.

  • administrators

    @vwegert have you read this:
    I know its not much information but points to the L parameter in G10:

    If Workspace co-ordinates work the same way as tool offsets the DWC display updates to show the co-ordinates of the system that is in use.

    I don't have a CNC machine myself so I hope @Danal, @Ryan-Lock or one of the other CNC experts can chip in.

  • I've seen the thread and will do my best to write a comment later today (Texas, so US central time).

    Meanwhile, a couple of quick thoughts:

    • DWC (should) always display the CURRENT 'work' coordinate system. Unless you change it, this will be G54.

    • This is an important concept: A given machine is ALWAYS in a work coordinate system. It my be true that the current work coordinate system does (or does not) exactly match machine coordinates... and this causes a lot of people who've never used work systems before to think "I've always operated in machine coordinates in the past"... but that's not really true. You've always operated in G54 which had 0,0,0 offset vs. machine.

    • If you do use G53 (machine coord) in a G-Code command line, remember it is NOT MODAL. That is, it applies only to the line on which it appears.

  • administrators

    Thanks @Danal!

  • Hey, as above DWC only displays work coordinates of the system you are currently in. That homing position is the same as what we use on our CNC Machines. I am currently making an alternative web control for CNC Machines which puts all the buttons needed to hand and allows easy switching between work coordinates. You can download the beta at:

  • administrators

    @Ryan-Lock that looks interesting, will you be hosting the project on Github as a fork of DWC?

  • Yup you can find it here:

  • administrators

    I suggested to chrishamm long ago that DWC needs an option to display both machine and work coordinates. But I am guessing that your fork goes beyond that.

  • Thanks everyone - I've managed to run a few simple test cuts after using my "cheapishaw" probe, and I'll try a more complex part tomorrow. So far it's looking very promising.

  • @vwegert Good luck!
    @Ryan-Lock ditto!
    Workspace switching and handling sounds great, having been batch-making PCB's via a web interface without it i can comfortably call it a killer feature 😉 I got heartily sick of having to switch to the console to swap co-ordinate systems. Adding macro buttons helped, but made the UI look diseased.

  • @EasyTarget Yeah we have found for users doing production manufacturing they require easy use of all work coordinates. After the release of this version, the next thing i am going to add is the ability to apply custom names to the systems, instead of just numbers.

  • This sounds very intriguing. Are there some screenshots anywhere of it up and running on a CNC?

  • @Danal I haven't got any to hand right now, but will make some 🙂

  • Take a quick look at the work coordinate selector built into ChiliPeppr.:

    When not connected to a controller board, it WILL show the coordinate selector, it will not show the axis DROs for work and machine.

    I like the coordinate selector. Play with the + and - buttons, click on a level and see it highlight, etc. Source for it is here: Javascript/HTML5, so easy to grab chunks and reuse them in browser based apps.

    Actually, I like the DRO style display as well, but I will need to be connected to a board to show you a screen shot.

    Screen Shot 2019-10-08 at 09.25.40.png

  • Thanks for the info, their system is pretty nice! I like their graphics to see which layer you are on.

    Mine is simply just a drop down list which allows you to select which one. On one of the settings page i am hoping to add a panel where you can see the work zero for each system in machine coordinates, edit them, and give each system a custom name, which will then show in the drop down instead of the number.

    Screenshot 2019-08-28 21.43.07.png

  • Nice screenshot.

    One suggestion: Make Work v Machine visually different. Larger/smaller, different colors, etc. It is fairly standard to make Work larger/bolder/brighter.

  • Thanks for the suggestion i will see what i can do.

  • IF we are making suggestions here; this is mine. I do a lot of manual jogging when making PCB's etc. The ESP3D derived jog control panel on my esp32 based controllers webUI is excellent; heartily recommended, very intuitive to use.

    The blue buttons at the right are Macros, the little buttons beside the machine position are for zeroing individual or all axes. Per-axis homing is also supported and has proved handy on occasions.
    Not shown is how each concentric ring is a different amount; and a clear animation hilights exactly what you are about to click on, and what it does.
    This is slightly out of date; the latest version shows machine as well as workspace position, I like having the macro editor right there in the panel too.
    I just switched to using this after using the jog controls in LaserWeb a lot; those are similar layout to the Duet WebUI, easier to mis-click, I do have some foundation for preferring the bullseye approach.

  • @EasyTarget Thanks for the suggestions, i will take them all on board. I have had a few other people prefer the bullseye approach to jogging as well. I have stuck with the current Duet Web Control jogging in our control to speed up production. But definitely something for the future. I have also got a lot of request for keyboard jogging.

  • @Ryan-Lock said in CNC: Tool Offsets, Coordinate Systems, Confusion:

    I have also got a lot of request for keyboard jogging.

    Listen to those requests! It's something on my wish-list too.

  • @EasyTarget Haha i will figure it out ☺

  • Moderator

    When Adrian Bowyer was developing the first firmware for the Duet, I tried to get him to put a bullseye similar to Pronterface's into RepRapFirmware, to make it easier for people transitioning from Pronterface! Never happened...


Log in to reply