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

    deployprobe.g for Euclid not running

    Scheduled Pinned Locked Moved Solved
    Tuning and tweaking
    5
    23
    1.2k
    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.
    • Adamfilipundefined
      Adamfilip @jay_s_uk
      last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • Adamfilipundefined
        Adamfilip @jay_s_uk
        last edited by

        @jay_s_uk
        Here is the entire file

        ; ***********************************************************
        ; Euclid Probe Fixed Dock M401 Deploy Probe Macro
        ; RRF3.X Firmware Example
        ; saveas system/deployprobe.g
        ; comments and echo statements throughout are provided for convenience
        ; ***********************************************************
        ;  __________________________________________________________________________
        ;  |                                                                        |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  |                                * Probe Ready Position                  |
        ;  |                                  X150 Y150                             |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  | * Dock staging position                                                |
        ;  |   X9 Y70                                                               |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  | * Dock Exit Position                                                   | 
        ;  |   X9 Y29                                                               |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  |                                                                        |
        ;  |   X9 Y-21    X29 Y-21       X59 Y-21                                   |
        ;  | * Dock   * Dock Side  * Dock Preflight                                 |
        ;  |________________________________________________________________________| 
        ;
        ; Above is example 300x300 bed to coorelate with macros and movements below.
        ; This example is for a fixed dock, fixed gantry/carraige and moving bed motion system. 
        ; RailCore, Ender5, V-Core3, etc...
        ; coordinates are re-written below above the macros
        
        echo "Running deployprobe.g"
        if !move.axes[0].homed || !move.axes[1].homed     ; If the printer hasn't been homed, home it
            M98 P"0:/sys/homexy.g" 
        echo "stop 1"
        ; uncomment next line to echo the probe deploy state 
        ; echo "Object Model Deployuser token =" ^sensors.probes[0].deployedByUser
        
        M564 H1 S0                   ; Allow movement BEYOND axes boundaries (for Y to reach probe dock)
        
        G91                          ; relative positioning
        echo "Lift Z in advance of deploy" 
        G0 H2 Z15 F3000              ; move Z 15 for clearance above dock.
        ;                            ; need to figure out some safety check on this
        G90                          ; absolute positioning
        
        ; uncomment next line to echo the probe value 
        ; echo "Probe Value =" ^sensors.probes[0].value[0]
        
        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"
        
        ; if we're here we know it's becasue the above is true which I assume is because you have an NC switch as a probe.
        ; echo "Passed first logic test to deploy probe"
        
        ; Preflight position is X59 Y-21
        ; Dock Side position is at X29 Y-21
        ; Docked probe postion is at X9 Y-21 
        ; Dock exit point is at X9 Y29 
        ; Dock Re-Entry Staging Position is at X9 Y70
        ; Probe Ready Position X150 Y150 
        
        ; echo "Probe Pickup macro running"
        
        G0 X59 Y-21 F6000              ; move to Preflight Position
        M400                          ; wait for moves to finish
        
        G0 X29 Y-21 F6000               ; move to Dock Side dock location
        M400                          ; wait for moves to finish
        
        ; uncomment next line to echo the probe deplot state 
        ; echo "Object Model Deployuser token (before while loop) = " ^sensors.probes[0].deployedByUser
        
        G0 X9 Y-21 F3000                ; move over Dock 
        G4 P500                       ; pause 0.5 seconds
        M400                          ; wait for moves to finish
        
        ; uncomment next line to echo the probe value 
        ; echo "Probe Value =" ^sensors.probes[0].value[0]
        
        G0 X9 Y29 F300               ;  slide probe out of dock - slowly
        G0 X9 Y70 F3000               ; move to re-entry position
        M400                          ; wait for moves to finish
        
        echo "Probe Pickup complete"
        
        ; uncomment to echo the probe deploy state 
        ; echo "Object Model Deployuser token (after while loop) = " ^sensors.probes[0].deployedByUser
        
        G90                           ; absolute positioning
        G0 X150 Y150 G3000            ; move to the center of the bed
        M400                          ; wait for moves to finish
        
        
        if sensors.probes[0].value[0]!=0
          ; uncomment to echo the probe deploy state 
          echo "Object Model Deployuser token (in abort if section)= " ^sensors.probes[0].deployedByUser
          abort "Deployprobe endvalue not 0 Probe not picked up!  Deployt cancelled."
          
        M564 H1 S1                    ; Restrict movement to within axes boundaries (for normal Y movement)
        
        echo "Macro deployprobe.g complete"
        
        
        Adamfilipundefined jay_s_ukundefined 2 Replies Last reply Reply Quote 0
        • Adamfilipundefined
          Adamfilip @Adamfilip
          last edited by

          @adamfilip I run a macro that runs the deployprobe.g

          M401 P1 ;Deployprobe

          1 Reply Last reply Reply Quote 0
          • Stephen6309undefined
            Stephen6309 @Adamfilip
            last edited by

            @adamfilip I use this code to check homing:

            while iterations < #move.axes & move.axes[iterations].visible
            	if !move.axes[iterations].homed
            		G28
            		break
            
            
            1 Reply Last reply Reply Quote 0
            • jay_s_ukundefined
              jay_s_uk @Adamfilip
              last edited by

              @adamfilip so if your X and Y (assuming they are driver 0 and 1) aren't homed, it should home. If they are homed, it should echo stop1.
              Are you trying this with or without the motors homed?

              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

              Adamfilipundefined 1 Reply Last reply Reply Quote 0
              • Adamfilipundefined
                Adamfilip @jay_s_uk
                last edited by

                @jay_s_uk

                I run this after i have already homed

                this is my config if it helps

                ; Configuration file for Duet WiFi (firmware version 3)
                ; executed by the firmware on start-up
                ;
                ; generated by RepRapFirmware Configuration Tool v2.1.5 on Wed Jan 08 2020 19:38:55 GMT-0500 (Eastern Standard Time)
                
                ; General preferences
                ;M564 H0											; allow movement without homing
                G90                                              ; send absolute coordinates...
                M83                                              ; ...but relative extruder moves
                M550 P"TitanXY"                                  ; set printer name
                
                M669 K0                                          ; Motion Kinematics for Cartesian mode
                
                ; Network
                M552 S1                                          ; enable network
                M586 P0 S1                                       ; enable HTTP
                M586 P1 S0                                       ; disable FTP
                M586 P2 S0                                       ; disable Telnet
                
                ; Drives
                M569 P0 S0                           			; X Motor physical drive 0 goes backwards previously P0
                M569 P1 S1										; Y Motor
                M569 P2 S1                                      ; Z physical drive 2 goes backwards
                M569 P3 S1                                  ; E0 Extruder physical drive 3 goes Forwards
                ;M569 P4 S1                                      ; 2nd Y Motor on E1 Driver
                M584 X0 Y1 Z2 E3                              ; set drive mapping , Y is on two drivers. E1 as well
                M350 X16 Y16 Z4 I1                             ; configure microstepping without interpolation, previously 32
                M350 E16 I1                                     ; configure microstepping with interpolation
                M92 X80 Y80 Z800 E409             				; set steps per mm
                M566 X900 Y900 Z50 E1600 						; Set maximum instantaneous speed changes (mm/min) JERK
                M203 X21000 Y21000 Z500 E10000 				; Set maximum speeds (mm/min)
                M201 X2000 Y2000 Z50 E5000 					; Set accelerations (mm/s^2)
                ;M204 P1000 T3000								; Set printing and travel accelerations
                M906 X1100 Y1100 Z1200 E1200 I30 				; Set motor currents (mA) and motor idle factor in per cent X1400 Y1400 Z1300
                M84 S30 ; Set idle timeout
                M572 D0 S0.01									; Pressure Advance                                        ; Set idle timeout
                
                ; Axis Limits
                M208 X0 Y0 Z0 S1                                 ; set axis minima
                M208 X300 Y300 Z550 S0                           ; set axis maxima
                
                ; Endstops
                M574 X2 S1 P"!xstop"   ; X max active high endstop switch
                M574 Y2 S1 P"!ystop"   ; Y max active high endstop switch
                M574 Z1 S1 P"!zstop"   ; Z min active high endstop switch
                
                ;Euclid Settings
                M574 E1 S2  
                ;
                M558 K0 P5 C"^zprobe.in" H4 F500 60 T9000 A1 S0.01      
                G31 K0 P500 X0 Y-39 Z3.55             
                M557 X10:290 Y10:290 S40                      ; define mesh grid S86 =  Spacing 86mm
                
                ;Magnetic Filament Monitor
                ;M591 D0 P3 C"e1_stop" S1  ; filament monitor connected to E0_stop
                ;M591 D0 ; display filament sensor parameters for extruder drive 0
                
                ; Heaters
                M308 S0 P"bedtemp" Y"thermistor" T100000 B4138   ; configure sensor 0 as thermistor on pin bedtemp
                M950 H0 C"bedheat" T0                            ; create bed heater output on bedheat and map it to sensor 0
                M140 H0											; Map heated bed to heater 0
                M143 H0 S120                                     ; set temperature limit for heater 0 to 120C
                M307 H1 B0 R1.591 C187.0:154.2 D7.57 S1.00 V24.1
                M308 S1 P"e0temp" Y"thermistor" T100000 B4725 C7.06e-8 ; configure sensor 1 as thermistor on pin e0temp
                M950 H1 C"e0heat" T1                             ; create nozzle heater output on e0heat and map it to sensor 1
                M143 H1 S285									; set temperature limit for heater 1 to 280C
                M307 H1 R1.71 C175.5:157.9 D5.73 S1.00 V24.1
                
                ;Chamber Temp
                M308 S2 P"Chamber" Y"thermistor" T100000 B4725 C7.06e-8 A"Chamber"
                
                ; Fans
                M950 F0 C"fan2" Q500                         ;create fan 2 on pin fan0 and set its frequency
                M106 P0 S0 H-1                            ; set fan 0 value. Thermostatic control is turned off
                ;M950 F1 C"fan1" Q500                             ; create fan 1 on pin fan1 and set its frequency
                ;M106 P1 S1 H1 T45                                ; set fan 1 value. Thermostatic control is turned on
                ;M950 F2 C"fan1" Q500                             ; create fan 2 on pin fan1 and set its frequency
                ;M106 P2 S1 H1 T45                                ; set fan 2 value. Thermostatic control is turned on
                
                ; Tools
                M563 P0 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 are not defined
                ;M564 S0 H0										;disable homing and no limits on movement
                
                
                jay_s_ukundefined fcwiltundefined 2 Replies Last reply Reply Quote 0
                • jay_s_ukundefined
                  jay_s_uk @Adamfilip
                  last edited by

                  @adamfilip it should just run then. I don't see anything wrong with the logic.
                  What version of RRF are you running?

                  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

                  Adamfilipundefined 2 Replies Last reply Reply Quote 0
                  • Adamfilipundefined
                    Adamfilip @jay_s_uk
                    last edited by

                    @jay_s_uk

                    Board: Duet 2 WiFi (2WiFi)
                    Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.4.1 (2022-06-01)
                    Duet WiFi Server Version: 1.26

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

                      @adamfilip

                      If you have two steppers for the Y axis why do they not appear in your M584 commands?

                      Normally it would look like this (based on the comments):

                      M584 X0 Y1:4 Z2 E3

                      Thanks.

                      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

                      Adamfilipundefined 1 Reply Last reply Reply Quote 0
                      • Adamfilipundefined
                        Adamfilip @fcwilt
                        last edited by

                        @fcwilt actually I use too, its changed to only a signal Y.
                        sorry some old notes still linger

                        1 Reply Last reply Reply Quote 1
                        • Adamfilipundefined
                          Adamfilip @jay_s_uk
                          last edited by

                          @jay_s_uk yeah its weird.

                          I restarted the machine. did home all.
                          ran the macro and nothing.
                          not even the first echo statement showed up in console

                          Adamfilipundefined fcwiltundefined 2 Replies Last reply Reply Quote 0
                          • Adamfilipundefined
                            Adamfilip @Adamfilip
                            last edited by

                            @adamfilip

                            I copied the entire deployprobe.g code into a macro and it runs on its own

                            so it seems like the deployprobe.g itself isnt being run when asked with
                            M401 P1 ;Deployprobe

                            fcwiltundefined oliofundefined 2 Replies Last reply Reply Quote 0
                            • fcwiltundefined
                              fcwilt @Adamfilip
                              last edited by

                              @adamfilip

                              Just to provide another point of view.

                              I no longer home things as needed because I found I did not like homing taking place unexpectedly because I had tried to do something that required the printer to be homed, like mount the probe.

                              So now I just check that the printer is homed and abort if it is not.

                              I have a Euclid on one of my printers but I don't use the deploy/retract feature that is part of the firmware. I call my routines to mount/unmount the probe as needed. I have found that for normal operations I can keep the probe mounted except during actual printing. Any operation that needs the probe, such as setting the Z=0 Datum, mounts the probe and leaves it mounted. In the print start code just before actual printing begins the probe is unmounted.

                              Just food for thought.

                              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
                              • fcwiltundefined
                                fcwilt @Adamfilip
                                last edited by

                                @adamfilip said in deployprobe.g for Euclid not running:

                                so it seems like the deployprobe.g itself isnt being run when asked with
                                M401 P1 ;Deployprobe

                                Doesn't the firmware track the state of the probe and only run the deploy/retract routines when it thinks it needs to?

                                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
                                • oliofundefined
                                  oliof @Adamfilip
                                  last edited by

                                  @adamfilip If the euclid is your only probe, drop the P1 and only run M401. Alternately, try P0 because your probe definition assignes ID 0.

                                  <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                                  Adamfilipundefined 1 Reply Last reply Reply Quote 1
                                  • Adamfilipundefined
                                    Adamfilip @oliof
                                    last edited by

                                    @oliof Thank you both M401 and M401 P0 worked!

                                    Adamfilipundefined 1 Reply Last reply Reply Quote 1
                                    • Adamfilipundefined
                                      Adamfilip @Adamfilip
                                      last edited by

                                      @adamfilip only other error im getting in console is

                                      Probe Pickup complete
                                      Warning: G3000: Command is not supported

                                      Adamfilipundefined 1 Reply Last reply Reply Quote 0
                                      • Adamfilipundefined
                                        Adamfilip @Adamfilip
                                        last edited by

                                        @adamfilip

                                        G90                           ; absolute positioning
                                        G0 X150 Y150 G3000            ; move to the center of the bed
                                        M400                          ; wait for moves to finish
                                        
                                        Adamfilipundefined 1 Reply Last reply Reply Quote 0
                                        • Adamfilipundefined
                                          Adamfilip @Adamfilip
                                          last edited by

                                          @adamfilip probably just a typo and should be F

                                          1 Reply Last reply Reply Quote 2
                                          • Phaedruxundefined Phaedrux marked this topic as a question
                                          • Phaedruxundefined Phaedrux has marked this topic as solved
                                          • First post
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA