Unexepected Head movement after 1.19 update



  • Hi,

    I just updated my Huxley Duo with Duet to the following config
    Firmware Electronics: Duet 0.6
    Firmware Version: 1.19 (2017-08-14)
    Web Interface Version: 1.19

    I am trying to print a part with the following gcode extract:

    [[gcode]]
    M107
    M190 S57 ; set bed temperature
    G28	; home all axes 
    G32 ; execute bed Z-plane  compensation at bed.g 4 points
    G10 P0 X-16 Y-3 Z0.0 S-273 R-273 ; set extruder x,y offsets
    M83  ; set extruder to relative mode
    G10 P0 S195 R160  ; Set tool 0 operating and standby temperatures
    T0   ; select tool ZERO
    
    G21 ; set units to millimeters
    G90 ; use absolute coordinates
    M83 ; use relative distances for extrusion
    G1 E-3.50000 F2400.00000
    G1 Z0.300 F9000.000
    G1 X29.381 Y30.987 F9000.000
    
    

    After doing the bed leveling, the head drives to positive X and continues beyond the limit of the printer, making the X-axis timing belt jump off the sprokets and destroying X positioning…

    Prior to this, with version 1.18 I had no such problem.

    Would anyone have a suggestion as to how to fix this?

    Cheers,
    Bob


  • administrators



  • Thanks for the tip, but I do not have either of the files sys/deployprobe and sys/retractprobe.g so I could not delete them.

    Any other thoughts?


  • administrators

    Please post your config.g and bed.g files. Also check whether of the 1.18 to 1.19 upgrade notes at https://github.com/dc42/RepRapFirmware/blob/dev/WHATS_NEW.md applies to your printer.

    I suggest you use 1.19.2 in preference to 1.19 because it includes some bug fixes.



  • Hi!

    Thanks for your continued support! I really appreciate it! I will do the upgrade to 1.19.2

    A little question, what about iap.bin and iap4e.bin? Are these needed files needed on the sd card as well, in the sys folder?

    below my config.g and bed.g files (I couldn't see how to post them as attachments).

    Thanks so much for all the great software you are making for all of us!
    Ciao,
    Bob

    config.g:

    [[gcode]]
    M111 S0                             ; Debug off
    M550 Phuxley RepRapPro Huxley Duo   ; Machine name (can be anything you like). With DHCP enabled connect to (example) http://reprapprohuxleyduo (machine name with no spaces).
    M551 Preprap                        ; Machine password (currently not used)
    M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0x14 ; MAC Address
    ;M552 P0.0.0.0                       ; Un-comment for DHCP
    M552 P192.168.1.13                  ; IP address, comment for DHCP
    M553 P255.255.255.0                 ; Netmask, comment for DHCP
    M554 P192.168.1.1                   ; Gateway, comment for DHCP
    M555 P2                             ; Set output to look like Marlin
    G21                                 ; Work in millimetres
    G90                                 ; Send absolute corrdinates...
    M83                                 ; ...but relative extruder moves
    M574 X0 Y1 Z0                       ; MY VALUES added 2017 06 18 for dc42 firmware
                                        ; This tells the firmware that you have an endstop switch at the low end of the Y axis,
                                        ; and no endstop switches for X or Z 
    M906 X700 Y700 Z600 E800            ; Set motor currents (mA)  (not changed 1.18)
    M305 P0 R4700 T100000               ; Set the heated bed thermistor resistance at 25C, series resistor to 4K7
    M305 P1 R4700                       ; Set the hot end thermistor series resistor to 4K7
    M569 P0 S1                          ; Reverse the X motor
    M569 P3 S0                          ; Reverse the extruder motor (T0)
    M569 P4 S0                          ; Reverse the extruder motor (T1)
    M92 E641                            ; Set MY VALUES OF extruder steps per mm
    M558 P2                             ; Use a modulated Z probe
    ;G31 Z0.8 P600                       ; Set the probe height and threshold (deliberately too high to avoid bed crashes on initial setup)
    G31 Z1.5 P602                       ; MY VALUES obtained 2015 10 29 17:48, first time z-probe calibration!        
    ;M556 S45 X0 Y0 Z0                   ; Put your axis compensation here
    M556 S49.5 X-0.56 Y0.06 Z-0.23     ; MY VALUES axis compensation 2016 04 06 0:07
    M201 X750 Y750 Z15 E750             ; Accelerations (mm/s^2)  
    M203 X15000 Y15000 Z300 E3600       ; Maximum speeds (mm/min)
    M566 X200 Y200 Z30 E20              ; Minimum speeds mm/minute    
    M563 P0 D0 H1                       ; Define tool 0
    G10 P0 S-273 R-273                  ; Set tool 0 operating and standby temperatures
    ;M563 P1 D1 H2                       ; Define tool 1, uncomment if you have a dual colour upgrade
    ;G10 P1 X19 S-273 R-273              ; Set tool 1 operating and standby temperatures, uncomment if you have a dual colour upgrade
    ;M208 X152 Y140 Z73                 ; MY VAUES set axis maximum positive travels, doesn't work right, it seems
    
    

    bed.g

    [[gcode]]
    M561
    G1 Z10 F200              ; move 10mm off the bed
    G1 X38 Y0 F2000        ; MY VALUES first probe point as of 2016 10 29
    G30 P0 Z-99999           ; probe the bed
    G1 Z10 F200              ; move back up
    G1 X38 Y130 F2000        ; MY VALUES after firmware upgrade to 1.1 2nd probe point
    G30 P1 Z-99999           ; probe the bed
    G1 Z10 F200              ; move back up
    G1 X148 Y130 F2000       ; MY VALUES 3rd probe point as of 2016 10 29
    G30 P2 Z-99999           ; probe the bed
    G1 Z10 F200              ; move back up
    G1 X148 Y0 F2000         ; MY VALUES 4th probe point as of 2016 10 29
    G30 P3 S Z-99999         ; probe the bed, set the bed equation
    G4 P1500                 ; pause to let the web interface catch up
    G1 Z10 F200              ; move back up
    
    

  • administrators

    On a Duet 0.6, iap.bin needs to be in /sys on the SD card in order to do over-the-web firmware upgrades.

    I'll look at your files and see if I can spot anything.



  • Thanks!

    I made the upgrade to 1.19.2 but the head X-axis crash continues to occur if I run bed compensation in the gcode.

    This occurs on all my gcode files.

    Should I raise an issue on github?


  • administrators

    No, I still have it on my list to investigate.

    Do you have any code in your tpre0.g or tpost0.g files? It may be the T0 command that is causing the unwanted movement.


  • administrators

    PS:

    1. I don't see any M208 commands in your config.g file to define the axis limits.

    2. To help diagnose this, please can you paste the gcode extract you provided in your first post into a file, then comment out the T0 line and all the following ones, by putting a semicolon at the start of each line. Try printing that file and see if the problem occurs. If it doesn't, then un-comment the T0 command, print the file again and see if it occurs. Let us know the results.



  • We can at least prevent the X axis from going beyond the limits by using M208. I notice that you have this commented out with your own comment "….........doesn't work right it seems" That's probably because you didn't add an "S0" . So you should have something like

    M208 X0 Y0 Z0 S1 ; set axes minima
    M208 X152 Y140 Z73 S0; set axes maxima

    The above assumes that those numbers are correct for your printer. Once the printer has been homed, then whatever travel command you send will be constrained by those limits.

    When exactly does the X axis crash? Is it during the bed probing or after the probing has been completed? And does the head move as expected to all 4 points when you do the probing?

    Edit. Typing at the same time as DC



  • @dc42:

    No, I still have it on my list to investigate.

    Do you have any code in your tpre0.g or tpost0.g files? It may be the T0 command that is causing the unwanted movement.

    Both the tpre0.g and tpost0.g files are empty so that cannot be the issue.



  • @dc42:

    PS:

    1. I don't see any M208 commands in your config.g file to define the axis limits.

    2. To help diagnose this, please can you paste the gcode extract you provided in your first post into a file, then comment out the T0 line and all the following ones, by putting a semicolon at the start of each line. Try printing that file and see if the problem occurs. If it doesn't, then un-comment the T0 command, print the file again and see if it occurs. Let us know the results.

    @deckingman:

    We can at least prevent the X axis from going beyond the limits by using M208. I notice that you have this commented out with your own comment "….........doesn't work right it seems" That's probably because you didn't add an "S0" . So you should have something like

    M208 X0 Y0 Z0 S1 ; set axes minima
    M208 X152 Y140 Z73 S0; set axes maxima

    The above assumes that those numbers are correct for your printer. Once the printer has been homed, then whatever travel command you send will be constrained by those limits.

    When exactly does the X axis crash? Is it during the bed probing or after the probing has been completed? And does the head move as expected to all 4 points when you do the probing?

    Edit. Typing at the same time as DC

    I will try to answer both questions here:

    I tired to set maxima and minima, but was unable to get it to work properly because of my extreme ignorance…. sigh. I use the following command to set the extruder offsets so that the x,y coordinates will correspond to the point where the filament extrudes exactly.

    [[gcode]]
    G10 P0 X-16 Y-3 Z0.0 S-273 R-273 ; set extruder x,y offsets
    
    

    I tried to set the max and min but somehow I just could not get it to work with the offsets so I finally gave up. I am very careful with my slicing to be sure that the objects all fit on the platter and do not cause any x,y,z crashes.

    I would greatly appreciate any advice you could give me as to how to set the max and min, given my use of offsets.

    As to the exact moment of the crash, it is after the probing is completed for all 4 points, and in the version 1.18, the head would move directly to the first point of printing. Now, it drives in the x-axis positive direction and crashes. After a few skips of the belt, the head then moves to a position somewhere near where it should be (in terms of X) but of course having lost the skips on the gear, it is in the wrong place.

    If I remove homing and bed compensation from the gcode files, it works ok. (of course I do the homing and compensation manually beforehand)

    On the other hand, if I had maxima, then the x-axis head crash issue would simply be masked, not fixed, would it not?

    I will now try a print with all 'T0' lines commented and report back here.

    Thanks for all your help - I really appreciate it and am sorry to be such a noobie…
    Ciao,
    Bob



  • @dc42:

    PS:
    2. To help diagnose this, please can you paste the gcode extract you provided in your first post into a file, then comment out the T0 line and all the following ones, by putting a semicolon at the start of each line. Try printing that file and see if the problem occurs. If it doesn't, then un-comment the T0 command, print the file again and see if it occurs. Let us know the results.

    Results of that test:

    • with T0 commented out: There is no X-axis crash, the part prints normally

    • with T0 re-enabled: The head crashes at max X-axis

    So my question is, do I need that T0? What is its purpose?

    The top of the gcode looks like this, (with T0 enabled)

    [[gcode]]
    M107
    M190 S57 ; set bed temperature
    G28								; home all axes (if axis shifting bug is fixed!)
    G32								; execute bed Z-plane  compensation at bed.g 4 points
    G10 P0 X-16 Y-3 Z0.0 S-273 R-273				; set extruder x,y offsets
    M83								; set extruder to relative mode
    G10 P0 S195 R-273						; Set tool 0 operating and standby temperatures
    T0								; select tool ZERO
    
    G21 ; set units to millimeters
    G90 ; use absolute coordinates
    M83 ; use relative distances for extrusion
    G1 E-3.50000 F2400.00000
    
    

  • administrators

    What's happening is that your last bed probe point leaves the head at X=148 from the 4th bed probe point; then you add a -16mm offset in the G10 command. So to be at 148mm in user space, the head has to move to 148-(-16) = 164mm. When it tries to move there, I presume that is beyond the physical bounds of your printer.

    I suggest you work on getting the M208 offsets working. If you printer homes to Xmin and Ymin then it's the low end axis limits that you need to modify, which you do using M208 S1. For example, if your X homing switch triggers when the nozzle is 5mm off the low end of the bed, that's a -5mm offset, so M208 S1 X-5 will tell the firmware this. If also your Y axis triggers when the nozzle is 3mm off the low end of the bed, that's a -3mm offset, so use M208 S1 X-5 Y-3.

    When you have the low end offsets set correctly, after homing if you send G1 X0 Y0 then the nozzle should be over the corner of the bed. Now find out how high X and Y can go before they hit the mechanical stops. Set the M208 S0 X and Y values slightly lower than those X and Y values.

    HTH David



  • Thank you for that explanation. Tomorrow, I will try to set that up.

    But just to be clear, what is the exact order of the commands, and do i put them in each file that I print, or somewhere in the config?

    Currently, I have to reset the printer to cancel the offsets when starting a new print, otherwise they will add together.

    But, why has this behaviour changed in release 1.19?

    And why not just remove T0 from the file?


  • administrators

    The M208 commands go in config.g.

    You could remove the T0 command assuming you also have T0 in config.g, but you would still need to reset the printer before each print. Also the slicer may generate T0. Using M208 to set axis limits instead of using tool offsets will remove the need to set tool offsets.

    The behaviour has changed because the previous behaviour caused serious problems with IDEX printers.



  • Thanks for all this help.

    I'm sorry to be so dumb, but I don't understand what you are suggesting.

    I remove all the offset commands from the gcode files that I print?
    then, in those files I Home all axis, then set the lower limits as

    G28
    M208 S1 X-16 Y-3 Z0

    and what values to give for the upper limits?

    but now where will the head go when I tell it to do the bed compensation at these points?
    X38 Y0
    X38 Y130
    X148 Y130
    X148 Y0

    In other words, how are the x,y values affected by the limits?

    I'm so sorry, but I really don't understand what you are suggesting…

    Thanks so much for your help, I really do appreciate it.
    Cheers,
    Bob


  • administrators

    Once you have set the lower limits, homed the printer, and checked that X=0 Y=0 is the centre corner of the bed, see how far you can move each axis before it gets too close to the mechanical stop. For example, on my Ormerod I can do G1 X215 and it places the head just before mechanical stop at the top of the X axis; so in my M208 S0 command the X parameter is 215.

    Your bed probing positions will need to be defined relative to the corner of the bed. So in your example, you should add 16mm to the X coordinates and 3mm to the Y coordinates of the G30 commands in bed.g.

    I've already told you that the M208 commands go in config.g. You don't need any offset command in your print files. You can keep the G28 homing commands in your print files if you wish.

    HTH David



  • Ok, I'll try that tomorrow..

    But shouldn't X=0, Y=0 be the left lower corner, not the center of the bed?

    I still don't really understand how the limits and the homing interact, though.

    If I put this in the config.g (my bed is 140x140):
    M208 S0 X-16 Y-3 Z0
    M208 S1 X155 Y142

    It will work as expected?

    Then run homing, what will the extruder be set to the corner of the bed? And what will be the x,y position ? 0,0 or 16,3?

    This would be so easy to explain if we were face to face.

    Anyway, tomorrow is another day.

    Thanks again,
    Ciao,
    Bob


  • administrators

    Yes of course I meant corner. xy position 0,0 will place the nozzle at the corner of the bed. When the X endstop switch is triggered during X homing, the X position will be set to -16.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.