G10 L20 P1 X0 Y0 Z0 not working as expected



  • So I will first home my machine and basically I want that homed position to actually be the starting point of my work piece other then obviously dropping the Z axis down to my working surface. So I do that then I try to implement the G10 L20 P1 X0 Y0 Z0 command my CNC moves roughly 200mm in both the X and Y directions then displays G0/G1 target position outside of machine limits. And then moves to roughly the middle on the X axis and stops.

    I have macros set up to move it to all the corners of the work surface including centers at each axis and they all work exactly as expected. Not sure why the G10 command isnt.

    The file im trying to run is saved in Grbl (mm)(gcode) in case that has anything to do with it.



  • Are you G28 homing before that G10? For machine limits, not your desired work coords.



  • @Danal Not sure if it makes a difference but im just hitting HOMEALL on the DWC. Not manually keying the G28 command.



  • Great! Homeall is G28 under the covers.

    OK so you manually jog the tip of the tool to the corner of your work, in XYZ. You then issue G10 L20 P1 X0Y0Z0, correct? And all those moves occur... and they should not. The expected result is to set the origin of WCS (work coordinate system) G54, correct?



  • It works correctly for me, on

    Board: Duet 3 MB6HC (MB6HC)
    DSF Version: 1.2.4.0
    Firmware: RepRapFirmware for Duet 3 MB6HC v0.6 or 1.0 3.01-RC2 (2020-02-18b1)

    Also works fine on

    Board: Duet WiFi 1.02 or later
    Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 2.05.1 (2020-02-09b1)
    Duet WiFi Server Version: 1.23

    I tried P1 and P2, and switched between G54 and G55. Everything was what I expected.

    Please post your config.g, and any other commands you are issuing beyond Homeall, Jog, G10 L20...



  • @Danal So yes I hit the homeall and then I move the tip to my front left corner of my work piece and hit The G10 L20 P1 X0 Y0 Z0 command. Then I pick my job that I want to run, thats when it seems to move in the XY directions and give me the G1/G0 error. Do I need to do something with the G54 command or is that what the G10 L20 command is doing essentially.



  • @chichirod said in G10 L20 P1 X0 Y0 Z0 not working as expected:

    @Danal So yes I hit the homeall and then I move the tip to my front left corner of my work piece and hit The G10 L20 P1 X0 Y0 Z0 command. Then I pick my job that I want to run, thats when it seems to move in the XY directions and give me the G1/G0 error. Do I need to do something with the G54 command or is that what the G10 L20 command is doing essentially.

    AH... got it. Couple of questions:

    After the G10 L20 command, does the XY position on the Duet Web dashboard read 0.0 for both?

    And, your machine should be "in G54"... but it is possible that it is in a different work coordinate system. If you enter "G54" on the console (after the G10 L20), do the XY on the dashboard now read 0.0?

    And, last, can you attache the gcode file for the job you are trying to run? Use the upload arrow in the box, the rightmost of the little icons that show up when you are posting.



  • So after the G10 L20 command, XYand Z all say 0.0.
    When I enter G54 after the G10 L20 the Xand Y still say 0.0 but Z says 12.71 which is my safety limit above my work piece

    After I hit the G54 command I try to run my cut again and it says 21.5% complete but nothing has moved.
    screen shot.PNG

    Outline 2.25em.gcode



  • Your gcode file looks fine.

    Suggestion:

    Given that the machine is "always" in G54, I'd suggest avoiding offseting that work coordinate system. I would get G54 back to matching machine zero, via:

    1. Home the machine
    2. Enter G54 G10 L2 P1 X0Y0Z0

    Make sure that machine zero and the zeros shown in the Web console match to your satisfaction.

    Then when ready to cut:

    1. Home
    2. Manual jog to corner of workpiece (including Z)
    3. G10 L20 P2 X0Y0Z0

    Note the P2 instead of P1.

    Now, verify that G54 shows some large numbers in XYZ on web console, and that G55 shows 0.0 on all three. Maybe even do a couple of 1mm jogs to absolutely ensure the coords are updating.

    Be sure you are in G55, and try your job.



  • @Danal Ok I tried your suggestions and sort of got it to work. I re created another file to the same dimensions as what my cut area should be from what i have entered in the config file. 2498x1245. I did home it right from the very front corner at the endstops so in theory it should cut from there....correct? Anyways it gave me the G0/G1 error. So I made the box smaller only by 10mm in all directions and same error. Then I just made a large circle in the middle 980mm that worked no problem. So I just need to see what the max area is. However I assume it should be the X2498 Y1245 Z165 that I have told it.
    ; Configuration file for Duet 3 (firmware version 3)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Tue Feb 25 2020 22:03:45 GMT-0700 (Mountain Standard Time)

    ; General preferences
    G90 ; send absolute coordinates...
    M83 ; ...but relative extruder moves
    M550 P"Duet 3" ; set printer name

    ; Drives
    M569 P0.0 S1 ; X physical drive 0.0 goes forwards
    M569 P0.1 S0 ; Y physical drive 0.1 goes backwards
    M569 P0.2 S0 ; Z physical drive 0.2 goes backwards
    M569 P0.3 S0 ; X2 physical drive 0.3 goes backwards
    M584 X0.0:0.3 Y0.1 Z0.2 ; set drive mapping
    M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation
    M92 X80.00 Y80.00 Z400.00 E80.00 ; set steps per mm
    M566 X900.00 Y900.00 Z120.00 E900.00 ; set maximum instantaneous speed changes (mm/min)
    M203 X10000.00 Y10000.00 Z1800.00 E10000.00 ; set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z20.00 E500.00 ; set accelerations (mm/s^2)
    M906 X2240 Y2240 Z3840 E2240 I30 ; set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z0 S1 ; set axis minima
    M208 X2498 Y1245 Z165 S0 ; set axis maxima

    ; Endstops
    M574 X1 S1 P"io0.in" ; configure active-high endstop for low end on X via pin io0.in
    M574 Y1 S1 P"io1.in" ; configure active-high endstop for low end on Y via pin io1.in
    M574 Z2 S1 P"io2.in" ; configure active-high endstop for high end on Z via pin io2.in

    ; Z-Probe
    M558 P0 H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed
    M557 X15:215 Y15:195 S20 ; define mesh grid

    ; Heaters
    ;M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0
    ;M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0
    ;M143 H0 S0 ; set temperature limit for heater 0 to 0C
    ;M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit
    ;M140 H0 ; map heated bed to heater 0

    ; Fans

    ; Tools
    ;M563 P1 S"XYZ-Probe" ; Define XYZ Touch Probe Tool
    M563 S"Spindle" P0 D0 H ; Define Tool 0 (our Spindle)
    G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
    G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C

    ; Custom settings
    M453 P2 F400
    M564 S1 H1 ; Disable jog commands when not homed
    M140 H-1 ; Disable heated bed
    M501 ; Load Stored Parameters

    ; CNC
    ;M106 P2 I-1 ; Disable Fan2
    ;M307 H1 A-1 C-1 D-1 ; Disable Heater 1 so we can use it for a tool
    M453 P1 R24000 F100 ; Set to CNC mode, using Tool 0, 24000 Max RPM, PWM Frequency 100hz



  • @chichirod said in G10 L20 P1 X0 Y0 Z0 not working as expected:

    M208 X2498 Y1245 Z165 S0 ; set axis maxima

    Yep, you should only get an error if your moves would go beyond the above, or below 0.

    Are any of the moves arc? G2 or G3?



  • @Danal No theres no G2/G3 arc moves. Ive been running fake cuts this morning and it seems to be reacting perfectly. Thank you for your help and patients. Cant wait to make this thing work.


Log in to reply