Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. Leonard03
    • Profile
    • Following 11
    • Followers 0
    • Topics 11
    • Posts 118
    • Best 6
    • Controversial 0
    • Groups 0

    Leonard03

    @Leonard03

    8
    Reputation
    6
    Profile views
    118
    Posts
    0
    Followers
    11
    Following
    Joined Last Online

    Leonard03 Unfollow Follow

    Best posts made by Leonard03

    • RE: M574 can't disable pin

      Good morning everyone!

      First of all, I would like to apologize to you. This was not an issue with RRF but with my own code... Thank you all for your help and support!

      Just in case, @gloomyandy and @AndyE3D you were right about M118 in every file in MMU Control. But I has no chance seeing something unusual until I used logging.
      @dc42 I am sorry for tagging you here and wasting your time.. was my fault, not RRF's fault..

      The problem was elsewhere, right at the beginning, in tpostn.g.
      There, were three simple calls: load the filament in the MMU, then in the extruder and last in the nozzle. If during those macros any error raised, the tool change macro continued showing a dialog (M291). But, it can also call errorAction.g which by itself loads the filament all the way to the nozzle, but being called from a "while" loop in tpostn.g, after errorAction.g the while loop was trying to load it again to the MMU. The log confirmed that:

      2023-08-02 12:02:28 [debug] Finish: loadToBondtech.g
      2023-08-02 12:02:28 [debug] Begin: idlerMove.g
      2023-08-02 12:02:28 [debug] Finish: idlerMove.g
      2023-08-02 12:02:28 [debug] Begin: loadToNozzle.g
      2023-08-02 12:02:28 [debug] Finish: loadToNozzle.g     < here the duex.e2stop is configured as a filament sensor
      2023-08-02 12:02:28 [debug] Begin: loadToFinda.g     < here the duex.e2stop is used to load the filament in the MMU
      2023-08-02 12:02:35 [warn] Error: Pin 'duex.e2stop' is not free
      2023-08-02 12:02:35 [warn] Error: G1: Failed to enable endstops
      2023-08-02 12:02:41 [info] Event logging stopped
      

      In tpostn.g adding a break statement to exit the wile loop solved this problem

      Thank you again to all of you for your support! 😊

      posted in Beta Firmware
      Leonard03undefined
      Leonard03
    • RE: What useful things have you printed on a 3D printer?

      For me at least, a 3D printer is the perfect companion for those who like to do electronic projects.

      Electronics are my toys from when I was born, so this hobby persists to this day. Every project needs some kind of enclosure.

      I'm thinking about an Arduino/Raspberry Pi. As these boards can interact with many peripherals, 3D printing is indispensable for that "professional" touch.

      There are generic "project boxes," generic ones, injection molded. But it is something generic. As an enthusiast, I think that every project, custom and unique.

      If in some shop I see something that catches my attention, most of the time in my mind comes an "I can do it better", for me at least.

      For an enclosure for that board, sensors, lights, and everything else, it is one thing to mount it with double-sided tape (maybe), and it is another thing that every LED, sensor, and internal layout has its own nut, bolt, and its own place to be mounted to. 😄

      Another benefit of 3D printing in this area is the freedom to choose your own color schemes and different materials you can print (e.g., matte vs. glossy vs. CF).

      I've seen very good projects done using generic components and plastic components, but in my opinion, those can't beat your personal idea, and the fact that this technology can really bring a thought to reality just as you imagine it.

      posted in General Discussion
      Leonard03undefined
      Leonard03
    • RE: G30 during G28 issue

      @fcwilt Since every G30 command alters the X coordinate without physically moving the stepper, after the initial homing, I don't know where the toolhead is.

      By setting its physical position to X0 Y0, using G92, I can measure the distance between the reported and actual positions relative to endstop.
      Let's say I move the nozzle to X80 and perform 10 probes at that point; the reported coordinate is no longer X80, regardless of the actual physical position. If I set that position as the zero position and perform a G1 H4 move toward the endstop, the reported X position afterward is the offset amount. I want to obtain that value from a theoretical zero point.
      Normally, if I move to X80 and return by pressing the endstop blade, the actual and reported coordinates should be close (accounting for endstop accuracy), but currently, they are not. I do this out of curiosity to see "how much."
      Hope this make sense 😁

      posted in My Duet controlled machine
      Leonard03undefined
      Leonard03
    • [RRF 3.6.0-beta.2 Error code 7]

      Hello everyone!

      I got a strage issue with my printer, after an 8 hours print, i got this error:

      1000039660.jpg

      Sadly I cannot get a M122 report for two reasons:
      In DWC with 3.6.x I cannot get an M122 report even if other comands works as expected
      Over USB, I needed to do an emergency stop wich cleared the relevant report..

      My board is a Duet 2 WiFi + Duex5 with MMU3

      Anyway, I will upload my config files to google drive and update this post.
      All that I have is the gcode and the aproximate layer height when the error occured

      By the way, with beta 1 for only one print I got the exact same error, the next day I do a simulation wich completed as expected, printed the exact same gcode without any problems. So, seems to be a random issue wich I can't reproduce myself twice. I started a slightly modified print now to see how it goes

      Thank you in advance, and any help is welcomed!

      Update:
      This is the gcode in question: Jack Case_STEC7_0.2mm_PLA_5h24m.gcode
      The error occurred on layer 312 / Z height 62.40 most likely somewhere around line 117292 in that gcode

      This is my config/SD card https://drive.google.com/drive/folders/1OcTPiUw0RlYuLT-Skopb6It37nG4u9Io?usp=sharing

      posted in Beta Firmware
      Leonard03undefined
      Leonard03
    • RE: G30 during G28 issue

      Started now a print. Pause and resume works as expected, skew compensation is active

      Axis compensations - XY: 0.00690, YZ: 0.00000, ZX: 0.00000
      

      Inducing a "power failure" and resuming:

      Axis compensations - XY: 0.00690, YZ: 0.00000, ZX: 0.00000
      

      So skew compensation is still active and correctly applied, but the shift is there

      posted in My Duet controlled machine
      Leonard03undefined
      Leonard03
    • RE: [RRF 3.6.0-beta.2 Error code 7]

      @T3P3Tony Confirm no motion errors with the beta4 😊

      posted in Beta Firmware
      Leonard03undefined
      Leonard03

    Latest posts made by Leonard03

    • RE: G30 during G28 issue

      @dc42 Thank you very much! I confirm that this issue is solved! Works very ewll 😊
      Also, thank you to everyone for every input and all the support !

      posted in My Duet controlled machine
      Leonard03undefined
      Leonard03
    • RE: G30 during G28 issue

      @droftarts Yes, 3.6.0-rc.3+2 (2025-05-19 11:46:09)

      posted in My Duet controlled machine
      Leonard03undefined
      Leonard03
    • RE: G30 during G28 issue

      @droftarts sorry... 😐

      posted in My Duet controlled machine
      Leonard03undefined
      Leonard03
    • RE: G30 during G28 issue

      @droftarts Tried the suggested workaround
      Umm.. I don't know what to say
      I've modified the homeall.g from:

      ; homeall.g
      ; called to home all axes
      ;
      ; generated by RepRapFirmware Configuration Tool v3.2.0 on Tue Dec 29 2020 16:23:44 GMT+0200 (Eastern European Standard Time)
      
      G91							; relative positioning
      G1 H2 Z5 F6000				; lift Z relative to current position
      G1 H1 X-320 Y-306 F1800		; move quickly to X and Y axis endstops and stop there (first pass)
      G1 X5 Y5 F6000				; go back a few mm
      G1 H1 X-320 Y-306 F240		; move slowly to X and Y axis endstops once more (second pass)
      G1 H1 Z-405 F240			; move Z down stopping at the endstop
      
      G90							; absolute positioning
      G1 Z5
      G1 X{(310/2)-sensors.probes[0].offsets[0]} Y{(310/2)-sensors.probes[0].offsets[1]} F6000
      G30
      G1 X0 Y0
      
      if global.MMUmode = true
      	M98 P"0:/sys/MMU Control/homeMMU.g"
      

      to

      ; homeall.g
      ; called to home all axes
      ;
      ; generated by RepRapFirmware Configuration Tool v3.2.0 on Tue Dec 29 2020 16:23:44 GMT+0200 (Eastern European Standard Time)
      
      M98 P"homex.g"
      M98 P"homey.g"
      G1 H1 Z-405 F240			; move Z down stopping at the endstop
      
      G90							; absolute positioning
      G1 Z5
      G1 X{(310/2)-sensors.probes[0].offsets[0]} Y{(310/2)-sensors.probes[0].offsets[1]} F6000
      G30
      G1 X0 Y0
      
      if global.MMUmode = true
      	M98 P"0:/sys/MMU Control/homeMMU.g"
      

      Is an improvement, still shifted but way less then before
      20250520_210957.jpg
      From left to right: No skew compensation, in homeall.g homing both X and Y at the same time and the last is calling independent macros in homeall.g
      The shift is reduced from 2mm to 1mm

      Update: if during a pause I rehome X or Y the print resume at the right position

      posted in My Duet controlled machine
      Leonard03undefined
      Leonard03
    • RE: G30 during G28 issue

      @droftarts Interesting point of view. All right, I'm trying this now and report back

      posted in My Duet controlled machine
      Leonard03undefined
      Leonard03
    • RE: G30 during G28 issue

      @dc42 This a ressuregt.g after a print that had a shift, that I cancelled

      ; Resume printing file "0:/gcodes/xyzCalibration_cube,0.2mm,PLA,Anycubic PLA Pantone Spring Leaf,25m.gcode" after print paused at 2025-05-19 21:06
      M140 P0 S60.0
      G29 S1
      M568 P0  A0 S210 R170
      M568 P1  A0 S210 R170
      M568 P2  A0 S210 R170
      M568 P3  A0 S210 R170
      M568 P4  A2 S210 R170
      G21
      M98 P"resurrect-prologue.g" X144.359 Y141.863 Z3.400 U57.000 V0.000 W17.998
      M290 R0 X0.000 Y0.000 Z0.000 U0.000 V0.000 W0.000
      M205 X10.00 Y10.00 Z0.40 U1.00 V4.00 W0.10
      ; Workplace coordinates
      G10 L2 P1 X0.00 Y0.00 Z0.00 U0.00 V0.00 W0.00
      G10 L2 P2 X0.00 Y0.00 Z0.00 U0.00 V0.00 W0.00
      G10 L2 P3 X0.00 Y0.00 Z0.00 U0.00 V0.00 W0.00
      G10 L2 P4 X0.00 Y0.00 Z0.00 U0.00 V0.00 W0.00
      G10 L2 P5 X0.00 Y0.00 Z0.00 U0.00 V0.00 W0.00
      G10 L2 P6 X0.00 Y0.00 Z0.00 U0.00 V0.00 W0.00
      G10 L2 P7 X0.00 Y0.00 Z0.00 U0.00 V0.00 W0.00
      G10 L2 P8 X0.00 Y0.00 Z0.00 U0.00 V0.00 W0.00
      G10 L2 P9 X0.00 Y0.00 Z0.00 U0.00 V0.00 W0.00
      M486 S-1
      T4
      G54
      M106 S0.99
      M116
      G92 E1.83369
      M83
      G94
      G17
      M23 "0:/gcodes/xyzCalibration_cube,0.2mm,PLA,Anycubic PLA Pantone Spring Leaf,25m.gcode"
      M26 S54031
      G0 F6000 Z5.400
      G0 F6000 X144.359 Y141.863 U57.000 V0.000 W17.998
      G0 F6000 Z3.400
      G1 F1871.0 P0
      M204 P1000.0 T2000.0
      G21
      M106 P0 S0.99
      M302 P0
      M24
      
      

      And this is resurrect-prologue.g

      M17 E0
      
      G28 X Y						; home X and Y, hope that Z hasn't moved
      if global.MMUmode = true
      	M98 P"0:/sys/MMU Control/homeMMU.g"
      
      G91
      G1 Z-5
      

      Please have a look at this description

      @Leonard03 said in G30 during G28 issue:

      Reenable the extruder stepper (this is a very old bug in RRF. I can't use the MMU to load filament if the extruder stepper is disabled, so enable it before anything else)
      Home X and Y axis (Z axis has never been disabled)
      Rehome the MMU (UVW axis)
      Lower the Z axis (I can't remember exactly why this is necessary, but it works)
      And after, RRF executes ressurrect.g.
      Until now, is anything that seems out of place?

      posted in My Duet controlled machine
      Leonard03undefined
      Leonard03
    • RE: G30 during G28 issue

      Started now a print. Pause and resume works as expected, skew compensation is active

      Axis compensations - XY: 0.00690, YZ: 0.00000, ZX: 0.00000
      

      Inducing a "power failure" and resuming:

      Axis compensations - XY: 0.00690, YZ: 0.00000, ZX: 0.00000
      

      So skew compensation is still active and correctly applied, but the shift is there

      posted in My Duet controlled machine
      Leonard03undefined
      Leonard03
    • RE: G30 during G28 issue

      @droftarts I also thank you for the continued help with this issue
      Those are fair questions, and I will split my answer in two parts:
      How it works and what actually happens

      My printer has two power plugs (one and a half actually 😆)
      First, is the main power plug. Is the power plug for the UPS. Then, in the UPS is plugged the printer's ATX power supply and from it the Duet and DueX are powered.
      The second, is a phone charger. A 5V 500mA power supply that serves as a power feedback.
      From it I powering a 5V simple relay. The switching contacts of that relay (two of them) are wired to duex.e3stop

      On that input, I have defined two triggers in config.g:

      M950 J2 C"^duex.e3stop"										; Input 1 uses e2stop pin, pullup enabled (power feedback for UPS)
      M581 P2 T2 S1 R1											; external trigger 1, trigger occurs on the inactive-to-active edge, trigger at any time (UPS Backup power)
      M581 P2 T3 S0 R2											; external trigger 1, trigger occurs on the active-to-inactive edge, trigger only when not printing from SD card (AC back, resume prompt)
      

      Trigger2.g senses if that relay has power to it, so if a print is in progress, it will be executed.
      It's macro is this:

      ; Called when mains power is intrerrupted and UPS battery is in use
      
      M118 S"Running on backup power !" L0	; display warning message when using UPS battery
      M25										; Pause printing process
      M400
      M0										; cancel current job
      M568 P0 A0								; turn off nozzle heater
      
      G91
      ; G1 Z-5
      
      M18 X Y E0								; Disable steppers to conserve battery power, but leave Z stepper energized
      
      M552 S-1								; Disable Wi-Fi adapter
      
      if global.MMUmode = true
      	echo >>"0:/sys/MMU Control/errLog.txt" state.time, ",", "Blackout occured", "Z="^move.axes[2].machinePosition-5	; -5 is the Z lift in pause.g
      	M18 UVW								; disable MMU steppers
      

      If the power goes out, the printer will continue to run on the UPS's battery, in the end safely shutting down the printer.
      From what I intended to happen.. is as follows:

      • Show a dialog that the power is lost (really this never shows because of the pause dialog that is shown after that; not a problem)

      • list itemPause the print (using the M25), stage that the ressurect is created (if I'm not mistaken)

      • Cancel the print (M0) (stop.g behaves a bit differently in this case, compared with a normal job end, I will describe it later)

      • Turn off the nozzle heater, for a safe shutdown if the power is not restored in time

      • Disable X, Y and extruder steppers to conserve power

      • Disable the WiFi adapter (if the power goes out, the router will be also powered off, so to prevent the board from continuing to search for the network and flood the PanelDue interface with dialogs complaining that it can't find the network)

      • If the MMU is enabled, disable its steppers as well (to conserve power) and log this event to a file.

      As stated above, regarding the M0 or stop.g in this scenario:

      ; stop.g
      ; called when M0 (Stop) is run (e.g. when a print from SD card is cancelled)
      ;
      ; generated by RepRapFirmware Configuration Tool v3.2.0 on Tue Dec 29 2020 16:23:44 GMT+0200 (Eastern European Standard Time)
      
      G91
      G1 Z10 F6000										; lift z by 10mm
      
      if global.MMUmode = false
      	M221 S100 D0
      	T-1
      	M106 P0 S0
      else
      	M221 S100 D0
      	M221 S100 D1
      	M221 S100 D2
      	M221 S100 D3
      	M221 S100 D4
      
      	M572 D{state.currentTool} S0
      	G1 E3 F800
      
      	M106 P0 S0
      
      	T-1
      	M98 P"0:/sys/MMU Control/moveIdler.g" S5
      	M98 P"0:/sys/MMU Control/counterCheck.g"
      G90
      G0 X0 Y300 F3600																; go to the back left corner
      
      M18 X Y E0																		; disable X, Y and E steppers
      
      if global.MMUmode = true														; if MMU is enabled
      	M18 U V W																	; disable MMU steppers
      	if state.status = "processing"
      		echo >>"0:/sys/MMU Control/errLog.txt" state.time, ",", "Print complete!"
      
      M568 P0 A0																		; turn off tool 0 heater
      
      if sensors.gpIn[1].value = 1
      	M140 S-273.15																; turn off bed heater
      	if move.axes[2].machinePosition < 150
      		G1 Z150
      	M400
      	M18 Z
      	M81 S1																		; turn off ATX after nozzle cooldown
      

      In normal operation, at the end of the print, I lift the nozzle above the print, reset extrude factor override percentage just in case it was modified during the print, disable pressure advance, and an attempt to give the filament end a nice, sharp tip , so it can be loaded easily next time, then unload the filament.
      Then move the bed forward, park the tool carriage to endstop, disable the MMU steppers and turn off the nozzle heater.

      Now, if the power feedback says that there is no mains power (the charger, relay and duex.e3stop input), keep the bed at the print temperature, so the print will not detach from the print surface, and don't rise the Z too much but keep the Z steppers energized, so they keep their positions set by the G32 at the start of the print. Also, keep the power supply turned on (opposite to the M81 S1 if there are no power related issues)

      After this is completed, the printer will wait until the power is recovered. The UPS cand provide almost one and a half time to resume.

      How I resume after a power failure:
      If the printer is still powered on using the UPS and the mains power comes back, the phone charger will receive power again, turning on the relay. The relay, will tell the bord that power is back, so in the rising edge of the duex.e3stop will use the trigger3.g:

      ; Called when mains power is back
      
      M118 S"Back on AC power" L0									; display warning message when using UPS battery
      M552 S1														; Enable Wi-Fi adapter again
      
      if fileexists("0:/sys/resurrect.g")
      	M291 P"Back on AC power. Resume print ?" R"UPS Status" S3	; Prompt if printing can be resumed
      	M916														; Resume print after power loss
      
      	if global.MMUmode = true
      		echo >>"0:/sys/MMU Control/errLog.txt" state.time, ",", "Blackout recovered"
      

      Now that everything is good to go:

      • Reenable the WiFi module and reconect to the router

      • Search for the ressurrect.g and if it is found, ask if the print can be resumed.

      • If I confirm, run the M916 command to go ahead.

      Resurrect-prologue.g is this:

      M17 E0
      
      G28 X Y						; home X and Y, hope that Z hasn't moved
      if global.MMUmode = true
      	M98 P"0:/sys/MMU Control/homeMMU.g"
      
      G91
      G1 Z-5
      
      • Reenable the extruder stepper (this is a very old bug in RRF. I can't use the MMU to load filament if the extruder stepper is disabled, so enable it before anything else)
      • Home X and Y axis (Z axis has never been disabled)
      • Rehome the MMU (UVW axis)
      • Lower the Z axis (I can't remember exactly why this is necessary, but it works)
        And after, RRF executes ressurrect.g.

      Until now, is anything that seems out of place?

      Pause.g is this, but is complicated:

      ; pause.g
      ; called when a print from SD card is paused
      ;
      ; generated by RepRapFirmware Configuration Tool v3.2.0 on Tue Dec 29 2020 16:23:44 GMT+0200 (Eastern European Standard Time)
      
      if global.MMUmode = false
      	M83							; relative extruder moves
      	G10
      	G91							; relative positioning
      	G1 Z5 F600					; lift Z by 5mm
      	G90							; absolute positioning
      	G1 X0 Y0 F6000				; go to X=0 Y=0
      	M591 D0 S0
      
      else
      	if state.status != "paused"
      		echo >>"0:/sys/MMU Control/errLog.txt" state.time, ",", "Pause"
      
      	set global.pause = false
      
      	if state.status = "pausing"
      		if global.errQueue[#global.errQueue-1] = "SELECTOR_CANNOT_HOME" || global.errQueue[#global.errQueue-1] = "SELECTOR_CANNOT_MOVE" || global.errQueue[#global.errQueue-1] = "INSPECT_FINDA"
      			M18 U
      		elif global.errQueue[#global.errQueue-1] = "PULLEY_CANNOT_MOVE"
      			M18 V
      		elif global.errQueue[#global.errQueue-1] = "IDLER_CANNOT_HOME" || global.errQueue[#global.errQueue-1] = "IDLER_CANNOT_MOVE"
      			M18 W
      
      	if global.spoolJoin = false && global.loadNext = false
      		M83						; relative extruder moves
      		G10
      		G91						; relative positioning
      		G1 Z5 F600				; lift Z by 5mm
      		G90						; absolute positioning
      		G1 X0 Y0 F6000			; go to X=0 Y=0
      		M98 P"0:/sys/MMU Control/moveIdler.g" S5
      
      	elif global.spoolJoin = true
      		if global.loadNext = false
      			M83					; relative extruder moves
      			G10
      			G91					; relative positioning
      			G1 Z5 F600			; lift Z by 5mm
      			G90					; absolute positioning
      			G1 X0 Y0 F6000		; go to X=0 Y=0
      			M98 P"0:/sys/MMU Control/moveIdler.g" S5
      		else
      			M83
      			G10					; retract
      			G91					; relative positioning
      			G1 Z5				; lift
      			G90
      			G1 X310 Y0			; go outside bed
      			G11					; unretract
      
      			if state.currentTool = #tools - 1
      				T0
      			else
      				T{state.currentTool + 1}
      			
      			if global.errQueue[#global.errQueue-1] = null
      				G1 E30 F300		; purge air from the nozzle
      				G10				; retract
      

      During normal operation, or at least for now, commands after line 21 are not used
      Pausing and resuming a print (not a power failure) works without problems, and the skew compensation has its normal value.
      M556 is defined only in config.g, and for testing purposes I comment or uncomment it.
      So I can do a power failure simply by unplugging the charger from its mains socket

      Both cubes in the photo above, had a "power failure", the only difference between them is the skew compensation

      A side note: the ressurect.g contains a resume command, but it behaves like a M24 P0 because it don't run the resume.g

      posted in My Duet controlled machine
      Leonard03undefined
      Leonard03
    • RE: G30 during G28 issue

      @dc42 Thank you for the update
      Sadly, is still the same. 2mm shift in X-
      The left is without M556
      The right with M556
      20250519_173608.jpg

      posted in My Duet controlled machine
      Leonard03undefined
      Leonard03
    • RE: G30 during G28 issue

      As a visual representation; all 3 prints had a "power failure" occurred to them 😄
      c9125daa-c730-472a-bc3d-7b3573f6191a-20250516_191104.jpg

      posted in My Duet controlled machine
      Leonard03undefined
      Leonard03