Interupt executing gcode and wait for a user click

Basic Information:

Printer: BQ Witbox (nothing original)
MCU: Arduino Mega 2560 + RAMPS 1.4

Hello folks,
Is it possible to interrupt the further execution of the gCode until the user presses the rotary encoder?
Analog M0 (Marlin). Useful for changing filament or somthing.

I don’t know about the encoder button, but if you have PAUSE & RESUME macros, then just adding the word Pause in your Gcode file will execute the pause macro, and then via the web interface, you trigger the resume macro.

PAUSE & RESUME: Yes, I know that. It’s simply more convenient to click on the encoder or on another connected switch. You don’t have to go back and forth.

Thank you

You could easily configure a button to fire a custom gcode macro that would toggle between PAUSE and RESUME based on the current state of the machine.

yes, but is then always active. Ideal would be within a certain macro. (Filament Change for example)
THX

You could save/evaluate a state with a global variable and only fire the button when it is the right time/macro

Macros can’t be interrupted like that. You’d have to split that macro into two with the first half running until the PAUSE, then the second half to continue after the RESUME.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.