Wait for external input in G-code June 24, 2015 06:12AM |
Registered: 10 years ago Posts: 19 |
Re: Wait for external input in G-code June 24, 2015 06:57AM |
Registered: 10 years ago Posts: 665 |
Re: Wait for external input in G-code June 24, 2015 07:33AM |
Registered: 10 years ago Posts: 14,672 |
Quote
ellipse
I would like to insert G-codes in a print file in order to have the printer stop, reclaim human attention sounding a buzzer, and wait until a phisical button is pressed. Right now, I've connected a buzzer to FAN0 output and used M106/M107 for playing it.
Is there a simple way to connect a pushbutton to a free Duet input and have the printer wait for a keypress before continuing?
BTW, I think the abstract scheme (that is, activating an external device at some point in the print and waiting until it's ready to continue) is of general interest, so I'm likely overlooking some existing G-code!
Re: Wait for external input in G-code June 26, 2015 07:56AM |
Registered: 10 years ago Posts: 19 |
Mxxx E0 ;wait as long as extruder endstop input is low
M98 E0 P/gcodes/piece_zero.g ;print this piece if extruder endstop input is low
M98 E1 P/gcodes/piece_one.g ;print this piece if extruder endstop input is high
Re: Wait for external input in G-code June 26, 2015 08:11AM |
Registered: 10 years ago Posts: 2,472 |
Print this [www.thingiverse.com] (I saw it in another post somewhere on this forum), and you could dispense with the operator! At the end of the print, the boxing-glove fires knocking the print off the bed and into a waiting box, then loop back and start again.Quote
ellipse
In my case, the machine is making 100 replicas of the same piece. No screens or pcs on the production line, config.g starts automatically at power on. Operator trainig is limited to check there is enough filament in the roll, turn on the machine, turn it off when it beeps and remove the piece.
I would like to experiment with the switch in order to:
Re: Wait for external input in G-code June 26, 2015 09:10AM |
Registered: 10 years ago Posts: 14,672 |
Quote
ellipse
In my case, the machine is making 100 replicas of the same piece. No screens or pcs on the production line, config.g starts automatically at power on. Operator trainig is limited to check there is enough filament in the roll, turn on the machine, turn it off when it beeps and remove the piece.
I would like to experiment with the switch in order to:
- beep the buzzer and wait the operator before continuing (e.g. placing a nut to be embedded in the print)
e.g.:Mxxx E0 ;wait as long as extruder endstop input is low- select one of two print, eg. adding a conditional parameter to M98 command
e.g.
M98 E0 P/gcodes/piece_zero.g ;print this piece if extruder endstop input is lowM98 E1 P/gcodes/piece_one.g ;print this piece if extruder endstop input is high