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

    M701 producing unexpected console messages.

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    3
    9
    313
    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.
    • Surgikillundefined
      Surgikill
      last edited by

      I'm working on setting up my filaments and their automated load/unload files as well as config files with temperatures and such.

      Currently, I am getting unexpected messages in my console from these commands, and I am not sure why they are showing up.

      When I run a filament load from DWC, it runs my load.g, and then I echo when I am entering a macro for the filament load moves. This is what I get in the console at that point.

      89ff5bc4-28e0-4e9d-9e06-1b533b560693-image.png

      I don't understand why there is a M703 in there, and I do not understand where the M292 is coming from. Documentation says that is comes from the user interface to acknowledge a blocking message, but I am not acknowledging a blocking message from the user interface.

      It also appears that M703 does not run. None of my temperatures or echos return from my config.g.

      Here are the relevant files.

      load.g

      ;echo "entering petg load.g"
      var TargetTemp = 250
      var thisHeater = tools[state.currentTool].heaters[0]
      
      M291 P"Please wait while the nozzle is being heated." R"Loading PETG" T5	; display message
      
      M568 S{var.TargetTemp} A2													; set current tool active temperature to TargetTemp and activate tool
      ;var thisHeater = tools[state.currentTool].heaters[0]
      ;show progress of heating from lower temp
      while (heat.heaters[tools[state.currentTool].heaters[0]].current < var.TargetTemp)
      	M291 R"Preheating..  Please wait" P{"Current temp = " ^  heat.heaters[var.thisHeater].current ^ " : target = " ^ var.TargetTemp}  S0 T2
      	G4 S2
      ;if  (heat.heaters[var.thisHeater].current) < (var.TargetTemp)
      ;	echo "waiting for temp in if statement"
      ;	M116																	; wait for temp
      M291 P"Press OK to feed filament" R"Loading PETG" S2						; display message
      echo "entering 0:/macros/Filament/load_moves.g"
      M98 P"0:/macros/Filament/load_moves.g"										; run file at path
      echo "entering config.g"
      M703
      

      load_moves.g

      M83					; Extruder to relative mode
      G1 E55 F200			; Feed 55mm of filament at 200mm/min
      G4 P1000			; Wait one second
      G1 E-1 F1800		; Retract 10mm of filament at 1800mm/min
      M400				; Wait for moves to complete
      M568 A0 			; Turn tool off
      

      config.g (for the filament)

      ;M207 S0.9 R0.0 F3000 T3000 Z0.0			; firmware retraction settings for PETG
      ;M572 D0 S0.1								; Pressure Advance
      ;M307 H0 A214.3 C641.7 D1.3 S1.00 V24.0 B0	; Bed PID tune for 120c
      ;M307 H1 A491.0 C190.9 D2.8 S1.00 V23.9 B0	; Hot end PID tune at 280c
      ;M566 X1200 Y1200 Z60 E3000					; jerk settings for PETG
      ;M204 P1000 T4000							; Set printing and travel accelerations
      echo "currently in filament config.g"
      M140 S85									; set bed temp
      M568 P0 R170 S250 A0							; set extruder temp
      M116 H0										; wait for bed temp
      

      I also have M703 in my tpost0.g, along with a M116. As you can see, the echo in my filament config.g never returns to the console, so I'm assuming the filament config.g is never run, even though I have it in both the load.g and tpost0.g.

      Any idea what I am missing here? Current firmware is 3.4.5 for both dwc and duet 3 6HC

      Thank you

      chrishammundefined 1 Reply Last reply Reply Quote 0
      • chrishammundefined
        chrishamm administrators @Surgikill
        last edited by

        @Surgikill M703 cannot be used in filament load macros because the filament isn't updated before load.g finishes. That's why DWC sends M701 and then M703.

        Duet software engineer

        Surgikillundefined 1 Reply Last reply Reply Quote 0
        • Surgikillundefined
          Surgikill @chrishamm
          last edited by

          @chrishamm Okay, but if DWC is sending M701 and M703, then it should be running config.g, but it isn't. Nowhere in my console output does my echo "currently in filament config.g" show up. I also still have no clue where the M292 is coming from, I can't find it anywhere in any of my files, so I am guessing it might be something coded into DWC?

          chrishammundefined 1 Reply Last reply Reply Quote 0
          • chrishammundefined
            chrishamm administrators @Surgikill
            last edited by

            @Surgikill M292 is sent by DWC to acknowledge message boxes. From your report it looks like you call M701 manually and try to call M703 at the end of load.g, which is incorrect. The best place to put M703 is tpostN.g so that filament settings can be applied automatically to the selected tool.

            Are you at least on RepRapFirmware and DuetWebControl 3.4.5? Please share your machine config.g as well.

            Duet software engineer

            Surgikillundefined 1 Reply Last reply Reply Quote 0
            • Surgikillundefined
              Surgikill @chrishamm
              last edited by

              @chrishamm I'm not trying to be a smartass, but I posted my firmware and DWC version in the original post, as well as stated that M703 is included in tpost0.g.

              M701 is being called through DWC using the load filament command under the tool. Even removing M703 does not change the behavior. I did notice that if I run T0, it does not run tpost0.g. I first have to deselect the tool, and then run T0 again in order for tpost0.g to be run.

              printer config.g

              ; Configuration file for Duet 3 MB 6HC (firmware version 3.3)
              ; executed by the firmware on start-up
              ;
              ; generated by RepRapFirmware Configuration Tool v3.3.15 on Mon Dec 26 2022 22:49:35 GMT-0500 (Eastern Standard Time)
              
              ; General preferences
              G90                                                             ; send absolute coordinates...
              M83                                                             ; ...but relative extruder moves
              M550 P"Magnum Opus"                                             ; set printer name
              M669 K1                                                         ; select CoreXY mode
              
              ; Wait a moment for the CAN expansion boards to start
              G4 S2
              
              ; Network
              M552 P0.0.0.0 S1                                                ; enable network and acquire dynamic address via DHCP
              M586 P0 S1                                                      ; enable HTTP
              M586 P1 S0                                                      ; disable FTP
              M586 P2 S0                                                      ; disable Telnet
              
              ; Independent Z-axis configuration
              M671 X-87.25:-87.25:382.75:382.75 Y-113.2:356.8:356.8:-113.2 S10						; leadscrews at front left, rear left, rear right and front right
              
              ; Drives
              M569 P0.0 S1                                                    ; physical drive 0.0 goes forwards
              M569 P0.5 S0                                                    ; physical drive 0.5 goes forwards
              M569 P0.2 S0                                                    ; physical drive 0.2 goes forwards
              M569 P121.0 S0                                                  ; physical drive 121.0 goes forwards
              M569 P0.4 S1                                                    ; physical drive 0.4 goes forwards
              M569 P0.1 S1                                                    ; physical drive 0.1 goes forwards
              M569 P0.3 S1                                                    ; physical drive 0.3 goes forwards
              M584 X0.5 Y0.0 Z0.1:0.2:0.3:0.4 E121.0							; set drive mapping
              M350 X16 Y16 Z16 E16 I1                                			; configure microstepping with interpolation
              M92 X80 Y80 Z400 E409	                                        ; set steps per mm
              M566 X1200 Y1200 Z120 E2000      		                        ; set maximum instantaneous speed changes (mm/min)
              M203 X30000 Y30000 Z1200 E7200                                  ; set maximum speeds (mm/min)
              M201 X4000 Y4000 Z600 E20000                                    ; set accelerations (mm/s^2)
              M906 X1800 Y1800 Z1300 E1100 I30                                ; set motor currents (mA) and motor idle factor in per cent
              M84 S30                                                         ; Set idle timeout
              
              ; Axis Limits
              M208 X0 Y0 Z0 S1                                                ; set axis minima
              M208 X320 Y315 Z390 S0                                          ; set axis maxima
              
              ; Endstops
              M574 X1 S1 P"121.io2.in"                                        ; configure switch-type (e.g. microswitch) endstop for low end on X via pin 121.io1.in
              M574 Y1 S1 P"io8.in"                                            ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin io8.in
              M574 Z1 S2                                                      ; configure Z-probe endstop for low end on Z
              
              ; Z-Probe
              M558 K0 P8 C"^121.io0.in" H10 F300:120 T12000 A3 S0.02			; set Z probe type to unmodulated and the dive height + speeds
                                                                              ; K0 for probe 0, P5 for NC switch, C for input pin, 
                                                                              ; ^ for enabling the native pullup resistor on Duet 2 
                                                                              ; hardware running RRF3  
                                                                              ; H dive height of 8mm, F300 probing speed 5mm/sec, 
                                                                              ; T9000 travel speed 150mm/sec,   
                                                                              ; A3 number of probes 1, S0.01 max tolerance of 0.01 
              											  
              G31 K0 P500 X-0.55 Y-33.74 Z6.05								; set Z probe trigger value, offset and trigger height
              																; CHECK for LOOSE things first! set Z probe trigger 
                                                                              ; value, offset and trigger height.  Higher numbers
                                                                              ; makes nozzle closer to bed
                                                                              ; switch plunger is 0.25mm to the LEFT and 41.28mm BEHIND
                                                                              ; the nozzle. Switch triggers 0.9mm BELOW nozzle
                                                                              ; https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe#Section_
              											  
              M557 X21:301 Y11:281 P15                      ; define mesh grid
              
              ; Heaters
              
              ;Bed
              M308 S0 P"temp0" Y"thermistor" T100000 B4725 C7.06e-8           ; 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 B0 S1.00                                                ; 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 120C
              
              ;Tool 0 (volcano hemera)
              M308 S1 P"121.temp0" Y"pt1000"									; configure sensor 1 as pt1000 on pin 121.temp0
              M950 H1 C"121.out0" T1                                          ; create nozzle heater output on 121.out0 and map it to sensor 1
              M307 H1 B0 S1.00                                                ; disable bang-bang mode for heater  and set PWM limit
              M143 H1 S300                                                    ; set temperature limit for heater 1 to 300C
              M591 D0 P1 C"121.io1.in" S1										; filament monitoring enabled (S) on extruder 0 (D) with active high value (P)
              
              ; Fans
              M950 F0 C"out9" Q500                                            ; create fan 2 on pin out9 and set its frequency
              M106 P0 C"CPAP Blower" S0 L0.15 X1.0 H-1						; set fan 2 value. Thermostatic control is turned off
              M950 F1 C"121.out2" Q500                                        ; create fan 1 on pin 121.out2 and set its frequency
              M106 P1 C"Hotend Fan" S1.0 H1 T55								; set fan 1 value. Thermostatic control is turned on
              
              ; Tools
              M563 P0 S"Hemera Volcano" 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
              
              ;G4 P1000
              M955 P121.0 I10													; accelerometer orientation
              M593 P"ei3" F46													; input shaping configuration
              
              ; Custom settings are not defined
              
              ; Miscellaneous
              M501                                                            ; load saved parameters from non-volatile memory
              T0                                                              ; select first tool
              
              
              
              OwenDundefined 1 Reply Last reply Reply Quote 0
              • OwenDundefined
                OwenD @Surgikill
                last edited by

                @Surgikill
                When you select "Load filament" or "Change filament" in DWC, it doesn't just issue one command.
                If you have no tool selected "Load Filament" will send
                T0 M701 S"PLA" M703
                If you have a tool selected it will send
                M701 S"PLA" M703

                Surgikillundefined 1 Reply Last reply Reply Quote 0
                • Surgikillundefined
                  Surgikill @OwenD
                  last edited by

                  @OwenD So then why is it not running the config.g for the filament that is being loaded? Both of those scenarios have M703, yet the echo in my filament config.g does not return to the console, which means the file isn't being run. Here is what it looks like when I load filament.

                  6757811f-942c-4301-af1a-c939054e4faf-image.png

                  The last M703 at 10:56:26 was sent manually by me typing it into the console, so the echo works, but it's not run during the load sequence.

                  OwenDundefined 1 Reply Last reply Reply Quote 0
                  • OwenDundefined
                    OwenD @Surgikill
                    last edited by OwenD

                    @Surgikill
                    There appears to be a bug in RRF 3.5b3 whereby multiple commands on a single line aren't all executed.
                    I haven't figured out the exact conditions.
                    So
                    M702 M701 S"PETG" M703 won't work
                    G28 M400 G1 X10 Y10 won't work
                    but
                    G1 X50 Y50 M400 G1 X10 Y10 does work

                    Surgikillundefined 1 Reply Last reply Reply Quote 0
                    • Surgikillundefined
                      Surgikill @OwenD
                      last edited by

                      @OwenD I'm on 3.4.5, so not sure if the bug is exclusive to b3, or if it goes farther back. I can try manually entering M701 S"filament" M703, and see what it does.

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