• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

CNC will only work with nagative coordinates/numbers

Scheduled Pinned Locked Moved
CNC
3
9
316
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    mattyd
    last edited by 30 Aug 2023, 15:01

    Hi All,

    So I'm new to this and I am probably missing something obvious (so sorry in advance)

    My cnc, when homed moves to the bottom left - as per this image

    mycnc.jpg

    but to move it to the right (X axis) I have to use negative numbers. Same with the Y and Z axis.

    Logic tells me this is incorrect, and when working up a simple square using positive numbers my cnc is unable to produce this shape. I can of course manually edit the Gcode to add a "-" in front of everything but that seems a little silly and counterintuitive.

    As an example, this square has a start point at the bottom left (as per my cnc) but uses positive numbers to make the shape towards the right-hand side. My cnc can only make this shape if I use negative coordinates rather than positive ones.
    problem.jpg

    Does anyone know how I can fix this? 🙂

    undefined 1 Reply Last reply 30 Aug 2023, 15:09 Reply Quote 0
    • undefined
      o_lampe @mattyd
      last edited by 30 Aug 2023, 15:09

      @mattyd You could check your endstop-definition: does it home to 0,0 and is that defined as min? Same for the M208 config.
      The Z-axis is a different shoe. Some want to have Z0 at the top, others on bed level...

      undefined 1 Reply Last reply 30 Aug 2023, 15:16 Reply Quote 1
      • undefined
        mattyd @o_lampe
        last edited by 30 Aug 2023, 15:16

        @o_lampe said in CNC will only work with nagative coordinates/numbers:

        @mattyd You could check your endstop-definition: does it home to 0,0 and is that defined as min? Same for the M208 config.
        The Z-axis is a different shoe. Some want to have Z0 at the top, others on bed level...

        When homed this is what I see via the control panel

        homed.jpg

        No idea why the tool position for X is at 10, but the Machine Position says it's at its max, logically shouldn't that show x:0 y:0 z:0 ?

        undefined 1 Reply Last reply 30 Aug 2023, 15:20 Reply Quote 0
        • undefined
          o_lampe @mattyd
          last edited by 30 Aug 2023, 15:20

          @mattyd I guess it's time to post your config.g

          undefined 1 Reply Last reply 30 Aug 2023, 15:22 Reply Quote 0
          • undefined
            mattyd @o_lampe
            last edited by 30 Aug 2023, 15:22

            @o_lampe

            ; Configuration file for Duet
            ; executed by the firmware on start-up
            ; WorkBee Firmware Version 1.1
            global systemSettingsVersion={1.2}
            ; Configuration files
            M98 P"config-network.g"
            M98 P"config-drives.g"
            M98 P"config-axes.g"
            M98 P"config-axes-limits.g"
            M98 P"config-axes-calibration.g"
            M98 P"config-axes-endstops.g"
            M98 P"config-probe.g"
            M98 P"config-spindle.g"
            M98 P"config-laser.g"
            ; Other Settings
            M453 ; Put the machine into CNC Modes
            G90 ; Set absolute coordinates
            M140 H-1 ; Disable heated bed
            M564 S1 H1 ; Disable jog commands when not homed
            M911 S21.0 R23 P"G91 G1 Z3 F1000" ; Configure power loss resume
            ; User Configuration files
            M98 P"config-user-settings.g"
            M501 ; Load Stored Parameters

            btw. my "config-user-settings.g" are empty

            undefined 1 Reply Last reply 30 Aug 2023, 15:39 Reply Quote 0
            • undefined
              o_lampe @mattyd
              last edited by 30 Aug 2023, 15:39

              @mattyd said in CNC will only work with nagative coordinates/numbers:

              M98 P"config-axes-limits.g"
              M98 P"config-axes-endstops.g"

              These are the files we are interested in. C'mon, work with me... 🤦

              undefined 1 Reply Last reply 30 Aug 2023, 15:41 Reply Quote 1
              • undefined
                mattyd @o_lampe
                last edited by 30 Aug 2023, 15:41

                @o_lampe said in CNC will only work with nagative coordinates/numbers:

                @mattyd said in CNC will only work with nagative coordinates/numbers:

                M98 P"config-axes-limits.g"
                M98 P"config-axes-endstops.g"

                These are the files we are interested in. C'mon, work with me... 🤦

                Sorry 🙂 Here you go

                config-axes-limits.g

                ; Axes Limits configuration executed by config.g
                M208 X0 Y0 Z0 S1 ; Set axis minima
                M208 X270 Y270 Z88 ; Set axis maxima

                and config-axes-endstops.g

                ; Endstop configuration executed by config.g
                M574 X2 P"xstop" S1 ; Set active low X endstop
                M574 Y2 P"ystop" S1 ; Set active low Y endstop
                M574 Z2 P"zstop" S1 ; Set active low Z endstop
                undefined 1 Reply Last reply 30 Aug 2023, 17:21 Reply Quote 0
                • undefined
                  mattyd @mattyd
                  last edited by 30 Aug 2023, 17:21

                  @o_lampe

                  i think've figured it out, and it's all user error!

                  my mistake was assuming that by homing it the "machine position" should be 0 0 0. This is wrong, the "machine position" SHOULD be 270 270 0.

                  I totally ignored/forgot about the fact that I can set the "work" position to 0 0 0, which when done so moved the machine to the opposite side, and all the negative numbers become positive and Gcode now "seems" to be working as expected.

                  At least I think that's correct. More experimantaion is needed 🙂

                  undefined 1 Reply Last reply 30 Aug 2023, 19:21 Reply Quote 0
                  • undefined
                    dc42 administrators @mattyd
                    last edited by 30 Aug 2023, 19:21

                    @mattyd to set X0 Y0 to set the bottom left and positive movement to be correct you should do the following:

                    1. Set the motor directions using the M569 commands in config.g (or in your case, probably in config-drives.g) so that positive X is to the right and positive Y is away from you.
                    2. Change the M574 commands to set the endstops to low-end (e.g. X1) instead of high end (e.g. X2).
                    3. Change your homing files to move in the negative direction instead of the positive direction.

                    See https://docs.duet3d.com/en/User_manual/Machine_configuration/Configuration_cartesian. I am assuming that your machine is Cartesian, not CoreXY.

                    Duet WiFi hardware designer and firmware engineer
                    Please do not ask me for Duet support via PM or email, use the forum
                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                    1 Reply Last reply Reply Quote 0
                    2 out of 9
                    • First post
                      2/9
                      Last post
                    Unless otherwise noted, all forum content is licensed under CC-BY-SA