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

    M98 issue after update from 3.4.6 to 3.5.4

    Scheduled Pinned Locked Moved
    Firmware installation
    3
    6
    258
    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.
    • thaug29undefined
      thaug29
      last edited by

      I have recently updated to 3.5.4 from 3.4.6 and the DWC keeps loosing its connection while running the pre print macros and an error message pops up in the control screen when this happens. The message reads,

      Connection interrupted, attempting to reconnect...
      Operation failed (Reason: Service Unavailable)

      I think this happens when it reads the following line in the macro,

      M98 P"/macros/autoz/scripts/autoz_probe.g" K1 H5 A4 S0.004

      Are the variables allowed at the end of the M98 line? The pre print macros continue and the print job finishes without any other issues.

      jay_s_ukundefined 1 Reply Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk @thaug29
        last edited by

        @thaug29 yes, you can have parameters passed into a macro as detailed here https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands#macro-parameters

        what board are you using?

        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

        thaug29undefined 1 Reply Last reply Reply Quote 0
        • thaug29undefined
          thaug29 @jay_s_uk
          last edited by

          @jay_s_uk I'm using the 6HC

          jay_s_ukundefined 1 Reply Last reply Reply Quote 0
          • jay_s_ukundefined
            jay_s_uk @thaug29
            last edited by

            @thaug29 can you post the contents of the macro?

            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

            thaug29undefined 1 Reply Last reply Reply Quote 0
            • thaug29undefined
              thaug29 @jay_s_uk
              last edited by

              @jay_s_uk
              #############################################################
              ; AutoZ - Automatic probe offset adjustment
              ;
              ; to use autoz, please place the following near the end
              ; of your slicer start gcode
              ; M98 P"/macros/autoz/autoz.g" <<< Place in slicer
              ;##################################################################

              ;##################################################################
              ; prepare
              ;##################################################################

              M98 P"/macros/autoz/autoz_settings.g" ; Load your settings
              M98 P"/macros/autoz/scripts/autoz_globals.g" ; Load autoz framework
              G29 S2 ; Disable mesh
              M290 R0 S0 ; Reset baby stepping

              ;##################################################################
              ; Probe the nozzle on teh Z-pin
              ;##################################################################

              ;G1 E-5 F1000
              M98 P"/macros/autoz/scripts/autoz_move_up.g" ; large z hop incase the nozzle is low and you have a high pin
              M400
              M98 P"/macros/autoz/scripts/autoz_goto_zpin.g" ; go to the z pin
              M400
              M98 P"/macros/autoz/scripts/autoz_adjust_safe_zdrive.g" ; set z drive safe physics
              M400
              M98 P"/macros/autoz/scripts/autoz_probe.g" K1 H5 A4 S0.004
              M400

              if !exists(global.macrocallresult)
              echo "Call to macro failed. Aborting"
              abort
              ;end if

              var nozzleheight = {global.macrocallresult}
              echo "nozzleheight: ", {var.nozzleheight}

              M98 P"/macros/autoz/scripts/autoz_restore_zdrive.g" ; restore the z drive to the state before autoz
              M400
              M98 P"/macros/autoz/scripts/autoz_move_up_small.g" ; move up 2mm
              M400

              ;##################################################################
              ; Load the magprobe
              ;##################################################################

              M98 P"/macros/autoz/scripts/autoz_move_up.g"
              M400
              M98 P"/macros/magprobe_attach.g" ; pick up and verify clicky
              M400
              M98 P"/macros/autoz/scripts/autoz_goto_zpin_magprobe_offset.g" ; move the clicky probe switch body over the z pin
              M400
              M98 P"/macros/autoz/scripts/autoz_adjust_safe_zdrive.g" ; set z drive safe physics
              M400

              ;##################################################################
              ; Probe magprobe body on the Z-pin
              ;##################################################################

              M98 P"/macros/autoz/scripts/autoz_probe.g" K1 H5 A4 S0.004
              M400

              if !exists(global.macrocallresult)
              echo "Call to macro failed. Aborting"
              abort
              ;end if

              var magprobeheight = {global.macrocallresult}
              echo "magprobeheight: ", {var.magprobeheight}

              ;##################################################################
              ; Probe the bed
              ;##################################################################

              M98 P"/macros/autoz/scripts/autoz_move_up.g" ; hop to clear the switch
              M400
              M98 P"/macros/autoz/scripts/autoz_goto_bedcenter.g" ; go to the center of the bed
              M400

              M98 P"/macros/autoz/scripts/autoz_probe.g" K0 H5 A4 S0.004
              M400

              if !exists(global.macrocallresult)
              echo "Call to macro failed. Aborting"
              abort
              ;end if

              var bedheight = {global.macrocallresult}
              echo "bedheight: ", {var.bedheight}

              ;##################################################################
              ; Calculate probe offset
              ;##################################################################

              var nozzleswitchoffset = {var.magprobeheight - var.nozzleheight + global.switchoffset}
              echo "nozzleswitchoffset: ", {var.nozzleswitchoffset}

              var probeoffset = {var.bedheight - var.nozzleswitchoffset}
              echo "probeoffset: ", {var.probeoffset}

              ;##################################################################
              ; Set probe offset as baby step offset
              ;##################################################################

              M290 R0 S{var.probeoffset}
              M400

              ;##############################################
              ; Finish up
              ;##############################################

              M98 P"/macros/autoz/scripts/autoz_restore_zdrive.g" ; restore the z drive to the state before autoz
              M98 P"/macros/autoz/scripts/autoz_move_up.g" ; small z hop
              M400
              M98 P"/macros/magprobe_dock.g" ; unload the clicky probe
              M98 P"/macros/autoz/scripts/autoz_goto_bedcenter.g" ; go to the center of the bed

              ;##############################################
              ; Done
              ;##############################################

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

                @thaug29 Are the lines after the 'if' statement correctly indented? If you can post the macro within code tags (</> icon on the message formatting bar) it should show indentation. This macro is also calling a lot of sub-macros, so without posting all of them, it's hard to say where it's causing problems.

                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

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