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

    Error: M307: bad model parameters

    Scheduled Pinned Locked Moved Solved
    Tuning and tweaking
    3
    7
    354
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • huskypsydundefined
      huskypsyd
      last edited by

      I am using a mini5+ and ran a PID for both the hotend and the heated bed and keep getting an "Error: M307: bad model parameters." It seems to work fine, but not sure if I am doing something wrong. Any help would be greatly appreciated. Here are the configs:

      ; Heaters
      M308 S0 P"temp0" Y"thermistor" T100000 B3950 ; configure sensor 0 as thermistor on pin temp0
      M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0
      M307 H0 A0.449 C313.7 D2.43 V24.1 S1 B0 ; disable bang-bang mode for the bed heater and set PWM limit
      M140 H0 ; map heated bed to heater 0
      M143 H0 S150 ; set temperature limit for heater 0 to 150C
      M308 S1 P"temp1" Y"thermistor" T100000 B4267 ; configure sensor 1 as thermistor on pin temp1
      M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1
      M307 H1 A2.536 C132.0 D6.10 V24.2 S1 B0 ; disable bang-bang mode for heater and set PWM limit
      M143 H1 S300 ; set temperature limit for heater 1 to 300C

      droftartsundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • droftartsundefined
        droftarts administrators @huskypsyd
        last edited by droftarts

        @huskypsyd What firmware version are you running? Send M115 and post response. Most likely is that you're running a version later than RRF 3.2beta3.2, and the 'A' parameter has been deprecated in favour of the 'R' parameter; you'll also need to rerun the heater tuning. See https://duet3d.dozuki.com/Wiki/Gcode#Section_M307_Set_or_report_heating_process_parameters for details.

        It could also be that you have M501 at the end of your config.g to load the config_override.g. This can also contain M307 commands, so check there too.

        Ian

        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

        huskypsydundefined 1 Reply Last reply Reply Quote 0
        • huskypsydundefined
          huskypsyd @droftarts
          last edited by

          @droftarts Thanks for the response.
          M115: FIRMWARE_NAME: RepRapFirmware for Duet 3 Mini 5+ FIRMWARE_VERSION: 3.2.2 ELECTRONICS: Duet 3 Mini5plus WiFi FIRMWARE_DATE: 2021-02-11

          Can you say more about M501 and M307? I am coming from Marlin and have been having trouble with the transition.

          droftartsundefined 1 Reply Last reply Reply Quote 0
          • droftartsundefined
            droftarts administrators @huskypsyd
            last edited by droftarts

            @huskypsyd
            In Marlin, you set the heater PID with M301 (also available in RepRapFirmware). RRF uses M307 (M307: https://duet3d.dozuki.com/Wiki/Gcode#Section_M307_Set_or_report_heating_process_parameters) to set the heater PID, because

            You can use M301 to override those computed PID parameters, but this is not recommended because it prevents RepRapFirmware from using different PID parameters depending on the heating phase.
            (https://duet3d.dozuki.com/Wiki/Gcode#Section_M301_Set_PID_parameters)

            M307 also uses extra parameters for a better model of the heater, and allows better detection of heater faults. Use M303 to tune your heaters (like in Marlin), see https://duet3d.dozuki.com/Wiki/Gcode#Section_M303_Run_heater_tuning and https://duet3d.dozuki.com/Wiki/Tuning_the_heater_temperature_control

            If you send M307 H0 A0.449 C313.7 D2.43 V24.1 S1 B0, which is from your config.g, does it generate an error?

            Again like Marlin, M500 M500: https://duet3d.dozuki.com/Wiki/Gcode#Section_M500_Store_parameters stores a bunch of parameters (but not quite the same parameters as Marlin, see link above). As we don't have Non-volatile memory to store these parameters, they are saved to a file instead. You can then choose to load these parameters at startup, by putting M501 (https://duet3d.dozuki.com/Wiki/Gcode#Section_M501_Read_stored_parameters stores) in your config.g.

            As you have a Mini 5+, I'd recommend updating to RRF 3.3 RC2 (and 3.3 release when it's out, possibly next week), as it resolves some issues and bugs for Mini 5+. https://github.com/Duet3D/RepRapFirmware/releases

            Ian

            Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

            huskypsydundefined 1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @huskypsyd
              last edited by

              @huskypsyd said in Error: M307: bad model parameters:

              M307 H0 A0.449 C313.7 D2.43 V24.1 S1 B0 ; disable bang-bang mode for the bed heater and set PWM limit
              M307 H1 A2.536 C132.0 D6.10 V24.2 S1 B0 ; disable bang-bang mode for heater and set PWM limit

              The A parameters in those M307 commands don't make sense. Where did you get them from? The other parameters look OK.

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

              huskypsydundefined 1 Reply Last reply Reply Quote 0
              • huskypsydundefined
                huskypsyd @droftarts
                last edited by

                @droftarts Thanks that was super helpful!

                1 Reply Last reply Reply Quote 0
                • huskypsydundefined
                  huskypsyd @dc42
                  last edited by

                  @dc42 I must have been looking at an older instructional page. I swapped out A for R and now it is working without issue.

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