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

Strange Behaviour in RRF3.0

Scheduled Pinned Locked Moved Solved
General Discussion
4
17
548
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.
  • undefined
    chas2706
    last edited by 7 Jan 2020, 13:40

    Hi
    I suddenly have a problem with my bed heater config. I don't understand what has gone wrong apart from the issue seems to have appeared after upgrading to the latest stable version of RRF3.0.

    Without changing any of the original gcode in the config I get error message "Heater0 not defined".

    Here is a snippet of the heater/thermistor set up that was originally working but is now not!

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

    ; Nozzle
    M308 S1 P"temp1" Y"thermistor" T100000 B4138 ; 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
    M143 H1 S280 ; set temperature limit for heater 1 to 280C
    M307 H1 B0 S1.00 ; disable bang-bang mode for the nozzle heater and set PWM limit
    M307 H1 A299.8 C109.4 D4.0 S1.00 V12.3 B0 ; Autotune result for hotend
    M307 H0 A109.8 C457.8 D2.1 S1.00 V12.3 B0 ; Autotune result for bed

    I have found that if I comment out the M307 autotune result for the bed the error message disappears. If I do a re-tune and re-enter the results, the error "heater0 not defined" comes back.

    BTW what is the M140 command doing in there?
    It was auto generated by the configurator. The comment says "map heated bed to heater 0 but if I look up the command in the Gcode documentation it says "M140: Set Bed Temperature (Fast)" !!!
    If I comment out the M140 command, the bed heater disappears from the DWC!

    So summing up, what I have now is a working bed heater with a commented out autotune set up for it and a strange M140 command that somehow needs to be there!

    Anyone have any ideas?

    Thanks in advance.

    1 Reply Last reply Reply Quote 0
    • undefined
      jay_s_uk
      last edited by jay_s_uk 1 Jul 2020, 13:41 7 Jan 2020, 13:41

      M950 has to come before and M308's
      See https://duet3d.dozuki.com/Wiki/Gcode#Section_M950_Create_heater_fan_or_GPIO_servo_pin

      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

      undefined 1 Reply Last reply 7 Jan 2020, 15:57 Reply Quote 0
      • undefined
        chas2706
        last edited by 7 Jan 2020, 13:44

        @jay_s_uk

        Ok thanks I will correct it but the configurator put it in that order!
        Any ideas on the need for the M140 command with the false description?

        1 Reply Last reply Reply Quote 0
        • undefined
          jay_s_uk
          last edited by 7 Jan 2020, 13:47

          I would suggest that the M140 can be disabled.
          I don't have one in either of my machines configs

          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

          1 Reply Last reply Reply Quote 0
          • undefined
            chas2706
            last edited by 7 Jan 2020, 14:10

            @jay_s_uk

            This is what I now get by making those changes:

            DWC.jpg

            Here is my full config.

            ; Configuration file for Duet 3 (firmware version 3)
            ; executed by the firmware on start-up
            ;
            ; generated by RepRapFirmware Configuration Tool v2.1.1 on Mon Nov 04 2019 16:21:57 GMT+0000 (Greenwich Mean Time)

            ; General preferences
            M555 P2 ; Set Marlin-style output
            G21 ; Set dimensions to millimetres
            G90 ; send absolute coordinates...
            M83 ; ...but relative extruder moves
            M550 P"Duet3" ; set printer name
            M558 P0 S1 ; Enable http
            M586 P1 S1 ; Enable FTP
            M586 P2 S1 ; Enable Telnet
            M669 K1 ; select CoreXY mode

            ; Drives
            M569 P0 S1 ; X physical drive 0.0 goes forwards
            M569 P1 S1 ; Y physical drive 0.1 goes forwards
            M569 P2 S0 ; Z0 physical drive 0.2 goes backwards
            M569 P3 S0 ; Z1 physical drive 0.3 goes backwards
            M569 P4 S0 ; E0 physical drive 0.4 goes backwards

            ; Set drive mapping
            M584 X0 Y1 Z2:3 E4 ; Dual Z make sure drive 2 is left hand Z and 3 is right hand
            M92 X80.00 Y80.00 Z400.00 E96.00 ; set steps per mm
            M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation

            ; Accelerations, speed and jerk
            M98 P"/macros/print_scripts/default_speed.g"

            ;M566 X600.00 Y600.00 Z12.00 E120.00 ; Set maximum instantaneous speed changes (mm/min) - Jerk
            ;M203 X18000.00 Y18000.00 Z180.00 E1500.00 ; set maximum speeds (mm/min)
            ;M201 X3000.00 Y3000.00 Z100.00 E10000.00 ; set accelerations (mm/s^2) (print moves)

            M906 X1000 Y1000 Z1000 E1100 I30 ; set motor currents (mA) and motor idle factor in per cent
            M84 S30 ; Set idle timeout

            ; Leadscrew positions: The measurement is taken from X=0, Y=0. Therefore X will be negative, Y positive and middle of bed = 160
            M671 X-100:415 Y160:160 S2.0

            ; Axis Limits
            M208 X-15 Y-12 Z0 S1 ; Set axis minima (adjust to make X=0 and Y=0 the edges of the bed)
            M208 X310 Y310 Z380 S0 ; set axis maxima

            ; Endstops
            M574 X1 S1 P"!io0.in" ; configure active-low endstop for low end on X via pin io0.in
            M574 Y1 S1 P"!io1.in" ; configure active-low endstop for low end on Y via pin io1.in
            M581 P"^!io2.in" T0 C0 ; configure active-low endstop to perform an e-stop and let it trigger at any time without restrictions
            M581 P"!io4.in" T2 C0 ; configure active-low switch to perform filament unload macro
            M581 P"!io5.in" T3 C0 ; configure active-low switch to perform filament load macro

            ; Filament Run Out Sensor
            ;M591 D0 P1 C4 S1 ; Code requires conversion Filament runout Sensor for Extruder E0 P1 = signal HIGH.

            ; Z-Probe
            M558 P1 C"io3.in" H5 F120 T6000 ; set Z probe type to unmodulated and the dive height + speeds
            ; G31: the P is the reported Z value when triggered. X,Y are offset coordinates. Z is trigger height, you can decrease value if nozzle is too close
            ; or increase if too far away.
            G31 P500 X-30 Y-5 Z2.18 ; set Z probe trigger value, offset and trigger height

            ; Mesh Grid
            ; The following M557 commands are not needed if you are using a bed.g file to perform bed compensation
            ;*** Adjust the XY coordinates in the following M557 commands to suit your build and the position of the Z probe
            M557 X10:280 Y20:280 S50 ; Define small mesh grid
            ;M557 X10:280 Y10:280 S20 ; Define large mesh grid

            ; Bed thermistor/heater
            M950 H0 C"out0" T0 ; bed heater H = heater no. C = output T = temperature sensor no. defined below.
            M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; bed thermistor
            M143 H0 S120 ; set temperature limit for bed heater 0 to 120C
            M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit
            ;M140 H0 ; map heated bed to heater 0 ??????????????

            ; Extruder thermister/heater
            M950 H1 C"out1" T1 ; ext heater H = heater no. C = output T = temperature sensor no. defined below.
            M308 S1 P"temp1" Y"thermistor" T100000 B4138 ; extruder thermistor
            M143 H1 S280 ; set temperature limit for extruder heater 1 to 280C
            M307 H1 B0 S1.00 ; disable bang-bang mode for the nozzle heater and set PWM limit

            M307 H0 A108.4 C735.4 D1.4 S1.00 V12.5 B0 ; Autotune result for bed
            M307 H1 A299.8 C109.4 D4.0 S1.00 V12.3 B0 ; Autotune result for hotend

            ;CPU Temperature Calibration
            M912 P0 S-10.0

            ;M308 S20 Y"mcu-temp" A"CPU" ; Defineix sensor S20 for CPU temperature

            ;Expansion pins
            ;M307 H2 A-1 C-1 D-1 ; Code requires conversion Make heater2 on extruder2 available and use it for pwm led lighting

            ; Fans
            M950 F0 C"out7" Q500 ; create fan 0 on pin out7 and set its frequency (parts fan)
            M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
            M950 F1 C"out8" Q500 ; create fan 1 on pin out8 and set its frequency (ext fan)
            M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on

            ;Re-assigned fan pins
            ;CPU fan
            M950 F2 C"out9" ; create fan 2 (CPU fan)
            M308 S3 Y"mcutemp" A"mcutemp" ; set up a virtual sensor for cpu fan
            M106 P2 T30 H3 ; set fan 2 value. Fan comes on when cpu temp is above 30 degrees (Cool the pi as well!)
            ;Led Lighting
            M950 F3 C"out4" Q500 ; create a fan 3 output to use for led lighting control on pin out4
            M106 P3 S0 ; set output default to off

            ; Tools
            M563 P0 S"Extruder0" 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

            ; Custom settings

            ;CPU Temperature Calibration
            ;M912 P0 S-15.8 ; Find correct value
            ;M42 P2 S255 ; Turn led lighting on full
            ;M98 P"LevelLeadscrews.g" ; Option to perform leadscrew levelling
            ;M98 PEnable Mesh Levelling ; Option to enable on start up
            T0 ; select first tool

            1 Reply Last reply Reply Quote 0
            • undefined
              jay_s_uk
              last edited by 7 Jan 2020, 14:23

              You can remove "M307 H1 B0 S1.00 ; disable bang-bang mode for the nozzle heater and set PWM limit"
              As you have the correct PWM settings on the row below.
              Nothing else jumps out as being incorrect though

              Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

              1 Reply Last reply Reply Quote 0
              • undefined
                chas2706
                last edited by 7 Jan 2020, 15:10

                @jay_s_uk

                This is strange. I have removed M307 and here's what I get...

                This is with command M140 commented out.

                NoM140.jpg

                No bed heater showing in DWC!

                ..and here's with M140 back in.....

                WithM104.jpg

                Still config error messages showing but heaters are working!!

                But, if I put the M950 commands for both the bed and extruder AFTER the M307 commands AND the M307 autotune settings commented out for the bed heater I get this...…

                Screenshot (1).png

                All heaters working, no errors but no autotune settings available for the bed heater!!!!!

                1 Reply Last reply Reply Quote 0
                • undefined
                  jay_s_uk
                  last edited by 7 Jan 2020, 15:12

                  Odd.
                  Might be one for @dc42 to jump in on

                  Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    chas2706
                    last edited by 7 Jan 2020, 15:17

                    @jay_s_uk

                    What is really odd is that the RRF Configurator puts the M140 command in and also puts the M950 commands AFTER the M307's and I cant get the heaters to work in any other configuration!

                    Thanks for your valued help and suggestions.

                    @dc42

                    David have you any suggestions on this?

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      chrishamm administrators
                      last edited by 7 Jan 2020, 15:35

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • undefined
                        dc42 administrators @jay_s_uk
                        last edited by dc42 1 Jul 2020, 16:07 7 Jan 2020, 15:57

                        @jay_s_uk said in Strange Behaviour in RRF3.0:

                        M950 has to come before and M308's
                        See https://duet3d.dozuki.com/Wiki/Gcode#Section_M950_Create_heater_fan_or_GPIO_servo_pin

                        No, M308 should come before the M950 that uses it, so that the sensor number used in the T parameter of a M950 H command already exists. OTOH any command that refers to a heater or fan number must come after the M950 command that creates that heater or fan.

                        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

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          chas2706
                          last edited by 7 Jan 2020, 16:05

                          @dc42

                          Even with that though I cant get my bed heater to show up on DWC or work without the M140 (set bed temperature) command that RRF configurator put in and the M307 autotune settings commented out.

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            chas2706
                            last edited by 7 Jan 2020, 16:10

                            @dc42

                            What does the command M140 H0 actually mean?
                            It is not documented.

                            undefined 1 Reply Last reply 7 Jan 2020, 16:13 Reply Quote 0
                            • undefined
                              dc42 administrators @chas2706
                              last edited by dc42 1 Jul 2020, 16:14 7 Jan 2020, 16:13

                              @chas2706 said in Strange Behaviour in RRF3.0:

                              @dc42

                              What does the command M140 H0 actually mean?
                              It is not documented.

                              It's mentioned at https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M140_Set_Bed_Temperature_Fast but not well documented. It tells RRF that the first bed heater is heater 0. I'll add some more examples to the documentation.

                              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

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                chas2706
                                last edited by 7 Jan 2020, 16:21

                                @dc42
                                OK thanks.
                                In my current config I have the commands in the correct order and includes the M140 command. All is well unless I uncomment my autotune setting for Heater HO.
                                The actual settings are:

                                M307 H0 A108.4 C735.4 D1.4 S1.00 V12.5 B0 ; Autotune result for bed

                                When uncommented I get this:

                                Screenshot (3).png

                                Thanks in advance.

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  dc42 administrators
                                  last edited by dc42 1 Jul 2020, 16:38 7 Jan 2020, 16:37

                                  M307 must come later in config.g than then M950 command that creates that heater.

                                  More generally, where a command references some entity (e.g. a heater, fan, sensor, GPIO port, or additional axis), that entity must be created first. Example:

                                  M308 S2 ... ; create sensor 2
                                  M950 H0 T2 ... ; create heater 0, uses sensor 2
                                  M307 H0 ... ; uses heater 0
                                  M140 H0 ; uses heater 0

                                  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

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    chas2706
                                    last edited by 7 Jan 2020, 16:45

                                    @dc42
                                    Thanks David that works great now!

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