Setting X and Y Zero location?



  • This is probably a very simple question - but I'm stumped. I have a Geetech A30 (basically a clone Cr10) that I've rebuilt using a Duet Wifi and printed E3D V6 mount. It's all working and makes some great prints. However, when I built and configured it originally, I could not figure out how to set the "0" for the X and Y. Wasn't a big deal because I didn't need the whole bed until now.

    I've tried changing the tool offsets in config.g and the x and y movements in the homex.g, homey.g and homeall.g Nothing seems to work. When I manually jog the hot end so the nozzle is right at the front left corner of the bed, the web panel reads X=16, Y=24. Any assistance would be greatly appreciated! I've included my current code below...

    CONFIG.G Tool
    ; Tools
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 X20 Y22 Z0 ; Set tool 0 axis offsets
    G10 P0 R0 S0

    HOMEALL.G
    G91 ; relative positioning
    G1 Z5 F6000 S2 ; lift Z relative to current position
    G1 S1 X-325 Y-325 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 X15 Y5 F6000 ; go back a few mm
    G1 S1 X-325 Y-325 F360 ; move slowly to X and Y axis endstops once more (second pass)
    G92 X0
    G90 ; absolute positioning
    G1 X0 Y0 F6000 ; go to first bed probe point and home Z (40,40)
    G30 ; home Z by probing the bed

    HOMEX.G
    G91 ; relative positioning
    G1 Z5 F6000 S2 ; lift Z relative to current position
    G1 S1 X-325 F1800 ; move quickly to X axis endstop and stop there (first pass) (310)
    G1 X10 F6000 ; go back a few mm
    G1 S1 X-325 F360 ; move slowly to X axis endstop once more (second pass) (310)
    G1 X16 F6000
    G1 Z-5 F6000 S2 ; lower Z again
    G90 ; absolute positioning

    HOMEY.G
    G91 ; relative positioning
    G1 Z5 F6000 S2 ; lift Z relative to current position
    G1 S1 Y-325 F1800 ; move quickly to Y axis endstop and stop there (first pass) (310)
    G1 Y5 F6000 ; go back a few mm
    G1 S1 Y-325 F360 ; move slowly to Y axis endstop once more (second pass)(310)
    G1 Y17 F6000 ; go back a few mm
    G1 Z-5 F6000 S2 ; lower Z again
    G90 ; absolute positioning



  • Hi,

    There are a couple of ways.

    When a G1 X### command with the H1 parameter (old S1) triggers the endstop switch the X position is set to Xmin or Xmax depending on which end of the axis the endstop switch is at.

    The same of course is true substituting Y for X.

    So lets assume that your X endstop switch is at the Xmin end, that Xmin is 0 but the switch triggers when X = 10. So after right the homing moves the firmware "thinks" the X position is 0 when it is actually 10.

    So a simple way to fix this is to include after the homing moves a G92 command that informs the firmware of the actual position rather than the Xmin position. Based on the assumptions above you would include G92 X10.

    The other approach is to position the endstop switches so they trigger at the actual position of Xmin or Xmax.

    I use the first approach.

    Frederick



  • or set the minima to this

    M208 X-16 Y-24 Z0 S1 ; set axis minima



  • @pkirill said in Setting X and Y Zero location?:

    front left corner of the bed, the web panel reads X=16, Y=24.

    That means your endstops are at X-16 and Y-24. So set axis minima to X-16 and Y-24 and you will have 0 at front left corner of bed.


  • administrators


Log in to reply