Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. timschneider
    • Profile
    • Following 0
    • Followers 0
    • Topics 31
    • Posts 193
    • Best 46
    • Controversial 0
    • Groups 0

    timschneider

    @timschneider

    79
    Reputation
    28
    Profile views
    193
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    timschneider Unfollow Follow

    Best posts made by timschneider

    • 3.5.2 Closed loop SBC Setup Duet3 6HC 2x1HCL+Magnetic Encoder

      @dc42 @chrishamm @T3P3Tony and the whole Duet3D Team! Thank you!

      3.5.2 Closed loop SBC Setup Duet3 6HC 2x 1HCL with Magnetic Encoder on NEMA 17 1.8° LDO Motor

      I have the Closed Loop System running for a week now and have been printing continuously 24/7 on a job that I had to abort six times before. Without the Closed Loop System, I would not be able to print the job!

      Thanks a lot for this! After initial difficulties in tuning the system, because the instructions were written for quadrature shaft encoders, I was able to achieve a high-performance tuning. The Closed Loop System even has a better print quality e.g. because the backlash is compensated. I can run the steppers at full current, higher accelerations, higher speeds and the steppers are even cooler.

      Btw. the printer is loosing the position about every 15 minutes on that print, due to the material. It's our PA6 CF HT which is very stiff and strong, so even the smallest amount of residues will stop/crash the print head. The print takes around 5.5 kg, where the material is around 89€/kg.

      Please find attached a picture in which you can hardly see the misalignments. 2024-10-04-16-58-03-364.jpg

      Chris, after the hard work you put in the SBC setup it runs pretty stable now 🙂 not rock solid, as I can still crash it - but mostly solid 😉

      Keep up the great work!

      posted in General Discussion
      timschneiderundefined
      timschneider
    • Simplyprint.io (unoffical) Duet Connector

      Hi, I came across Simplyprint.io and thought it would be nice to control our printers with Duet control via the interface. It is a cloud based remote / off-side print management tool.
      They do not offer a connector to duet at the moment, so I wrote a connector that allows easy monitoring and control of the printers. Maybe someone here is interested in it.
      You can find it on github and you can run it on a RPi.
      I know it is tempting to use the SBC for that, but you need python >= 3.8 to run it, so either bookworm or bulleseye - buster will not work.

      Some screenshots from my setup:

      db9118a1-42c2-4781-8114-c188fbacb57c-grafik.png
      d0b9e557-c400-4962-9f90-97da387e6be8-grafik.png

      posted in Third-party software
      timschneiderundefined
      timschneider
    • RE: [3.5.0-rc.3+5] [bug] nested while job Illegal para letter '.'

      @chrishamm
      Thanks for the great patch! Your work is outstanding! It's impressive to see the passion and dedication you and the duet3d team put into the software and hardware!

      Now that all the show-stoppers are out of the way, we are going to switch completely to duet3 in the sbc setup. Starting with 4 closed loop steppers with 4 1HCL and 4 open loop steppers directly on the 6HC. Also two filament monitors and two IR probes per machine. This will be followed at a later stage by two tool boards and a distribution board per machine. I am excited to see the results.

      posted in DSF Development
      timschneiderundefined
      timschneider
    • Magnetic Filament Monitor for Automatic E-Step Calibration

      Hi folks,

      I had the idea of a method for automatic e-step calibration. As it is not easy to get the e-step calibration right - in sense of how good the MFM is doing the measurement. So i thought, why not use the MFM in first place?

      There are some requirements in order for the method to work, but these requirements are also positive for the MFM itself.

      • The MFM must be tightly connected to the extruder (stiff and short)
      • The initial calibration of the mm/rev of the MFM must be done by hand or math

      That's it.

      You only need around 500mm of Filament and you are good to go.

      I use the following method

      • set the L parameter of the MFM to your needs, I measured 8mm diameter of the sense wheel, so the circumference is about 25.13mm - I rounded it to 25.3
      • set the min and max allowance values very tight, I use 98% and 102%
      • set the reporting distance very small, I use 0.2mm
      • now start printing a calibration file, where the file is basicly only extruding short chunks of 1mm filament with only 30 mm/min at your desired temperature, in the example 235° for petg carbon filled
      • if the MFM is reporting tooLittleMovement, increase the e-steps
      • if the MFM is reporting tooMuchMovement, decrease the e-steps
      • store the latest reported e-steps in your filament config.

      thats it - works like a charm, and the sporadic false tooLittleMovement error is gone 🙂

      My g-code files for reference only, as they use other macros of our printers.

      0:/gcodes/filament_monitor_calibration.gcode

      if exists(global.mfmcalibration)
        set global.mfmcalibration = true
      else
        global mfmcalibration = true
      
      G10 P0 S235 ; sets the temperature
      M140 P0 S100 ; set bed temp
      
      M107                                        ; fan off
      M144 P0 S1                                  ; activate bed 1 heater
      T0                                          ; select tool 0
      M98 P"0:/sys/meltingplot/home_if_necessary" ; check homing
      G29 S1                                      ; load stored hight map
      
      M83 ; use relative distances for extrusion
      G90 ; use absolute coordinates
      G21 ; set units to millimeters
      
      M116                                        ; wait for all heaters
      
      G11 ; unretract
      
      G1 Z300                                      ; raise z=20mm
      
      G53 G1 X50 Y50 F14400                       ; move printhead to center
      
      G92 E0                                       ; reset e-steps
      
      M572 D0 S0.0                                 ; disable pressure advance
      
      M591 D0 P3 C"e1stop" S1 R98:102 E0.2 L25.3           ; enable MFM
      
      G4 S5 ; wait for restart of MFM
      
      G91 ; relative moves
      ; 500mm
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      
      G10                                          ; retract
      G10 P0 R0 S0                        ; disable hotend
      M140 S0 R0                          ; set bed heater to 0°
      M140 P0 S-273.1                     ; disable bed heater
      T-1                                          ; unselect tool
      
      set global.mfmcalibration = false
      

      0:/sys/filament-error.g

      ; Parameter P description
      ; 2 = noDataReceived
      ; 3 = noFilament
      ; 4 = tooLittleMovement
      ; 5 = tooMuchMovement
      ; 6 = SensorError
      ; 7 = Magnet to weak
      ; 8 = Magnet to strong
      
      if param.P == 2 || param.P == 6
          echo "Filament Sensor Error: " ^ param.P ^ "  sensor : " ^ param.D ^ " - continue printing"
          M99
      
      if param.P == 4
          if !exists(global.mfmcalibration) || global.mfmcalibration == false
              echo "Filament Sensor " ^ param.D ^ ": Too little Filament movement - Possible Reasons: Filament empty, grinding or clogged nozzle."
              M291 P{"Filament Sensor " ^ param.D ^ ": Too little Filament movement - Possible Reasons: Filament empty, grinding or clogged nozzle."} S1 T0
              M25 ; pause print
          else
              M92 E{move.extruders[0].stepsPerMm+0.1}
              echo "E-Steps: " ^ {move.extruders[0].stepsPerMm} ^ ""
          M99 ; leave macro
      
      if param.P == 5
          if !exists(global.mfmcalibration) || global.mfmcalibration == false
              echo "Filament Sensor " ^ param.D ^ ": Too much Filament movement - Possible Reasons: Spool skipped or Filament pushed into PTFE tube."
              M291 P{"Filament Sensor " ^ param.D ^ ": Too much Filament movement - Possible Reasons: Spool skipped or Filament pushed into PTFE tube."} S1 T0
              M25 ; pause print
          else
              M92 E{move.extruders[0].stepsPerMm-0.1}
              echo "E-Steps: " ^ {move.extruders[0].stepsPerMm} ^ ""
          M99 ; leave macro
      
      echo "Filament error: " ^ param.P ^ " on sensor " ^ param.D ^ " - paused"
      M291 P{"Filament Sensor " ^ param.D ^ ": " ^ param.S ^ " - Paused"} S1 T0
      M25 ; pause
      
      posted in Filament Monitor
      timschneiderundefined
      timschneider
    • Howto make the filament monitor more robust

      Hi,

      we sometimes face the problem, that the filamentsensor is producing "false" errors. They are actually true from the MFM perspective resulting in 0% extrusion or even minus values, but only minor in nature e.g. due to friction or some sort of untangling of the filament spool and will not affect the print result at all.
      So the current range will not work on these kind of errors.

      In order to reduce these "false" alarms and resulting print pause, I came up with the idea of some kind of a backoff counter.

      It works the following:

      • count the filament errors
      • if the count will go above a threshold, pause the print.
      • reduce the count if there was no filament error within a relaxe duration e.g. 60s

      reduce the check distance in order not to loose resultion. e.g. from

      M591 D0 P3 C"e1stop" S1 R70:120 E6 L25.3
      

      to

      M591 D0 P3 C"e1stop" S1 R70:120 E2 L25.3
      

      with a counter of 3.

      the output looks like the following below the threshold:
      5fc41dd3-2b6b-4faa-9a6f-a88428e74b4b-grafik.png

      and above the threshold:
      0dcc5144-4509-480b-a54e-7e6902a0229a-grafik.png

      The code 0:/sys/filament-error.g:

      ; Parameter P description
      ; 2 = noDataReceived
      ; 3 = noFilament
      ; 4 = tooLittleMovement
      ; 5 = tooMuchMovement
      ; 6 = SensorError
      ; 7 = Magnet to weak
      ; 8 = Magnet to strong
      
      if !exists(global.mfmbackoff)
        global mfmbackoff = 3
      
      if !exists(global.lastMFMBackoffCheck)
        global lastMFMBackoffCheck = state.upTime
      
      if param.P == 2 || param.P == 6
          echo "Filament Sensor Error: " ^ param.P ^ "  sensor : " ^ param.D ^ " - continue printing"
          M99
      
      if param.P == 4
          if exists(global.mfmcalibration) && global.mfmcalibration == true
              M92 E{move.extruders[0].stepsPerMm+0.1}
              echo "E-Steps: " ^ {move.extruders[0].stepsPerMm} ^ ""
          else
              echo "Filament Sensor " ^ param.D ^ ": Too little Filament movement - Possible Reasons: Filament empty, grinding or clogged nozzle."
              
              set global.lastMFMBackoffCheck = state.upTime
      
              if global.mfmbackoff == 0
                  set global.mfmbackoff = 3
                  M291 P{"Filament Sensor " ^ param.D ^ ": Too little Filament movement - Possible Reasons: Filament empty, grinding or clogged nozzle."} S1 T0
                  M25 ; pause print
              else
                  set global.mfmbackoff = global.mfmbackoff - 1
                  echo "Filament Sensor Backoffcounter: " ^ global.mfmbackoff ^ ""
              
          M99 ; leave macro
      
      if param.P == 5
          if exists(global.mfmcalibration) && global.mfmcalibration == true
              M92 E{move.extruders[0].stepsPerMm-0.1}
              echo "E-Steps: " ^ {move.extruders[0].stepsPerMm} ^ ""
          else
              echo "Filament Sensor " ^ param.D ^ ": Too much Filament movement - Possible Reasons: Spool skipped or Filament pushed into PTFE tube."
              M291 P{"Filament Sensor " ^ param.D ^ ": Too much Filament movement - Possible Reasons: Spool skipped or Filament pushed into PTFE tube."} S1 T0
              M25 ; pause print
              
          M99 ; leave macro
      
      echo "Filament error: " ^ param.P ^ " on sensor " ^ param.D ^ " - paused"
      M291 P{"Filament Sensor " ^ param.D ^ ": " ^ param.S ^ " - Paused"} S1 T0
      M25 ; pause
      

      0:/sys/daemon.g:

      if exists(global.mfmbackoff) && exists(global.lastMFMBackoffCheck) && global.mfmbackoff < 3 && ((global.lastMFMBackoffCheck + 60) < state.upTime)
          set global.mfmbackoff = global.mfmbackoff + 1
          set global.lastMFMBackoffCheck = state.upTime
      
      posted in Filament Monitor
      timschneiderundefined
      timschneider
    • RE: Magnetic Filament Monitor for Automatic E-Step Calibration

      ok it took me a little longer to get this up, but this is my current version of the initial automatic filament calibration script.
      It will automatically calibrate the e-steps and the non linear extrusion.

      It will only run in 3.5 and as a macro.

      The copyright of the script is

      Tim Schneider
      Meltingplot GmbH
      CC BY-SA
      

      content of 0:/macros/meltingplot/filament-extrusion-calibration

      if !exists(global.ignoreMFMevents)
        global ignoreMFMevents = true
      else
        set global.ignoreMFMevents = true
      
      var filamentMonitorPin = "e1stop"
      var filamentMonitorCircumference = 25.3
      
      var extrusionDistance = 20                  ; distance for e-step calibration
      
      ; speeds in mm/s for NLE to test
      var extrusionSpeeds = {0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0}
      
      M107                                        ; fan off
      T0                                          ; select tool 0
      M98 P"0:/sys/meltingplot/home_if_necessary" ; check homing
      G29 S1                                      ; load stored hight map
      
      M83 ; use relative distances for extrusion
      G90 ; use absolute coordinates
      G21 ; set units to millimeters
      
      var currentTool = state.currentTool
      var currentHeater = tools[0].heaters[var.currentTool]
      var currentTemp = heat.heaters[var.currentHeater].active
      
      if var.currentTemp < 180 || var.currentTemp > 355
        set var.currentTemp = 180 
      
      M291 P"Please set desired filament temperature" R"Filament Temp" S6 L180 H355 F{var.currentTemp}
      set var.currentTemp = input
      G10 P0 S{var.currentTemp}
      
      M116                                        ; wait for all heaters
      
      G11 ; unretract
      
      G1 Z300 F3600                               ; raise z=20mm
      
      G53 G1 X50 Y50 F14400                       ; move printhead to center
      
      G92 E0                                       ; reset e-steps
      
      M220 S100                                    ; Set speed factor override percentage
      M221 S100                                    ; Set extrude factor override percentage
      M572 D0 S0.0                                 ; disable pressure advance
      M592 D0 A0.0 B0.0                            ; disable non-linear-extrusion
      
      M591 D0 P0
      G4 S1
      M591 D0 P3 C{var.filamentMonitorPin} S2 R98:102 E0.2 L{var.filamentMonitorCircumference}    ; enable MFM on all moves
      
      G4 S5 ; wait for restart of MFM
      
      G91 ; relative moves
      ; 15mm
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      
      ; the mfm should be calibrated now
      
      if sensors.filamentMonitors[0].calibrated == null
        echo "Cannot calibrate filament monitor within 15mm - error!"
        set global.ignoreMFMevents = false
        M99
      
      G4 S1 ; wait for filament monitor send timeout
      
      ; start e-step calibration
      var totalDistanceBase = (sensors.filamentMonitors[0].calibrated.totalDistance / sensors.filamentMonitors[0].calibrated.mmPerRev * sensors.filamentMonitors[0].configured.mmPerRev)
      
      G1 X{var.extrusionDistance} E{var.extrusionDistance} F30
      
      G4 S1 ; wait for filament monitor send timeout
      
      var currentMeasured = (sensors.filamentMonitors[0].calibrated.totalDistance / sensors.filamentMonitors[0].calibrated.mmPerRev * sensors.filamentMonitors[0].configured.mmPerRev)
      
      var newESteps = {floor(move.extruders[0].stepsPerMm / ((var.currentMeasured-var.totalDistanceBase)/var.extrusionDistance)*100)/100}
      
      set var.totalDistanceBase = (sensors.filamentMonitors[0].calibrated.totalDistance / sensors.filamentMonitors[0].calibrated.mmPerRev * sensors.filamentMonitors[0].configured.mmPerRev)
      
      G1 X{var.extrusionDistance} E{var.extrusionDistance} F30
      
      G4 S1 ; wait for filament monitor send timeout
      
      set var.currentMeasured = (sensors.filamentMonitors[0].calibrated.totalDistance / sensors.filamentMonitors[0].calibrated.mmPerRev * sensors.filamentMonitors[0].configured.mmPerRev)
      
      set var.newESteps = var.newESteps + {floor(move.extruders[0].stepsPerMm / ((var.currentMeasured-var.totalDistanceBase)/var.extrusionDistance)*100)/100}
      
      set var.totalDistanceBase = (sensors.filamentMonitors[0].calibrated.totalDistance / sensors.filamentMonitors[0].calibrated.mmPerRev * sensors.filamentMonitors[0].configured.mmPerRev)
      
      G1 X{var.extrusionDistance} E{var.extrusionDistance} F30
      
      G4 S1 ; wait for filament monitor send timeout
      
      set var.currentMeasured = (sensors.filamentMonitors[0].calibrated.totalDistance / sensors.filamentMonitors[0].calibrated.mmPerRev * sensors.filamentMonitors[0].configured.mmPerRev)
      
      echo "Current E-Steps: " ^ {move.extruders[0].stepsPerMm}
      set var.newESteps = (var.newESteps + {floor(move.extruders[0].stepsPerMm / ((var.currentMeasured-var.totalDistanceBase)/var.extrusionDistance)*100)/100})
      set var.newESteps = floor(var.newESteps / 3.0 * 100)/100
      echo "New E-Steps: " ^ var.newESteps
      
      echo >{"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-esteps.g"} "; calibration temperature: " ^ var.currentTemp
      echo >>{"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-esteps.g"} "M92 E" ^ var.newESteps
      
      M92 E{var.newESteps} ; activate new e-steps
      
      ; start non linear calibration
      
      G92 E0                                       ; reset e-steps
      
      ; https://www.bragitoff.com/2018/06/polynomial-fitting-c-program/
      ; speed to test
      var x = var.extrusionSpeeds
      ; number of data points
      var N = #var.x
      ; degree of polynomial
      var n = 2
      ; echo "x: " ^ var.x
      ; echo "N: " ^ var.N
      ; echo "n: " ^ var.n
      
      ; array to store the y-axis data points
      var y = vector(var.N, 0.0)
      
      ; gather y data points
      ;set var.y = {0.0, 0.0, 0.0118, 0.0207, 0.0247, 0.0356, 0.0507, 0.0613, 0.0751, 0.0922, 0.1234, 0.1438}
      
      M591 D0 P0
      G4 S1
      M591 D0 P3 C{var.filamentMonitorPin} S2 R98:102 E0.2 L{var.filamentMonitorCircumference}    ; enable MFM on all moves
      
      G4 S5 ; wait for restart of MFM
      
      G91 ; relative moves
      ; 15mm
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      G1 X1 E1 F30
      
      ; the mfm should be calibrated now
      
      if sensors.filamentMonitors[0].calibrated == null
        echo "Cannot calibrate filament monitor within 15mm - error!"
        set global.ignoreMFMevents = false
        M99
      
      G4 S1 ; wait for filament monitor send timeout
      
      ; sensors.filamentMonitors[0].calibrated.totalDistance is including extrusion correction like pressure advance, non linear extrusion and so on ...
      ; move.extruders[0].rawPosition is the extrusion without correction values
      ; sensors.filamentMonitors[0].calibrated.totalDistance / sensors.filamentMonitors[0].calibrated.mmPerRev is the number of measured revolutions
      
      var i = 0
      
      var first = true
      var check = false
      var nle_a = 0
      var nle_b = 0
      var nn = var.n
      var success = false
      var mean_error = 0.0
      var min_error = 100.0
      var max_error = 0.0
      var s = 0.0
      
      while true
        ; gather y-values for the compensated x-values
        set var.i = 0
        set var.n = var.nn
        set var.mean_error = 0.0
        set var.min_error = 100.0
        set var.max_error = 0.0
        var errors = vector(var.N, 0.0)
      
        while {var.i < var.N}
          set var.totalDistanceBase = (sensors.filamentMonitors[0].calibrated.totalDistance / sensors.filamentMonitors[0].calibrated.mmPerRev * sensors.filamentMonitors[0].configured.mmPerRev)
          var comp_f = var.x[var.i] * 60
          if var.check == false && var.first == false
            set var.comp_f = var.comp_f * (1 + var.y[var.i])
          
          var currentCommanded = 100
          G1 X{mod(var.i,2)=0?100:-100} E{var.currentCommanded} F{var.comp_f}
          
          G4 S1 ; wait for filament monitor send timeout
          
          set var.currentMeasured = (sensors.filamentMonitors[0].calibrated.totalDistance / sensors.filamentMonitors[0].calibrated.mmPerRev * sensors.filamentMonitors[0].configured.mmPerRev)
        
          var error = (1.0-((var.currentMeasured-var.totalDistanceBase)/var.currentCommanded))
          set var.min_error = min(var.min_error, var.error)
          set var.max_error = max(var.max_error, var.error)
          set var.errors[var.i] = var.error
      
          echo "F" ^ {var.comp_f} ^ ": " ^ {var.error*100.0} ^ "% error."
      
          if var.comp_f < 60 && var.error >= 0.1
            echo "The filament error exceeds the expected value at low speed. This may be due to grinding. Repeating!"
            G1 E-10 F60 ; backoff some filament
            G1 E15 F60 ; extrude some material to get pass the grinding
            continue
      
          if var.check == false
            set var.y[var.i] = var.error
            if var.y[var.i] < 0.01
              if var.first == true && var.i < 1 && var.y[var.i] < -0.01
                echo "Calibrate E-Steps first."
                M99
              set var.y[var.i] = 0.01
      
            ; if the error is larger than 10% or more than twice as the previous value - stop 
            if var.y[var.i] > 0.1 || ( var.i > 0 && var.y[var.i-1] > 0.025 && var.y[var.i] > (var.y[var.i-1] * 2))
              if var.first == true && var.i < 1
                echo "Calibrate E-Steps first."
                M99
              set var.N = var.i
              echo "New N: " ^ var.N
              break
      
          set var.i = var.i + 1
        
        set var.first = false
      
        var k = 0
        while {var.k < var.N}
          set var.mean_error = var.mean_error + var.errors[var.k]
          set var.k = var.k + 1
      
        set var.mean_error = var.mean_error / var.N
        echo "mean error:" ^ var.mean_error
      
        set var.k = 0
        set var.s = 0.0
      
        while {var.k < var.N}
          set var.s = pow(var.errors[var.k] - var.mean_error, 2.0)
          set var.k = var.k + 1
      
        set var.s = sqrt(var.s / var.N)
        echo "standard deviation: " ^ var.s
      
        if var.check
          set var.check = false
          if var.s <= 0.005
            set var.success = true
            break
          elif var.s > 0.005 && var.s < 0.25
            M592 D0 A0 B0
            continue
          else
            set var.success = false
            break
      
        ; echo "y: " ^ var.y
        
        ; an array of size 2*n+1 for storing N, Sig xi, Sig xi^2, ...
        var X = vector(2*var.n+1, 0.0)
        ; echo "X: " ^ var.X
        
        set var.i = 0
        while {var.i <= (2*var.n)}
          var j = 0
          while {var.j < var.N}
            set var.X[var.i] = var.X[var.i] + pow(var.x[var.j], var.i)
            set var.j = var.j + 1
          set var.i = var.i + 1
        ; echo "X: " ^ var.X
        
        ; the normal argumented matrix
        
        var B = vector(var.n+1, vector(var.n+2, 0.0))
        var Y = vector(var.n+1, 0.0)
        ; echo "B: " ^ var.B
        ; echo "Y: " ^ var.Y
        
        set var.i = 0
        while {var.i <= var.n}
          var j = 0
          while {var.j < var.N}
            set var.Y[var.i] = var.Y[var.i] + pow(var.x[var.j], var.i) * var.y[var.j]
            set var.j = var.j + 1
          set var.i = var.i + 1
        ; echo "Y: " ^ var.Y
        
        set var.i = 0
        while {var.i <= var.n}
          var j = 0
          while {var.j <= var.n}
            set var.B[var.i][var.j] = var.X[var.i+var.j]
            set var.j = var.j + 1
          set var.i = var.i + 1
        ; echo "B: " ^ var.B
        
        set var.i = 0
        while {var.i <= var.n}
          set var.B[var.i][var.n+1] = var.Y[var.i]
          set var.i = var.i + 1
        ; echo "B: " ^ var.B
        
        var A = vector(var.n+1, 0.0)
        ; echo "A: " ^ var.A
        
        ; gaussEliminationLS
        
        var m = var.n + 1
        set var.n = var.n + 2
        
        set var.i = 0
        while {var.i < (var.m-1)}
          ;Partial Pivoting
          set var.k = var.i + 1
          while {var.k < var.m}
            ;If diagonal element(absolute vallue) is smaller than any of the terms below it
            if abs(var.B[var.i][var.i]) < abs(var.B[var.k][var.i])
              ;Swap the rows
              var j = 0
              while {var.j < var.n}
                var temp = var.B[var.i][var.j]
                set var.B[var.i][var.j] = var.B[var.k][var.j]
                set var.B[var.k][var.j] = var.temp
                set var.j = var.j + 1
            set var.k = var.k + 1
        
          ;Begin Gauss Elimination
          set var.k = var.i + 1
          while {var.k < var.m}
            var term = var.B[var.k][var.i] / var.B[var.i][var.i]
            var j = 0
            while {var.j < var.n}
              set var.B[var.k][var.j] = var.B[var.k][var.j] - var.term * var.B[var.i][var.j]
              set var.j = var.j + 1
            set var.k = var.k + 1
          set var.i = var.i + 1
        
        ;Begin Back-substitution
        set var.i = var.m - 1
        while {var.i >= 0}
          set var.A[var.i] = var.B[var.i][var.n-1]
          var j = var.i + 1
          while {var.j < (var.n - 1)}
            set var.A[var.i] = var.A[var.i] - var.B[var.i][var.j] * var.A[var.j]
            set var.j = var.j + 1
        
          set var.A[var.i] = var.A[var.i] / var.B[var.i][var.i]
          set var.i = var.i - 1
        
        set var.nle_a = var.A[1]
        set var.nle_b = var.A[2]
      
        M592 D0 A{var.A[1]} B{var.A[2]} L0.2
        echo "Test: M592 D0 A" ^ var.nle_a ^ " B" ^ var.nle_b ^ " L0.2"
        set var.check = true
      
      if var.success
        echo "NLE calibration finished!"
        echo "M592 D0 A" ^ var.nle_a ^ " B" ^ var.nle_b ^ " L0.2"
        echo >{"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-nle.g"} "; max F" ^ var.x[var.N-1] * 60 ^ " mm/min or " ^ var.x[var.N-1] * 6.38 ^ "mm³/s"
        echo >>{"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-nle.g"} "; temp: " ^ var.currentTemp ^ " °C"
        echo >>{"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-nle.g"} "; mean error: " ^ var.mean_error
        echo >>{"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-nle.g"} "; min error: " ^ var.min_error
        echo >>{"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-nle.g"} "; max error: " ^ var.max_error
        echo >>{"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-nle.g"} "; standard deviation: " ^ var.s
        echo >>{"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-nle.g"} "M592 D0 A" ^ var.nle_a ^ " B" ^ var.nle_b ^ " L0.2"
      else
        echo "NLE calibration falied!"
      
      ; end calibration
      
      G10                                          ; retract
      G10 P0 R0 S0                                 ; disable hotend
      M140 S0 R0                                   ; set bed heater to 0°
      M144 P0                                      ; disable bed heater
      T-1                                          ; unselect tool
      
      M591 D0 P0                                   ; reset filament sensor
      M98 P"0:/sys/meltingplot/machine-override"              ; Load Machine specific overrides
      
      set global.ignoreMFMevents = false
      

      add the following lines to your 0:/sys/filament-error.g

      if exists(global.ignoreMFMevents) && global.ignoreMFMevents == true
        M99
      

      and the following to your filament config

      if fileexists({"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-esteps.g"})
        M98 P{"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-esteps.g"}
      
      if fileexists({"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-nle.g"})
        M98 P{"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-nle.g"}
      

      the macro M98 P"0:/sys/meltingplot/machine-override" will reset the filament monitor to its default, so you need to adapt this.

      sample output

      f834b0ec-b3a6-44b4-9e31-29079ebb4f11-grafik.png

      85c20172-2903-4854-9ef2-2a2c7b67160e-grafik.png

      b743d441-5edc-4105-a7b4-79453b3df13c-grafik.png

      Another thing I would like to add is pressure advance calibration, as I think, it should be possible to determine the stiffness of the filament with the filament monitor and predict the pressure advance value. Maybe somesome can help here?

      Btw. this script helped me to write a simple adaptive temp control in correlation to the extrusion speed, which will crank up the extrusion flow rate upto 30% and make the NLE look linear. Maybe something for the firmware @dc42

      content of daemon.g

      while true
        if exists(global.initial_temp) == false
          global initial_temp = 0
      
        if !exists(global.compensated_temp)
          global compensated_temp = 0
      
        if !exists(global.is_compensated)
          global is_compensated = false
      
        if !exists(global.filament_extrusion_temp_compensation_factor)
          global filament_extrusion_temp_compensation_factor = 1
      
        if exists(global.filament_extrusion_temp_compensation) && global.filament_extrusion_temp_compensation
          if ( {move.currentMove.extrusionRate} > 0 )
            if global.initial_temp == 0 || global.compensated_temp != {heat.heaters[1].active}
              set global.initial_temp = {heat.heaters[1].active}
      
            set global.compensated_temp = global.initial_temp + min({move.currentMove.extrusionRate} * global.filament_extrusion_temp_compensation_factor, 100)
            G10 P0 S{global.compensated_temp} R{global.initial_temp-50}
            set global.is_compensated = true
          elif (global.initial_temp != 0 && {heat.heaters[1].active} != 0 && global.is_compensated)
            G10 P0 S{global.initial_temp} R{global.initial_temp-50}
            set global.is_compensated = false
      

      if you want to use the temp compensation add the following to your filament config and rerun the auto filament calibration

      set global.filament_extrusion_temp_compensation_factor = 8
      
      if !exists(global.filament_extrusion_temp_compensation)
        global filament_extrusion_temp_compensation = true
      
      posted in Filament Monitor
      timschneiderundefined
      timschneider
    • Indicate that a Command is added to the Movement Queue

      The behaviour of some G and M Codes in relation to the movement queue has silently changed in the past.

      This is for example the reason why I only add a single line of code M112 in the emergency stop trigger, even if I would add more commands to it - if a customer is updating the firmware, it may break the script.

      In the recent days, I saw other people getting in touch with the behaviour of the movment queue and it is kind of a pitfall if you don't know it.

      So in order to make people aware of it, I would like to propose a small icon next to the G-Code Command in the Docs to indicate, that the command is added to the movement queue. The Icon is linked to a page explaining the movement queue and show examples on how to get around the queue, e.g. use expressions at the moment.

      f7781860-e4b5-452b-939a-8c334582f614-grafik.png

      what do you think about it?

      the icon shown is from flaticon, but that is not important.

      posted in Documentation
      timschneiderundefined
      timschneider
    • Automated compiling to perform CD/CI

      Hello,
      i recently stumpled over some minor problems or wanted improvements with the RRF in different locations -> e.g. M200 SafeState on power down, heater power consumption / limiter, virtual endstops to map events like heaterfault to trigger#.g ... and while doing so I needed to compile the firmware to check quick fixed. Then I thought, that it would be usefull to automate the firmware creation for RRF with github actions, so that every push or merge request is automaticly checked against the current dev of the project and no one really needs to care about the dev environment anymore.
      I'm currently on the Duet2 Ethernet, thats why I startet there and following the build instructions, one should start with the CoreNG, so did I. Following the variants/duetNG/build_gcc make file and logic, I copied that build logic to all dependencies to simplify maintainance.

      I will upload all the modificaitions I did to my github today, but as a starting point the RRFLibraries in dev branch are already up.

      c571f6a3-edd5-4af8-a48d-55d18ea10f59-grafik.png
      https://github.com/timschneider/RRFLibraries/commit/2a6808c4c2c5ab9cbae5b86d237f57f1491634a4/checks?check_suite_id=399291871

      So to conclude what I did:

      • changed the build scripts in variants/duetNG/build_gcc of CoreNG to perform like the Eclipse Build logic, e.g. with recursion and exlusion logic
      • copied that build scripts to every project (CoreNG, FreeRTOS, RRFLibraries, RepRapFirmware, DuetWiFiSocketServer (not yet))
      • adapted the build scripts according to the .cproject files of each project to behave similar to eclipse auto makefile generation
      • put the different dependencies in the github actions file (WIP)

      This allows me to make a change to the code and get the newly build firmware right from github in an automated fashion.

      what do you think about it? should we continue to work on that?

      Tim

      0 timschneider committed to timschneider/RRFLibraries
      Update ccpp.yml
      posted in Firmware developers
      timschneiderundefined
      timschneider
    • RE: [3.5.0-rc.3] M122 causing Lost connection to Duet (Timeout

      I've added corresponding issue and pull request on Github.
      https://github.com/Duet3D/RepRapFirmware/pull/955

      The Binary for MB6HC
      Duet3Firmware_MB6HC.bin

      That solved the problem for me.

      1f1a35c0-1c06-40dd-9ae8-88f7ff7dce52-grafik.png

      timschneider opened this pull request in Duet3D/RepRapFirmware

      closed Fix M122 StuckInSpinLoop, Gcodes spinning #955

      posted in DSF Development
      timschneiderundefined
      timschneider
    • RE: Movement after M112 E-Stop!

      @dc42

      I think it is a success!

      without the IterateDrivers fix there is a small delay 1.34s in the step generation shut down, but the drivers are not re-enabled.

      SDS00007.png

      with both patches 'no' delay at all.
      SDS00008.png

      posted in CNC
      timschneiderundefined
      timschneider

    Latest posts made by timschneider

    • RE: [feature] Adaptive / Feedforward Temperature setpoint

      @yoshimitsuspeed said in [feature] Adaptive / Feedforward Temperature setpoint:

      As I suspected I think the biggest evolution from here would be to use a nominal temp and printing speed in the middle somewhere and then run hotter for faster, cooler for slower.

      first find a S value that fits your setup!

      you can already archive this by tuning the algorithm with the lowest possible temperature for the filament T_nom at nominal speed, e.g. F30 ( the speed you use to calibrate the e-steps). Now go to the upper end, set the hotend temp to the highest possible temperature T_max you want to extrude the filament. Now determine the maximal througput for T_max at speed F_max (use the determind maximum flow rate as flow limit in the slicer). Set the temp in the slicer to T_nom. Determine the T parameter for the temp increase from T_nom to T_max with F_nom to F_max - thats it.

      An Example for PETG
      T_nom: 190 °C
      F_nom: 30 mm/min -> 0.5mm/s
      T_max: 275 °C
      F_max: 960 mm/min (40mm³ for 1.75mm FIlament) -> 16mm/s

      T = (T_max - T_nom) /(F_max-F_nom) = 85°C / 15.5 mm/s = 5.48 °C / mm/s

      e.g. for 24 mm³/s (1.75mm filament) it will correspond to around 245°C which is like common sense for petg.
      Bare in mind that you need to tune Non Linear Extrusion after appling heater feed forward! I disable NLE for heater feedforward tuning, and tune NLE after that.

      for calibration, you always have to move one non extruder axis with the extruder axis e.g.
      G1 E100 F30 for e-step calibration (do not apply NLE / or feed forward)
      G90 G1 X0 F2000 G91 G1 E100 X100 F960 for flowrate at F_max (apply feed forward)

      the lookahead from dc42 will take care of the average and will keep the temp high for normal crusing speeds 🙂

      posted in Firmware developers
      timschneiderundefined
      timschneider
    • RE: Nonlinear extrusion

      @yoshimitsuspeed
      If you use the Magnetic FIlament Monitor from Duet3d you can try to use my improved automatic calibration macro for NLE by @AndyE3D
      https://forum.duet3d.com/post/347692

      the public version of mine is only working in the latest firmware 3.6 in standalone mode / and not working in SBC mode.

      posted in General Discussion
      timschneiderundefined
      timschneider
    • RE: [3.6.0-rc.1] unexpected extruder reversing

      @timschneider
      maybe its just extruder skipping. I downgraded the unit to 3.5.4 and reprint the file - same clong sound in z=3.8 and PA and IS enabled. strange at that slow flow rate ... and without beeing noticed by the filament monitor ?!

      e145cb40-69d6-4f90-bf7f-3c0a50598d3f-grafik.png

      flowrate is just about 3-4 mm³/s, while the rest of the print is upto 20 mm³/s and there is no such clong sound.
      306cf7fc-1b72-489c-83c3-c38fca135bd2-grafik.png

      posted in Beta Firmware
      timschneiderundefined
      timschneider
    • [3.6.0-rc.1] unexpected extruder reversing

      Hi duet3d,
      I encountered the following while printing.
      The extruder is reversing mid move. Input shaping and pressure advance is disabled.

      Machine:

      • Duet 3 MB6HC
      • Duet 3 Expansion EXP1HCL running closed loop
      • Duet 3 Expansion EXP1HCL running closed loop
      • SBC setup
      • CoreXY

      2025-03-08-10-51-22-702(1).mp4
      HQ from the reversing
      2025-03-08-10-51-22-702_trim.mp4

      Content of config.g

      ; Configuration file for Duet 3
      ; executed by the firmware on start-up
      
      ; General preferences
      G90                                                     ; send absolute coordinates...
      M83                                                     ; ...but relative extruder moves
      M550 P"Meltingplot-MBL-480-vaswsq"                      ; set printer name
      
      M669 K1 S2 T1                                           ; select CoreXY mode
      
      M551 P"reprap"                                      ; set password
      
      ; Drives
      ;M569 P0 S0                                              ; physical drive 0 goes forwards (x - front)
      ;M569 P1 S1                                              ; physical drive 1 goes backwards (y - rear)
      M569 P2 S0                                              ; physical drive 2 goes forwards (left)
      M569 P3 S0                                              ; physical drive 3 goes forwards (rear right)
      M569 P4 S0                                              ; physical drive 4 goes forwards (front right)
      M569 P5 S1                                              ; physical drive 5 goes forwards (extruder)
      
      G4 S5                                                   ; wait for expansion boards
      
      M569.1 P50.0 T3 E2.0:4.0 S200 R210 I1500 D0.04 V600 A300000 H0.3 ; Configure the Duet 3 Expansion 1HCL board at CAN address 50 with a Duet 3 magnetic encoder, warn if 1 fullstep threshold exceeded, error if 2 full steps threshold exceeded.
      M569 P50.0 D4 S0 ; Configure the motor on the Duet 3 Expansion 1HCL controller at can address 50 as being in closed-loop drive mode (D4) and reversed (S0)
      
      M569.1 P51.0 T3 E2.0:4.0 S200 R210 I1500 D0.04 V600 A250000 H0.3 ; Configure the Duet 3 Expansion 1HCL board at CAN address 50 with a Duet 3 magnetic encoder, warn if 1 fullstep threshold exceeded, error if 2 full steps threshold exceeded.
      M569 P51.0 D4 S1 ; Configure the motor on the Duet 3 Expansion 1HCL controller at can address 51 as being in closed-loop drive mode (D4) and not reversed (S1)
      
      M584 X50.0 Y51.0 Z2:3:4 E5                                    ; set drive mapping
      
      M350 E16 I1                                             ; configure microstepping with interpolation
      M350 Z16 I1                                             ; configure microstepping with interpolation
      M350 X16 Y16 I1                                         ; configure microstepping without interpolation
      M92 X80 Y80 Z400 E807.5                                 ; set steps per mm
      
      M566 X600.0 Y600.0 Z12.00 E480.00 P1                    ; set maximum instantaneous speed changes (mm/min) and apply jerk on every move
      M593 P"zvddd" F40                                       ; cancle ringing at 40Hz
      M203 X18000.00 Y18000.00 Z1200.00 E3600.00              ; set maximum speeds (mm/min)
      M201 X4000.00 Y4000.00 Z70.00 E3500.00                  ; set accelerations (mm/s^2)
      M204 P1500 T4000                                         ; Set printing and travel accelerations
      M906 X2200 Y2200 Z1500 E1800 I50                        ; set motor currents (mA) and motor idle factor in per cent
      M84 S30                                                 ; Set idle timeout
      M917 X0 Y0                                              ; set idle current to zero
      
      ; Axis Limits
      M208 X0 Y0 Z0 S1                                        ; set axis minima
      M208 X851 Y405 Z1396 S0                                 ; set axis maxima
      
      ; Endstops
      M574 X1 S1 P"io5.in"                                    ; configure active-high endstop for low end on X via pin io5.in
      M574 Y2 S1 P"io6.in"                                    ; configure active-high endstop for high end on Y via pin io6.in
      M574 Z2 S4                                              ; configure sensorless endstop on high end of Z
      
      ; Led
      M950 P0 C"out3"                                        ; Configure P0 as output for LED Strip
      M42 P0 S0.25                                            ; Set LEDs to 25%
      
      ; ATX PS_ON
      ; M80 enable ATX power
      ; M81 disable ATX power
      ; our PSU uses an inverted PS_ON logic
      M80 C"!pson" ; inverts the PS_ON output
      
      ; Heaters
      M950 H0 C"nil"
      M950 H1 C"nil"
      
      ; Bed Heaters
      M308 S0 P"temp0" Y"thermistor" T100000 B4598 C8.68e-08 A"bed" ; configure sensor 0 as thermistor on pin temp0
      M950 H0 C"out7" T0 Q10                                  ; create bed heater output on duex.fan3 and map it to sensor 0 and set PWM 10Hz
      M307 H0 A65.4 C210.5 D1.0 S1.00 V24.4 B0                ; disable bang-bang mode for the left bed heater and set PWM limit
      M140 P0 H0                                              ; map heater0 to bed
      M143 H0 S120                                            ; set temperature limit for heater 0 to 120C
      M570 H0 P5 T10 S10                                      ; Enable heater fault detection (Trigger Time 5sec, temp deviation 10°, cancel print after 10min) 
      
      ; Hotend
      M308 S2 P"spi.cs0" Y"rtd-max31865" A"hotend"            ; configure sensor 2 as rtd PT100 on pin spi.cs0
      M950 H1 C"out1" T2                                     ; create nozzle heater output on out1 and map it to sensor 2
      M143 H1 S350                                            ; set temperature limit for heater 2 to 350C
      M307 H1 A323.8 C188.4 D4.9 S1.00 V24.3 B0               ; disable bang-bang mode for the nozzle heater and set PWM limit
      M570 H1 P20 T25 S10                                     ; Enable heater fault detection (Trigger Time 10sec, temp deviation 15°, cancel print after 10min) 
      
      M308 S3 Y"mcu-temp" A"mcu-temp"                         ; configure sensor 3 as temp sens for the mcu
      
      ; Fans
      M950 F0 C"out5" Q250                                    ; create fan 0 (cooling fan) on pin out5 and set its frequency
      M106 P0 S0 H-1                                          ; set fan 0 value. Thermostatic control is turned off
      M950 F1 C"out4" Q250                                    ; create fan 1 (radiator fan) on pin out4 and set its frequency
      M106 P1 H2 T45 L1.0 X1.0 B0.0                           ; set fan 1 value. Thermostatic control is turned on
      M950 F2 C"out9" Q250                                    ; create fan 2 (duet internal fan) on pin out6 and set its frequency
      M106 P2 S1 H3 T30:40 L0.35 X1.0 B0.25                   ; set fan 2 value. Thermostatic control is turned on
      
      ; Tools
      M563 P0 D0 H1 F0                                        ; define tool 0
      G10 P0 X0 Y0 Z0                                         ; set tool 0 axis offsets
      G10 P0 R0 S0                                            ; set initial tool 0 active and standby temperatures to 0C
      
      ; Z-Probe
      M558 P8 C"io1.in" H6 F240 T14400 A3                     ; set Z probe type to unfiltered digital and the dive height + speeds probe every point three times
      G31 P500 X8.6 Y25.5 Z2.0 T0.00118 S87.5 H0              ; set Z probe trigger value, offset and trigger height, try to set it to whole number of x/8mm pitch/200 steps-rev / 16 micro-step 
      M557 X{sensors.probes[0].offsets[0],move.axes[0].max-sensors.probes[0].offsets[0]} Y{sensors.probes[0].offsets[1],move.axes[1].max-sensors.probes[0].offsets[1]} P18:8                        ; define mesh grid
      M376 H15                                                ; taper out z correction over 10mm height
      
      M915 X Y S8 F0 R3 H200                                  ; configure stall detection on X and Y without Filter (1 Full Steps)
                                                              ; and min 200 steps/sec (40mm/sec) (concider motor current 1A) and execute rehome.g on stall
      M915 Z S4 F0 R0                                         ; configure stall detection on Z for sensor less homing
      
      M404 N2.85
      M200 D2.85 S0                                             ; set filament diameter to 2.85mm
      ;M200 D0                                                 ; disable volumetric extrusion cause its faulty in firmware
      M207 S1.0 R0.0 F1620 T840 Z0.1                          ; Use Firmware retract with 1.0mm retract, 0.0mm additional unretract at retract 1620 mm/min, 840 unretract and 0.1 Z-Lift
      
      M911 S23.4 R23.8 P"M913 X0 Y0 Z10 E10 G91 M83 G1 Z390 E-20 F1500" ; configure power safe mode
      M671 X-150.0:915.0:915.0 Y208.5:373.5:43.5 S10         ; Z leadscrews are at (-150,215.5), (915,50.5) and (915,380.5)
      
      M572 D0 S0.035                                          ; set pressure advance
      M592 D0 A0.00 B0.0112 L0.2                              ; non linear extrusion
      
      ; Miscellaneous
      M501                                                    ; load saved parameters from non-volatile memory
      G31 T0.00118 S87.5 H0                                   ; temp coefficent and calib temp are not stored in override
      M929 P"0:/sys/eventlog.log" S2                          ; Enable Event Logging
      ;M111 P16 S1                                             ; enable debug for sbc interface
      
      M98 P"0:/sys/meltingplot/machine-override"              ; Load Machine specific overrides
      M98 P"0:/sys/meltingplot/ce-declaration"                ; Load CE Requirements
      M906 X1900 Y1900 Z2000 E1800 I50                        ; override default
      
      M98 P"0:/sys/meltingplot/globals"                       ; Load Global Variables
      

      content of 0:/sys/meltingplot/machine-override

      ; Put Machine specific overried in this file, e.g. rotation direction of specific stepper motor
      ; this files is loaded from config.g
      
      ; enable, if your printer is equippted with an rotary filament monitor
      M591 P3 C"io3.in" S1 D0 R60:180 E5 L25.3; filament monitor connected to io3.in endstop
      
      
      M309 P0 S0.05 ; heater feedforward compensation
      
      M569 P5 S0                                              ; physical drive 5 goes forwards (extruder) wiring on MBL 460 is different
      M350 E32                                                ; 32 microsteps on 1.8° motor
      M906 E1600                                              ; 2.0A OMC 1.8° Stepper 80% 1.6A
      M92 E740                                                ; reset e-steps
      

      content of 0:/sys/meltingplot/ce-declaration

      ; THIS FILE CONTAINS CE RELEVANT CONFIGURATIONS, ANY CHANGES TO THIS FILE MAY RESULT IN A LOST OF THE CE DECLARATION
      
      M203 Z1200.00                                           ; set maximum speeds (mm/min)
      ;M204 P800 T1250                                         ; Set printing and travel accelerations
      ;M906 X1500 Y1500 Z2000 E1300 I30                        ; set motor currents (mA) and motor idle factor in per cent
      M84 S30                                                 ; Set idle timeout
      
      M950 J0 C"^io4.in"                                      ; create e-stop
      M950 J1 C"^io4.out"                                     ; create second e-stop channel
      M581 T2 P0:1 S1 R0                                      ; configure E0 as emergency stop
      
      M950 J2 C"^io7.in"                                      ; create doorswitch #1
      M950 J3 C"^io8.in"                                      ; create doorswitch #2
      M581 T3 P2:3 S1 R0                                      ; configure E1 as door switch (door closed)
      M581 T4 P2:3 S0 R0                                      ; configure E1 as door switch (door opened)
      ; T5 is used to resume paused printing
      
      M950 P3 C"out8"                                         ; Configure P3 as output for 230V Relais
      M42 P3 S0                                               ; Disable 230V Relais by default
      
      M913 X1 Y1 Z1                                           ; reduce motor currents to 1%
      
      ;M117 "Enable E-Stop Check in Production! Go to /sys/meltingplot/ce-declaration and enable M582"
      ;M582 T2                                                 ; check external e-stop, break if already hit
      
      M913 X100 Y100 Z100                                     ; revert motor currents to 100%
      M42 P3 S1                                               ; Enable 230V Relais
      M582 T4                                                 ; check door switch
      

      content of 0:/sys/meltingplot/globals

      global bed_aligned = false
      global bed_aligned_since = 0
      
      global event_driver_stall = false
      
      global resume_deferred = 0
      
      global clearanceHeight = move.axes[2].max
      
      global ignoreMFMevents = false
      

      Content of 0:/filaments/Meltingplot PA6 CF HT 0.8mm/config.g

      M207 S0.4 R0.01 F600 T600 Z0              ; retraction
      M592 D0 A-0.0075 B0.006 L0.2            ; non linear extrusion
      M572 D0 S0.025                        ; pressure advance
      M92  E746                               ; e-step
      M906 E2000                              ; increase motor current
      M309 P0 S0.03 T4                        ; heater feed forward
      
      if fileexists({"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-esteps.g"})
        M98 P{"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-esteps.g"}
      
      if fileexists({"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-nle.g"})
        M98 P{"0:/filaments/" ^ {move.extruders[0].filament} ^ "/config-auto-nle.g"}
      
      
      M572 D0 S0 ; disable PA
      M593 P"none" ; disable IS
      

      G-Code File:
      The clong sond is predominand at Z=3.8 the internal bridge infill layer.
      T013_ACM_Angle v1_L0.3mm_N0.8_NYLON_MBL480_2h12m.gcode

      M122

      M122
      === Diagnostics ===
      RepRapFirmware for Duet 3 MB6HC version 3.6.0-rc.1 (2025-02-28 15:00:13) running on Duet 3 MB6HC v1.02 or 1.02a (SBC mode)
      Board ID: 08DJM-9P63L-DJ3T8-6JKD4-3SJ6K-9A77A
      Used output buffers: 1 of 40 (17 max)
      Error in macro line 29 while starting up: M584: Driver 50.0 does not exist
      Driver 51.0 does not exist
       
      === RTOS ===
      Static ram: 137420
      Dynamic ram: 98044 of which 3056 recycled
      Never used RAM 105536, free system stack 180 words
      Tasks: LASER(5,nWait 7,0.0%,269) SBC(2,nWait 7,0.9%,725) HEAT(3,nWait 6,0.0%,323) Move(4,nWait 6,0.0%,321) TMC(4,nWait 6,3.0%,375) CanReceiv(6,nWait 1,0.0%,814) CanSender(5,nWait 7,0.0%,334) CanClock(7,delaying,0.0%,353) MAIN(1,running,96.0%,101) IDLE(0,ready,0.1%,29) USBD(3,blocked,0.0%,144), total 100.0%
      Owned mutexes: HTTP(MAIN)
      === Platform ===
      Last reset 00:23:49 ago, cause: software
      Last software reset at 2025-03-07 10:30, reason: WatchdogTimeout, Gcodes spinning, available RAM 88356, slot 1
      Software reset code 0x00a3 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x1440e04f BFAR 0x00000000 SP 0x2045ffa8 Task MAIN Freestk 78286 ok
      Stack: fff53239 0000fb30 0000fb30 0000fb30 fb25d7b2 00000000 0044b540 a1080027 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
      === Storage ===
      Free file entries: 20
      SD card 0 not detected, interface speed: 37.5MBytes/sec
      SD card longest read time 0.0ms, write time 0.0ms, max retries 0
      === Move ===
      Segments created 0, maxWait 0ms, bed comp in use: none, height map offset 0.000, hiccups added 0/0 (0.00/0.00ms), max steps late 0, ebfmin 0.00, ebfmax 0.00
      Pos req/act/dcf: 0.00/0/0.00 0.00/0/0.00 0.00/0/0.00
      Next step interrupt due in 76 ticks, disabled
      Driver 0: standstill, SG min n/a, mspos 8, reads 40982, writes 11 timeouts 0
      Driver 1: standstill, SG min n/a, mspos 8, reads 40982, writes 11 timeouts 0
      Driver 2: standstill, SG min n/a, mspos 232, reads 40969, writes 24 timeouts 0
      Driver 3: standstill, SG min n/a, mspos 888, reads 40970, writes 24 timeouts 0
      Driver 4: standstill, SG min n/a, mspos 232, reads 40970, writes 24 timeouts 0
      Driver 5: standstill, SG min n/a, mspos 52, reads 40972, writes 22 timeouts 0
      Phase step loop runtime (us): min=0, max=18, frequency (Hz): min=1923, max=2083
      === Heat ===
      Bed heaters 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters -1 -1 -1 -1 -1 -1 -1 -1, ordering errs 0
      === GCodes ===
      Movement locks held by null, null
      HTTP* is doing "M122" in state(s) 0
      Telnet is idle in state(s) 0
      File is idle in state(s) 0
      USB is idle in state(s) 0
      Aux is idle in state(s) 0
      Trigger* is idle in state(s) 0
      Queue is idle in state(s) 0
      LCD is idle in state(s) 0
      SBC is idle in state(s) 0
      Daemon* is idle in state(s) 0 0, running macro
      Aux2 is idle in state(s) 0
      Autopause is idle in state(s) 0
      File2 is idle in state(s) 0
      Queue2 is idle in state(s) 0
      === Filament sensors ===
      Driver 31: pos 2200.08, errs: frame 10343 parity 0 ovrun 0 pol 0 ovdue 0
      === CAN ===
      Messages queued 12474, received 22878, lost 0, ignored 0, errs 0, boc 0
      Longest wait 246ms for reply type 6041, peak Tx sync delay 369, free buffers 50 (min 49), ts 6776/6775/0
      Tx timeouts 0,0,0,0,0,0
      === SBC interface ===
      Transfer state: 5, failed transfers: 0, checksum errors: 0
      RX/TX seq numbers: 49541/55164
      SPI underruns 0, overruns 0
      State: 5, disconnects: 0, timeouts: 0 total, 0 by SBC, IAP RAM available 0x27a68
      Buffer RX/TX: 0/0-0, open files: 0
      === Duet Control Server ===
      Duet Control Server version 3.6.0-rc.1 (2025-03-03 12:11:46, 32-bit)
      HTTP+Executed:
      > Executing M122
      Daemon+ProcessInternally:
      >> Macro daemon.g: Executing var upTime = state.upTime
      Daemon:
      >> Doing macro daemon.g, started by system
      Code buffer space: 4096
      Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 1
      Full transfers per second: 38.74, max time between full transfers: 1520.4ms, max pin wait times: 966.8ms/15.1ms
      Codes per second: 6.71
      Maximum length of RX/TX data transfers: 4588/1612
       
      

      This thread is a split of https://forum.duet3d.com/topic/37477/3-6-0-beta-4-sbc-watchdogtimeout-bad-header-0xff/5?_=1741598411279 as it is maybe missleading - the other thread is concerning the ESD Watchdog Timeout event.

      posted in Beta Firmware
      timschneiderundefined
      timschneider
    • RE: [3.6.0-beta.4 SBC] WatchdogTimeout - bad header 0xff

      Moved the extruder reversing to a seperate thread!

      https://forum.duet3d.com/topic/37655/3-6-0-rc-1-unexpected-extruder-reversing

      @chrishamm

      i made a video showing the suspect back emf generator - and maybe the cause of the esd events which may cause the mcu to reset.

      You see that the printer is moving normal until 0:28 the first loud clong, and at 0:29/0:30 the second.
      PA and IS are active.

      Ill reprint this file with PA and IS disabled to check if the clong is caused by one of them.

      2025-03-07-16-56-27-499(2).mp4

      /Edit:
      Ok, today I was listening for that sound, and I can also hear it on the Duet2 printer. It sounds like there is a move without acceleration.

      /edit 2: checked it with PA and IS disabled - the movement stays the same, the extruder is reversing but there is not a single E- in the whole file. The printer uses firmware retraction, but the reversing is mid move - so not while retracting.

      attached is the gcode file.
      T013_ACM_Angle v1_L0.3mm_N0.8_NYLON_MBL480_2h12m.gcode
      The clong sond is predominand at Z=3.8 the internal bridge infill layer.

      posted in Beta Firmware
      timschneiderundefined
      timschneider
    • RE: [3.6.0-beta.4 SBC] WatchdogTimeout - bad header 0xff

      @dc42 @chrishamm again with rc.1

      M122
      === Diagnostics ===
      RepRapFirmware for Duet 3 MB6HC version 3.6.0-rc.1 (2025-02-28 15:00:13) running on Duet 3 MB6HC v1.02 or 1.02a (SBC mode)
      Board ID: 08DJM-9P63L-DJ3T8-6JKD4-3SJ6K-9A77A
      Used output buffers: 1 of 40 (17 max)
      Error in macro line 29 while starting up: M584: Driver 50.0 does not exist
      Driver 51.0 does not exist
      
      === RTOS ===
      Static ram: 137420
      Dynamic ram: 98044 of which 3056 recycled
      Never used RAM 105536, free system stack 180 words
      Tasks: LASER(5,nWait 7,0.0%,269) SBC(2,nWait 7,0.9%,725) HEAT(3,nWait 6,0.0%,323) Move(4,nWait 6,0.0%,321) TMC(4,nWait 6,3.0%,375) CanReceiv(6,nWait 1,0.0%,814) CanSender(5,nWait 7,0.0%,334) CanClock(7,delaying,0.0%,353) MAIN(1,running,96.0%,101) IDLE(0,ready,0.1%,29) USBD(3,blocked,0.0%,144), total 100.0%
      Owned mutexes: HTTP(MAIN)
      === Platform ===
      Last reset 00:23:49 ago, cause: software
      Last software reset at 2025-03-07 10:30, reason: WatchdogTimeout, Gcodes spinning, available RAM 88356, slot 1
      Software reset code 0x00a3 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x1440e04f BFAR 0x00000000 SP 0x2045ffa8 Task MAIN Freestk 78286 ok
      Stack: fff53239 0000fb30 0000fb30 0000fb30 fb25d7b2 00000000 0044b540 a1080027 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
      === Storage ===
      Free file entries: 20
      SD card 0 not detected, interface speed: 37.5MBytes/sec
      SD card longest read time 0.0ms, write time 0.0ms, max retries 0
      === Move ===
      Segments created 0, maxWait 0ms, bed comp in use: none, height map offset 0.000, hiccups added 0/0 (0.00/0.00ms), max steps late 0, ebfmin 0.00, ebfmax 0.00
      Pos req/act/dcf: 0.00/0/0.00 0.00/0/0.00 0.00/0/0.00
      Next step interrupt due in 76 ticks, disabled
      Driver 0: standstill, SG min n/a, mspos 8, reads 40982, writes 11 timeouts 0
      Driver 1: standstill, SG min n/a, mspos 8, reads 40982, writes 11 timeouts 0
      Driver 2: standstill, SG min n/a, mspos 232, reads 40969, writes 24 timeouts 0
      Driver 3: standstill, SG min n/a, mspos 888, reads 40970, writes 24 timeouts 0
      Driver 4: standstill, SG min n/a, mspos 232, reads 40970, writes 24 timeouts 0
      Driver 5: standstill, SG min n/a, mspos 52, reads 40972, writes 22 timeouts 0
      Phase step loop runtime (us): min=0, max=18, frequency (Hz): min=1923, max=2083
      === Heat ===
      Bed heaters 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters -1 -1 -1 -1 -1 -1 -1 -1, ordering errs 0
      === GCodes ===
      Movement locks held by null, null
      HTTP* is doing "M122" in state(s) 0
      Telnet is idle in state(s) 0
      File is idle in state(s) 0
      USB is idle in state(s) 0
      Aux is idle in state(s) 0
      Trigger* is idle in state(s) 0
      Queue is idle in state(s) 0
      LCD is idle in state(s) 0
      SBC is idle in state(s) 0
      Daemon* is idle in state(s) 0 0, running macro
      Aux2 is idle in state(s) 0
      Autopause is idle in state(s) 0
      File2 is idle in state(s) 0
      Queue2 is idle in state(s) 0
      === Filament sensors ===
      Driver 31: pos 2200.08, errs: frame 10343 parity 0 ovrun 0 pol 0 ovdue 0
      === CAN ===
      Messages queued 12474, received 22878, lost 0, ignored 0, errs 0, boc 0
      Longest wait 246ms for reply type 6041, peak Tx sync delay 369, free buffers 50 (min 49), ts 6776/6775/0
      Tx timeouts 0,0,0,0,0,0
      === SBC interface ===
      Transfer state: 5, failed transfers: 0, checksum errors: 0
      RX/TX seq numbers: 49541/55164
      SPI underruns 0, overruns 0
      State: 5, disconnects: 0, timeouts: 0 total, 0 by SBC, IAP RAM available 0x27a68
      Buffer RX/TX: 0/0-0, open files: 0
      === Duet Control Server ===
      Duet Control Server version 3.6.0-rc.1 (2025-03-03 12:11:46, 32-bit)
      HTTP+Executed:
      > Executing M122
      Daemon+ProcessInternally:
      >> Macro daemon.g: Executing var upTime = state.upTime
      Daemon:
      >> Doing macro daemon.g, started by system
      Code buffer space: 4096
      Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 1
      Full transfers per second: 38.74, max time between full transfers: 1520.4ms, max pin wait times: 966.8ms/15.1ms
      Codes per second: 6.71
      Maximum length of RX/TX data transfers: 4588/1612
      

      journalctl

      Mar 07 08:54:11 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [info] Starting macro file 0:/sys/meltingplot/prime_nozzle_0 on channel File
      Mar 07 08:54:47 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [info] File: Finished macro file 0:/sys/meltingplot/prime_nozzle_0
      Mar 07 08:54:48 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [info] File: Finished macro file 0:/sys/meltingplot/print_start
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [warn] Restarting full transfer because a bad header format code was received (0xff)
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [warn] Lost connection to Duet (Timeout while waiting for transfer ready pin)
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [info] Connection to Duet established
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [error] Daemon: Failed to find corresponding state for code M220 S{50+25*global.mfmbackoff} ; increase speed in steps of 50 + 0*25, 1*25 2*25, cancelling it
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [error] Daemon: Failed to find corresponding state for code set global.mfmbackoff = global.mfmbackoff + 1, cancelling it
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [error] Daemon: Failed to find corresponding state for code set global.lastMFMBackoffCheck = var.upTime, cancelling it
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [error] Daemon: Failed to find corresponding state for code var z_homed = move.axes[2].homed, cancelling it
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [error] Daemon: Failed to find corresponding state for code var bed_aligned = global.bed_aligned, cancelling it
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [error] Daemon: Failed to find corresponding state for code set global.bed_aligned_since = var.upTime, cancelling it
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [warn] Daemon: Aborting orphaned macro file daemon.g
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [info] Aborted macro file daemon.g
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [error] in file daemon.g line 48: unexpected elif condition
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [warn] SPI connection has been reset
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [error] DuetAPI.CodeParserException: unexpected elif condition
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]:    DuetAPI.CodeParserException: unexpected elif condition
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]:    at DuetControlServer.Files.CodeFile.ReadCodeAsync(Code sharedCode) in /home/runner/work/DuetSoftwareFramework/DuetSoftwareFramework/src/DuetControlServer/Files/CodeFi
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]:    at DuetControlServer.Files.MacroFile.ReadCodeAsync() in /home/runner/work/DuetSoftwareFramework/DuetSoftwareFramework/src/DuetControlServer/Files/MacroFile.cs:line 29
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]:    at DuetControlServer.Files.MacroFile.Run() in /home/runner/work/DuetSoftwareFramework/DuetSoftwareFramework/src/DuetControlServer/Files/MacroFile.cs:line 353
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [info] Aborted job file
      Mar 07 10:30:32 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [info] Starting macro file config.g on channel Trigger
      Mar 07 10:30:38 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [error] M584: Driver 50.0 does not exist
      Mar 07 10:30:38 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: Driver 51.0 does not exist
      Mar 07 10:30:38 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [info] Starting macro file config-override.g on channel Trigger
      Mar 07 10:30:38 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [info] Trigger: Finished macro file config-override.g
      Mar 07 10:30:38 Meltingplot-MBL-480-vaswsq DuetControlServer[8378]: [info] Event logging stopped
      
      posted in Beta Firmware
      timschneiderundefined
      timschneider
    • RE: [3.6.0-beta.4 SBC] Abnormal program termination

      @chrishamm

      Ok - so it happend while I was using the filament-error to calibrate the E-Steps and non-linear extrusion. I set the error margin almost to zero +-0.5% and so there are a lot of events generated.

      The following macro can trigger the bug
      Content of 0:/macros/test-event-system.g

      if !exists(global.ignoreMFMevents)
        global ignoreMFMevents = true
      else
        set global.ignoreMFMevents = true
        
      while iterations < 1000
        M957 E"filament-error" D0 P4 S"tooLittleMovement - The movement is below the minimum set in the R value of M591"
      

      Contnet of 0:/sys/filament-error.g

      if exists(global.ignoreMFMevents) && global.ignoreMFMevents == true
        M99
      

      Have at least one DWC session open.
      Call the macro 0:/macros/test-event-system.g

      Result in journalctl

      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [info] Starting macro file filament-error.g on channel Autopause
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [warn] M957: a similar event is already queued
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [info] Received file abort request on channel Autopause for the last file
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [info] Aborted macro file filament-error.g
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [info] Starting macro file filament-error.g on channel Autopause
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [warn] M957: a similar event is already queued
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [info] Received file abort request on channel Autopause for the last file
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [info] Aborted macro file filament-error.g
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [info] Starting macro file filament-error.g on channel Autopause
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [warn] Resending packet #1 (request GetObjectModel)
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [fatal] Abnormal program termination
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [fatal] Update task faulted
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]:    System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]:    at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]:    at System.Text.Json.Utf8JsonReader.Read()
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]:    at DuetControlServer.Model.Updater.UpdateModel(Int32 offset, Boolean last) in /home/runner/work/DuetSoftwareFramework/DuetSoftwareFramework/src/DuetControlServer/Model/Updater.cs:line 150
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]:    at DuetControlServer.Model.Updater.Run() in /home/runner/work/DuetSoftwareFramework/DuetSoftwareFramework/src/DuetControlServer/Model/Updater.cs:line 296
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [warn] Resending packet #0 (request GetObjectModel)
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [warn] M957: a similar event is already queued
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [warn] Failed to find query for object model response
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [info] Received file abort request on channel Autopause for the last file
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [info] Aborted macro file filament-error.g
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [warn] HTTP: Aborting orphaned macro file 0:/macros/test-event-system.g
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [info] Aborted macro file 0:/macros/test-event-system.g
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [warn] HTTP: ==> Cancelling unfinished starting code: M98 P"0:/macros/test-event-system.g"
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [warn] Daemon: Aborting orphaned macro file daemon.g
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [info] Aborted macro file daemon.g
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [info] Event logging stopped
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [fatal] Update task faulted
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]:    System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]:    at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]:    at System.Text.Json.Utf8JsonReader.Read()
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]:    at DuetControlServer.Model.Updater.UpdateModel(Int32 offset, Boolean last) in /home/runner/work/DuetSoftwareFramework/DuetSoftwareFramework/src/DuetControlServer/Model/Updater.cs:line 150
      Feb 20 09:33:57 Meltingplot-MBL-480-vaswsq DuetControlServer[405]:    at DuetControlServer.Model.Updater.Run() in /home/runner/work/DuetSoftwareFramework/DuetSoftwareFramework/src/DuetControlServer/Model/Updater.cs:line 296
      Feb 20 09:33:58 Meltingplot-MBL-480-vaswsq DuetControlServer[405]: [info] Application has shut down
      Feb 20 09:33:58 Meltingplot-MBL-480-vaswsq systemd[1]: duetcontrolserver.service: Main process exited, code=exited, status=70/SOFTWARE
      -- Subject: Unit process exited
      

      EDIT: at the second attempt I was not able to reproduce it! Maybe it is related to [warn] Resending packet #1 (request GetObjectModel) as in the first try I saw many of these warnings and after a reboot, these warmings are gone and I can't reproduce the update thread bug.

      posted in Beta Firmware
      timschneiderundefined
      timschneider
    • [3.6.0-beta.4 SBC] WatchdogTimeout - bad header 0xff

      Another failure today

      Feb 15 22:05:47 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [info] Printing resumed
      Feb 16 00:59:08 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [warn] Restarting full transfer because a bad header format code was received (0xff)
      Feb 16 00:59:09 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [warn] Lost connection to Duet (Timeout while waiting for transfer ready pin)
      Feb 16 00:59:09 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [info] Connection to Duet established
      Feb 16 00:59:09 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [warn] Daemon: Aborting orphaned macro file daemon.g
      Feb 16 00:59:09 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [info] Aborted macro file daemon.g
      Feb 16 00:59:09 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [warn] SPI connection has been reset
      Feb 16 00:59:09 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [info] Aborted job file
      Feb 16 00:59:09 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [info] Starting macro file config.g on channel Trigger
      Feb 16 00:59:15 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [error] M584: Driver 50.0 does not exist
      Feb 16 00:59:15 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: Driver 51.0 does not exist
      Feb 16 00:59:15 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [info] Starting macro file config-override.g on channel Trigger
      Feb 16 00:59:15 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [info] Trigger: Finished macro file config-override.g
      Feb 16 00:59:15 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [info] Event logging stopped
      Feb 16 00:59:15 Meltingplot-MBL-480-vaswsq DuetControlServer[4948]: [info] Event logging to 0:/sys/eventlog.log started
      
      2025-02-15 22:05:47 Printing resumed
      2025-02-16 00:59:09 Warning: Lost connection to Duet (Timeout while waiting for transfer ready pin)
      2025-02-16 00:59:09 Connection to Duet established
      2025-02-16 00:59:09 Warning: SPI connection has been reset
      2025-02-16 00:59:09 Connection to SBC established!
      2025-02-16 00:59:15 Error: M584: Driver 50.0 does not exist
      Driver 51.0 does not exist
      2025-02-16 00:59:15 G10 P0 X0 Y0 Z0
      2025-02-16 00:59:15 G10 P0 R0 S0
      2025-02-16 00:59:15 G10 L2 P1 X0.000000 Y0.000000 Z0.000000
      2025-02-16 00:59:15 G10 L2 P2 X0.000000 Y0.000000 Z0.000000
      2025-02-16 00:59:15 G10 L2 P3 X0.000000 Y0.000000 Z0.000000
      2025-02-16 00:59:15 G10 L2 P4 X0.000000 Y0.000000 Z0.000000
      2025-02-16 00:59:15 G10 L2 P5 X0.000000 Y0.000000 Z0.000000
      2025-02-16 00:59:15 G10 L2 P6 X0.000000 Y0.000000 Z0.000000
      2025-02-16 00:59:15 G10 L2 P7 X0.000000 Y0.000000 Z0.000000
      2025-02-16 00:59:15 G10 L2 P8 X0.000000 Y0.000000 Z0.000000
      2025-02-16 00:59:15 G10 L2 P9 X0.000000 Y0.000000 Z0.000000
      2025-02-16 00:59:15 Event logging stopped
      2025-02-16 00:59:15 Event logging started
      
      M122
      === Diagnostics ===
      RepRapFirmware for Duet 3 MB6HC version 3.6.0-beta.4 (2025-02-11 09:51:22) running on Duet 3 MB6HC v1.02 or 1.02a (SBC mode)
      Board ID: 08DJM-9P63L-DJ3T8-6JKD4-3SJ6K-9A77A
      Used output buffers: 1 of 40 (17 max)
      Error in macro line 29 while starting up: M584: Driver 50.0 does not exist
      Driver 51.0 does not exist
      
      === RTOS ===
      Static ram: 137396
      Dynamic ram: 98044 of which 3056 recycled
      Never used RAM 105560, free system stack 180 words
      Tasks: LASER(5,nWait 7,0.0%,269) SBC(2,nWait 7,1.0%,725) HEAT(3,nWait 6,0.0%,323) Move(4,nWait 6,0.0%,323) TMC(4,nWait 6,3.0%,375) CanReceiv(6,nWait 1,0.0%,805) CanSender(5,nWait 7,0.0%,334) CanClock(7,delaying,0.0%,350) MAIN(1,running,95.9%,101) IDLE(0,ready,0.0%,29) USBD(3,blocked,0.0%,144), total 100.0%
      Owned mutexes: HTTP(MAIN)
      === Platform ===
      Last reset 06:21:05 ago, cause: software
      Last software reset at 2025-02-16 00:59, reason: WatchdogTimeout, Gcodes spinning, available RAM 83312, slot 1
      Software reset code 0x00a3 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x1440e04f BFAR 0x00000000 SP 0x2045ffa8 Task MAIN Freestk 78286 ok
      Stack: fff530e0 0000f850 0000f850 0000f850 f846069c 00000000 0044b234 a1030027 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
      === Storage ===
      Free file entries: 20
      SD card 0 not detected, interface speed: 37.5MBytes/sec
      SD card longest read time 0.0ms, write time 0.0ms, max retries 0
      === Move ===
      Segments created 0, maxWait 0ms, bed comp in use: none, height map offset 0.000, hiccups added 0/0 (0.00/0.00ms), max steps late 0, ebfmin 0.00, ebfmax 0.00
      Pos req/act/dcf: 0.00/0/0.00 0.00/0/0.00 0.00/0/0.00
      Next step interrupt due in 140 ticks, disabled
      Driver 0: standstill, SG min n/a, mspos 8, reads 53019, writes 11 timeouts 0
      Driver 1: standstill, SG min n/a, mspos 8, reads 53019, writes 11 timeouts 0
      Driver 2: standstill, SG min n/a, mspos 760, reads 53006, writes 24 timeouts 0
      Driver 3: standstill, SG min n/a, mspos 40, reads 53006, writes 24 timeouts 0
      Driver 4: standstill, SG min n/a, mspos 232, reads 53006, writes 24 timeouts 0
      Driver 5: standstill, SG min n/a, mspos 260, reads 53008, writes 22 timeouts 0
      Phase step loop runtime (us): min=0, max=18, frequency (Hz): min=1918, max=2094
      === DDARing 0 ===
      Scheduled moves 0, completed 0, LaErrors 0, Underruns [0, 0, 0]
      Segments left 0, axes/extruders owned 0x00000000, drives owned 0x00000000
      Code queue is empty
      === DDARing 1 ===
      Scheduled moves 0, completed 0, LaErrors 0, Underruns [0, 0, 0]
      Segments left 0, axes/extruders owned 0x00000000, drives owned 0x00000000
      Code queue is empty
      === Heat ===
      Bed heaters 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters -1 -1 -1 -1 -1 -1 -1 -1, ordering errs 0
      === GCodes ===
      Movement locks held by null, null
      HTTP* is doing "M122" in state(s) 0
      Telnet is idle in state(s) 0
      File is idle in state(s) 0
      USB is idle in state(s) 0
      Aux is idle in state(s) 0
      Trigger* is idle in state(s) 0
      Queue is idle in state(s) 0
      LCD is idle in state(s) 0
      SBC is idle in state(s) 0
      Daemon* is idle in state(s) 0 0, running macro
      Aux2 is idle in state(s) 0
      Autopause is idle in state(s) 0
      File2 is idle in state(s) 0
      Queue2 is idle in state(s) 0
      === Filament sensors ===
      Driver 31: pos 13718.32, errs: frame 0 parity 0 ovrun 0 pol 0 ovdue 0
      === CAN ===
      Messages queued 199813, received 365858, lost 0, ignored 0, errs 0, boc 0
      Longest wait 241ms for reply type 6041, peak Tx sync delay 384, free buffers 50 (min 49), ts 108370/108369/0
      Tx timeouts 0,0,0,0,0,0
      === SBC interface ===
      Transfer state: 5, failed transfers: 0, checksum errors: 0
      RX/TX seq numbers: 53927/29369
      SPI underruns 0, overruns 0
      State: 5, disconnects: 0, timeouts: 0 total, 0 by SBC, IAP RAM available 0x27a80
      Buffer RX/TX: 0/0-0, open files: 0
      === Duet Control Server ===
      Duet Control Server version 3.6.0-beta.4 (2025-02-11 12:02:27, 32-bit)
      HTTP+Executed:
      > Executing M122
      Daemon:
      >> Doing macro daemon.g, started by system
      Code buffer space: 4096
      Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 1
      Full transfers per second: 39.57, max time between full transfers: 85.1ms, max pin wait times: 945.5ms/6.2ms
      Codes per second: 8.62
      Maximum length of RX/TX data transfers: 5444/1664
      
      M122 B50
      Diagnostics for board 50:
      Duet EXP1HCL rev 1.0a or earlier firmware version 3.6.0-beta.4 (2025-02-10 20:09:59)
      Bootloader ID: SAME5x bootloader version 2.4 (2021-12-10)
      All averaging filters OK
      Never used RAM 45228, free system stack 178 words
      Tasks: EncCal(1,nWait 6,0.0%,469) Move(3,nWait 7,0.1%,97) CLSend(3,nWait 6,0.0%,149) TMC(4,nWait 6,70.4%,317) HEAT(2,nWait 6,0.1%,105) CanAsync(5,nWait 4,0.0%,70) CanRecv(3,nWait 1,0.0%,31) CanClock(5,nWait 1,0.0%,63) MAIN(1,running,28.1%,253) IDLE(0,ready,0.0%,29) AIN(2,nWait 2,1.3%,255), total 100.0%
      Owned mutexes:
      Last reset 20:42:45 ago, cause: software
      Last software reset data not available
      Moves scheduled 410248, hiccups 0 (0.00/0.00ms), segs 259, step errors 0 (types 0x0), maxLate 0 maxPrep 2467, ebfmin 0.00 max 0.00
      Phase step loop runtime (us): min=34, max=69, frequency (Hz): min=488, max=17045
      Peak sync jitter -10/6, peak Rx sync delay 192, resyncs 0/1, next timer interrupt due in 4 ticks, enabled, next step interrupt due in 4205270383 ticks, disabled
      VIN voltage: min 24.6, current 24.6, max 24.6
      V12 voltage: min 12.2, current 12.2, max 12.2
      MCU temperature: min 29.2C, currentDriver 0: pos 1924, 80.0 steps/mm, ok, SG min n/a, mspos 8, reads 55386, writes 16871 timeouts 1524
      Last sensors broadcast 0x00000000 found 0 63 ticks ago, 0 ordering errs, loop time 0
      CAN messages queued 596576, send timeouts 0, received 1061897, lost 0, ignored 0, errs 0, boc 0, free buffers 38, min 33, error reg 0
      dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 573, adv 17915/70063
      Closed loop driver 0 mode: closed loop, pre-error threshold: 2.00, error threshold: 4.00, encoder type rotaryAS5047, position 9853
      Encoder reverse polarity: yes, full rotations 0, last angle 9854, minCorrection=-9.0, maxCorrection=9.4, agc 57, mag 4645, no error
      Tuning mode: 0, tuning error: 0, collecting data: no
      Accelerometer: none
      I2C bus errors 12, naks 0, contentions 0, other errors 0
      
      M122 B51
      Diagnostics for board 51:
      Duet EXP1HCL rev 1.0a or earlier firmware version 3.6.0-beta.4 (2025-02-10 20:09:59)
      Bootloader ID: SAME5x bootloader version 2.4 (2021-12-10)
      All averaging filters OK
      Never used RAM 44892, free system stack 174 words
      Tasks: EncCal(1,nWait 6,0.0%,469) Move(3,nWait 7,0.1%,97) CLSend(3,nWait 6,0.0%,149) TMC(4,nWait 6,70.2%,317) HEAT(2,nWait 6,0.1%,105) CanAsync(5,nWait 4,0.0%,70) CanRecv(3,nWait 1,0.0%,31) CanClock(5,nWait 1,0.0%,63) MAIN(1,running,28.3%,253) IDLE(0,ready,0.0%,29) AIN(2,nWait 2,1.3%,255), total 100.0%
      Owned mutexes:
      Last reset 20:43:05 ago, cause: software
      Last software reset data not available
      Moves scheduled 371581, hiccups 0 (0.00/0.00ms), segs 273, step errors 0 (types 0x0), maxLate 0 maxPrep 2394, ebfmin 0.00 max 0.00
      Phase step loop runtime (us): min=34, max=70, frequency (Hz): min=491, max=16304
      Peak sync jitter -7/9, peak Rx sync delay 192, resyncs 0/1, next timer interrupt due in 1 ticks, enabled, next step interrupt due in 4190702455 ticks, disabled
      VIN voltage: min 24.2, current 24.2, max 24.3
      V12 voltage: min 12.0, current 12.1, max 12.1
      MCU temperature: min 28.2C, current Driver 0: pos -1824, 80.0 steps/mm, ok, SG min n/a, mspos 8, reads 21706, writes 13725 timeouts 1238
      Last sensors broadcast 0x00000000 found 0 131 ticks ago, 0 ordering errs, loop time 0
      CAN messages queued 596733, send timeouts 0, received 1023400, lost 0, ignored 0, errs 0, boc 0, free buffers 38, min 32, error reg 0
      dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 544, adv 18140/70373
      Closed loop driver 0 mode: closed loop, pre-error threshold: 2.00, error threshold: 4.00, encoder type rotaryAS5047, position 9340
      Encoder reverse polarity: yes, full rotations 0, last angle 9341, minCorrection=-35.3, maxCorrection=30.5, agc 47, mag 4612, no error
      Tuning mode: 0, tuning error: 0, collecting data: no
      Accelerometer: none
      I2C bus errors 12, naks 0, contentions 0, other errors 0
      
      posted in Beta Firmware
      timschneiderundefined
      timschneider
    • [3.6.0-beta.4 SBC] Abnormal program termination

      @chrishamm
      I guess I've just bad luck, but today I got the following.

      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [warn] Resending packet #1 (request GetObjectModel)
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [fatal] Abnormal program termination
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [fatal] Update task faulted
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]:    System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]:    at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]:    at System.Text.Json.Utf8JsonReader.Read()
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]:    at DuetControlServer.Model.Updater.UpdateModel(Int32 offset, Boolean last) in /home/runner/work/DuetSoftwareFramework/DuetSoftwareFramework/src/DuetControlServer/Model/Updater.cs:line 150
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]:    at DuetControlServer.Model.Updater.Run() in /home/runner/work/DuetSoftwareFramework/DuetSoftwareFramework/src/DuetControlServer/Model/Updater.cs:line 320
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [warn] Failed to find query for object model response
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [info] Starting macro file filament-error.g on channel Autopause
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [warn] HTTP: Aborting orphaned macro file 0:/macros/meltingplot/filament-extrusion-calibration
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [info] Aborted macro file 0:/macros/meltingplot/filament-extrusion-calibration
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [warn] HTTP: ==> Cancelling unfinished starting code: M98 P"0:/macros/meltingplot/filament-extrusion-calibration"
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [warn] Daemon: Aborting orphaned macro file daemon.g
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [info] Aborted macro file daemon.g
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [warn] Autopause: Aborting orphaned macro file filament-error.g
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [info] Aborted macro file filament-error.g
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [info] Event logging stopped
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [fatal] Update task faulted
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]:    System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]:    at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]:    at System.Text.Json.Utf8JsonReader.Read()
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]:    at DuetControlServer.Model.Updater.UpdateModel(Int32 offset, Boolean last) in /home/runner/work/DuetSoftwareFramework/DuetSoftwareFramework/src/DuetControlServer/Model/Updater.cs:line 150
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]:    at DuetControlServer.Model.Updater.Run() in /home/runner/work/DuetSoftwareFramework/DuetSoftwareFramework/src/DuetControlServer/Model/Updater.cs:line 320
      Feb 15 09:59:49 Meltingplot-MBL-480-vaswsq DuetControlServer[475]: [info] Application has shut down
      

      daafa55b-1cbd-4d7a-916a-7ddea3f4cfe2-grafik.png

      M122
      === Diagnostics ===
      RepRapFirmware for Duet 3 MB6HC version 3.6.0-beta.4 (2025-02-11 09:51:22) running on Duet 3 MB6HC v1.02 or 1.02a (SBC mode)
      Board ID: 08DJM-9P63L-DJ3T8-6JKD4-3SJ6K-9A77A
      Used output buffers: 1 of 40 (36 max)
      === RTOS ===
      Static ram: 137396
      Dynamic ram: 103212 of which 16 recycled
      Never used RAM 101992, free system stack 134 words
      Tasks: LASER(5,nWait 7,0.2%,223) SBC(2,delaying,6.8%,648) HEAT(3,nWait 6,0.0%,327) Move(4,nWait 6,0.0%,215) TMC(4,nWait 6,3.0%,343) CanReceiv(6,nWait 1,0.0%,814) CanSender(5,nWait 7,0.0%,326) CanClock(7,delaying,0.0%,341) MAIN(2,running,85.7%,101) IDLE(0,ready,4.2%,29) USBD(3,blocked,0.0%,144), total 100.0%
      Owned mutexes: HTTP(MAIN)
      === Platform ===
      Last reset 00:37:39 ago, cause: power up
      Last software reset details not available
      === Storage ===
      Free file entries: 20
      SD card 0 not detected, interface speed: 37.5MBytes/sec
      SD card longest read time 0.0ms, write time 0.0ms, max retries 0
      === Move ===
      Segments created 60, maxWait 400876ms, bed comp in use: mesh, height map offset 0.000, hiccups added 0/0 (0.00/0.00ms), max steps late 1, ebfmin 0.00, ebfmax 0.00
      Pos req/act/dcf: 63940.00/63940/0.00 31540.00/31540/0.00 371568.00/371568/0.00
      Next step interrupt due in 45 ticks, disabled
      Driver 0: standstill, SG min 0, mspos 8, reads 61208, writes 649 timeouts 59
      Driver 1: standstill, SG min 0, mspos 8, reads 61208, writes 649 timeouts 59
      Driver 2: standstill, SG min 0, mspos 8, reads 61166, writes 692 timeouts 59
      Driver 3: standstill, SG min 0, mspos 568, reads 61166, writes 692 timeouts 59
      Driver 4: standstill, SG min 0, mspos 824, reads 61166, writes 692 timeouts 59
      Driver 5: standstill, SG min 0, mspos 604, reads 61190, writes 668 timeouts 59
      Phase step loop runtime (us): min=0, max=20, frequency (Hz): min=501, max=11363
      === DDARing 0 ===
      Scheduled moves 663, completed 663, LaErrors 0, Underruns [0, 0, 0]
      Segments left 0, axes/extruders owned 0x80000007, drives owned 0x80000007
      Code queue is empty
      === DDARing 1 ===
      Scheduled moves 0, completed 0, LaErrors 0, Underruns [0, 0, 0]
      Segments left 0, axes/extruders owned 0x00000000, drives owned 0x00000000
      Code queue is empty
      === Heat ===
      Bed heaters 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters -1 -1 -1 -1 -1 -1 -1 -1, ordering errs 0
      === GCodes ===
      Movement locks held by null, null
      HTTP* is doing "M122" in state(s) 0
      Telnet is idle in state(s) 0
      File is idle in state(s) 0
      USB is idle in state(s) 0
      Aux is idle in state(s) 0
      Trigger* is idle in state(s) 0
      Queue* is idle in state(s) 0
      LCD is idle in state(s) 0
      SBC* is idle in state(s) 0
      Daemon* is idle in state(s) 0 0, running macro
      Aux2 is idle in state(s) 0
      Autopause* is idle in state(s) 0
      File2 is idle in state(s) 0
      Queue2 is idle in state(s) 0
      === Filament sensors ===
      Driver 31: pos 13724.65, errs: frame 0 parity 0 ovrun 0 pol 0 ovdue 0
      === CAN ===
      Messages queued 20969, received 36170, lost 0, ignored 0, errs 6720, boc 0
      Longest wait 233ms for reply type 6041, peak Tx sync delay 46599, free buffers 50 (min 48), ts 10710/10703/0
      Tx timeouts 0,0,6,0,0,0 last cancelled message type 30 dest 127
      === SBC interface ===
      Transfer state: 5, failed transfers: 0, checksum errors: 0
      RX/TX seq numbers: 8066/8066
      SPI underruns 0, overruns 0
      State: 5, disconnects: 1, timeouts: 1 total, 1 by SBC, IAP RAM available 0x27a80
      Buffer RX/TX: 0/0-0, open files: 0
      === Duet Control Server ===
      Duet Control Server version 3.6.0-beta.4 (2025-02-11 12:02:27, 32-bit)
      HTTP+Executed:
      > Executing M122
      Daemon:
      Buffered code: G4 P100 ; wait 100ms
      Buffered codes: 32 bytes total
      >> Doing macro daemon.g, started by system
      >> Number of flush requests: 1
      Code buffer space: 4096
      Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 0
      Full transfers per second: 3915.48, max time between full transfers: 878.1ms, max pin wait times: 55.6ms/50.2ms
      Codes per second: 20.73
      Maximum length of RX/TX data transfers: 8192/408
      
      posted in Beta Firmware
      timschneiderundefined
      timschneider
    • RE: [feature] Adaptive / Feedforward Temperature setpoint

      @dc42

      ok, A40 is working - but shouldn't A100 act like A0 if A100 can not be maintained? Instead it was acting like T0.

      @Triet
      thanks for you tests! You can maybe increase the layer height to increase the volumetric flow rate, as the T parameter from M309 is multiplied by the speed in mm/s of the filament (extruder) - not the movement speed of the X and Y axis. Your absolute maximum flow rate is about 5.44 mm³/s which is about 2.26 mm/sec for 1.75mm or 0.85 mm/sec for 2.85mm filament, which corresponds to 227.6°C or 213.5°C. Thats a steep increase, unless you have a powerfull heater, your printer will not be able to follow. I use T8 with an 60W heater and 2.85mm filament. I run my prints with 25 - 40 mm ³/s.

      posted in Firmware developers
      timschneiderundefined
      timschneider