Feed Filament until hitting okay/ display button



  • Hey guys,

    this is an example of a filament load macro:
    M291 P"Please wait while the nozzle is being heated up" R"Loading PETG Grey" S3 T20 ; Display message

    
    G10 S220 R200                ; Set current tool temperature to 235C, standby temp to 200C
    M291 P"Please put the Filament in the Extruder" R"Loading PETG Grey" S3     ; Display message and wait for resoponse
    M302 P1
    G1 E50 F500 ;(1)
    M302 P0
    M291  P"Please wait while the nozzle is being heated up" R"Loading PETG Grey" T20
    M116                    ; Wait for the temperatures to be reached
    M291 P"Feeding filament..." R"Loading PETG Grey" S3 T5               ; Display new message
    G1 E10 F600         ; Feed 10mm of filament at 600mm/min
    G1 E750 F2000         ; Feed 470mm of filament at 3000mm/min
    G1 E90 F300      ; (2) Feed 20mm of filament at 300mm/min
    G4 P1000 ; Wait one second
    G1 E-2 F1800 ; Retract 10mm of filament at 1800mm/min
    M400 ; Wait for moves to complete
    M291  P"Loading done" R"Loading PETG Grey" T20
    
    M292 ; Hide the message
    
    
    G10 P0 R180 S220  ; Set active and stand-by temperature
    
    

    How is it possible to change it the way that in (1) and (2) filament is feed until I hit an "okay"-Button in a pop-up message (no physical button)



  • Not sure if you can do that, not even sure if you can bring up a message with the jog buttons for the extruder but try

    M291 R"Jog extruder" E1



  • @taconite I'm 99% sure that you can't interrupt a move other than maybe doing an emergency stop. Something like this has come up on a few previous occasions and I think the only thing you can do is replace one long move with a number of smaller, segmented ones.



  • I'm 100% sure I agree 😁 ☝

    Also the normal dialouges won't offer an estop, i also believe it blocks the normal stop button on the paneldue and dwc so I didn't tink more of it.

    The only alternative thought i had was to use daemon.g to check a condition and keep extruding until the condition is cleared - but I haven't tested what sort of intervals that would run at and how (un)responsive or jittery it would be (edit: and it would require RRF3)



  • Thank you for your replies @deckingman @bearer . Makes kind of sense and I thought about using Conditional G-Code in RRF3 like (attention pseudo-code):
    while (!"message button pushed")
    G1 E10 F500

    But I have absolutely no idea if there is a "feature" like that
    EDIT: btw that is what you guys proposed - the only question is if the "button" can be emulated as variable for the while loop



  • @taconite said in Feed Filament until hitting okay/ display button:

    the only question is if the "button" can be emulated as variable for the while loop

    as you required to not use a physical button I think the only option is to have the loop in the daemon.g file and present the button in your macro/config/part g-code.

    And I do believe as of RRF3.2 it should support sharing the loop condition as a variable.

    edit: more pseudo code

    in daemon.g (maybe if instead of while if there are other tasks that also need to run?)

    while start-condition
       G1 E10 F500
    

    and in your macro

    start-condition = true
    M291 R"Press OK to stop extruding" S2
    start-condition = false
    

    edit: but as I said, I'm not sure this will work well due to how often (or not often) daemon.g runs



  • @bearer nice approach and i guess it will work when variables are introduced



  • (you could try experimenting with it now by looking here for inspiration https://forum.duet3d.com/topic/14376/global-variables-between-macros)



  • @bearer thank you for pointing me in the right direction - i got it to work 🙂
    btw I am really looking forward to the use of variables - than we can use more potential of the board


Log in to reply