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

    Stopping unnecessary euclid probe deploy/retracts

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    3
    14
    402
    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

      So I read this thread, and it explains how to solve my issue, but not really in the way that I want.

      Currently, when I run a macro with

      G28
      G32
      G29
      

      It will deploy the probe at the beginning of each command, and retract the probe at the end of each command. This is obviously because I have 'M401' and 'M402' at the beginning and end of each file, respectively.

      I'm trying to find an intelligent way for the machine to know whether or not it needs to stow the probe at the end of each file. I really do not want to be calling out to other files/macros if I can help it. I was considering using some global variables or prompts in my homeall.g. Do you all have any suggestions on how I could implement this?

      homeall.g

      if !move.axes[0].homed || !move.axes[1].homed     ; If the printer hasn't been homed, home it
         M98 P"0:/sys/homex.g"
         M400
         M98 P"0:/sys/homey.g"
         M400
         M98 P"0:/sys/homez.g"
      
      

      bed.g

      ; bed.g
      ; called to perform automatic bed compensation via G32
      ;
      ; generated by RepRapFirmware Configuration Tool v2 on Fri Nov 16 2018 19:13:03 GMT-0500 (Eastern Standard Time)
      if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed    ; If the printer hasn't been homed, home it
         G28 
      
      M401 P0							; deploy probe
      M558 H10 F400 A3				; fix probe speed to 8mm/s and dive height to 10mm
      G90								; absolute positioning
      G4 P250							; wait 250 usecs
      
      G30 P0 X21 Y21 Z-99999			; probe front left PEI
      G30 P1 X21 Y281 Z-99999			; probe back left PEI
      G30 P2 X301 Y281 Z-99999		; probe back right PEI
      G30 P3 X301 Y21 Z-99999 S4		; probe near front right leadscrew and calibrate 4 motors
      
      M558 H2 F120 A3					; fix probe speed to 2mm/s and dive height to 2mm
      
      G30 P0 X21 Y21 Z-99999			; probe front left PEI
      G30 P1 X21 Y281 Z-99999			; probe back left PEI
      G30 P2 X301 Y281 Z-99999		; probe back right PEI
      G30 P3 X301 Y21 Z-99999 S4		; probe near front right leadscrew and calibrate 4 motors
      
      G1 X162.55 Y184.75 F12000						; go back to the first probe point and reprobe 0 in case it moved
      G30												; Probe the bed at the current XY position. When the probe is triggered, adjust the Z offset of the current tool to make the current position Z=0.
      M402 P0											; run retractprobe.g
      G1 Z15 F600										; lift Z relative to current position
      G90												; absolute positioning
      M564 S1 H0										; reset the bounding limits
      M558 H10										; revert z probe dive height back to normal. 
      
      fcwiltundefined 1 Reply Last reply Reply Quote 0
      • fcwiltundefined
        fcwilt @Surgikill
        last edited by

        @Surgikill

        It's been a while since I used a removable Z probe but if memory serves I had to handle the deployment in my own code. I could not use the "built-in" features.

        But my memory may be faulty.

        Frederick

        Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

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

          @fcwilt My current thought is to have a printstart.g file, where it will set a global variable flag, and then when it runs through my G28, G32, G29, I can have an "if" statement using that global variable flag to stop the M402 command, and then reset the flag at the end of printstart.g. That way, I can use every command standalone, but still use them in my start.g routine

          fcwiltundefined 1 Reply Last reply Reply Quote 0
          • fcwiltundefined
            fcwilt @Surgikill
            last edited by

            @Surgikill

            Well it seems to me you should be able to keep the probe mounted all the time, only dismounting in
            the "print begin" file just before the print file code starts to execute

            Then you could remount the probe in the "print done " file.

            Yes? No?

            Frederick

            Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

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

              @fcwilt Yes, I could do that, but I'm not super fond of that idea.

              jay_s_ukundefined fcwiltundefined 2 Replies Last reply Reply Quote 0
              • jay_s_ukundefined
                jay_s_uk @Surgikill
                last edited by

                @Surgikill put M401 in your macro at the beginning and M402 at the end. That will override and subsequent deploy and retracts

                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

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

                  @Surgikill said in Stopping unnecessary euclid probe deploy/retracts:

                  @fcwilt Yes, I could do that, but I'm not super fond of that idea.

                  It minimizes the time spent mounting/dismounting and saves "wear and tear" on the system. It worked for me.

                  Good luck.

                  Frederick

                  Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

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

                    @jay_s_uk Yes, I have that. The issue is I am running homeall.g, bed.g, and mesh.g. Each of them has a m401 and m402 at the beginning and end, respectively. I want to be able to run each of them standalone, or in consecutive order. If I run them in consecutive order currently, it will deploy/retract at the beginning and end of each file.

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

                      @Surgikill i understand that.
                      what i'm saying is also add M401 and M402 to that to the macro you use to call all 3 as well as where they currently are

                      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

                      Surgikillundefined 2 Replies Last reply Reply Quote 0
                      • Surgikillundefined
                        Surgikill @jay_s_uk
                        last edited by

                        @jay_s_uk That is then going to abort the process due to error checking in my deployprobe.g

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

                          @Surgikill you could pass a parameter through with each command, e.g. G28 A"macro" and do a parameter check in your deployprobe.g
                          if the parameter isn't present, do the error checking etc

                          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

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

                            @jay_s_uk Currently I am using the euclid firmware macro. This snippet will trigger the abort.

                            if sensors.probes[0].value[0]!=1000    ; if sensor is value other than 1000 do this
                              ; uncomment next line to echo the probe deploy state 
                              ; echo "deployuser token = " ^sensors.probes[0].deployedByUser
                              ; echo "Probe State = " ^sensors.probes[0].value[0]
                              abort "deployprobe start value Probe already picked up.  Manually return probe to the dock"
                            

                            I'm assuming I can use M99 here instead, so it will not abort the entire nest of macros, and only exit deployprobe.g

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

                              @jay_s_uk I'm thinking I could use this, instead of the straight abort that the euclid macro has.

                              if sensors.probes[0].value[0]!=1000    ; if sensor is value other than 1000 do this
                              	echo "Probe already picked up. Checking probe status"
                              	if sensors.probes[0].value[0]!=0
                              		abort "Probe not detected. Please check machine"
                              	M99
                              
                              jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                              • jay_s_ukundefined
                                jay_s_uk @Surgikill
                                last edited by

                                @Surgikill possibly. i've not used M99

                                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
                                • First post
                                  Last post
                                Unless otherwise noted, all forum content is licensed under CC-BY-SA