Got the Time? (Clock)

Show off your prints!!!
mattrsch
Posts: 4
Joined: Wed Jan 14, 2015 12:54 am

Re: Got the Time? (Clock)

Post by mattrsch » Mon Mar 16, 2015 7:25 pm

Wouldn't you want to pause after you drop the bed and retract?

Code: Select all

G91 ; set relative positioning
G0 Z20 ; raise Z (drop bed)
G1 E-10 ; retract
G90 ; set absolute positioning
M84 S0 ; disable idle timeout
M0 ; pause

User avatar
sthone
Posts: 897
Joined: Tue Jul 08, 2014 8:25 pm
Location: Connecticut
Contact:

Re: Got the Time? (Clock)

Post by sthone » Mon Mar 16, 2015 7:29 pm

No, because you want the print head to stop first so it goes back to the same exact spot it stopped at. If it's still moving while the bed is dropping you might get a gap when it starts back up.

-Steve
____________________________________________________
See my projects at https://www.theneverendingprojectslist.com

jsc
Posts: 1864
Joined: Thu Apr 10, 2014 4:00 am

Re: Got the Time? (Clock)

Post by jsc » Mon Mar 16, 2015 7:32 pm

Oh, whoops. Matt, you are correct, good catch. Steve, the gcode is in absolute coordinates, so it doesn't matter where the nozzle ends up.

However, if the host is tracking all the extrusions during a pause, which I suspect it must be doing, you may want to undo the retraction after the pause, not sure. I haven't played with this stuff for a while.

User avatar
sthone
Posts: 897
Joined: Tue Jul 08, 2014 8:25 pm
Location: Connecticut
Contact:

Re: Got the Time? (Clock)

Post by sthone » Mon Mar 16, 2015 9:26 pm

Ah, makes sense I'm still thinking as if I'm clicking the actual buttons were as that way your stopping in between code lines anyway.

You learn something new everyday,

-Steve
____________________________________________________
See my projects at https://www.theneverendingprojectslist.com

User avatar
sthone
Posts: 897
Joined: Tue Jul 08, 2014 8:25 pm
Location: Connecticut
Contact:

Re: Got the Time? (Clock)

Post by sthone » Sat Mar 28, 2015 1:47 am

Ok I need some g-code wizards here.... I tried this code....

Code: Select all

G91 ; set relative positioning
G0 Z20 ; raise Z (drop bed)
G90 ; set absolute positioning
M84 S0 ; disable idle timeout
M0 ; pause
...and it dropped the bed at the right layer but it never paused, it just lowered then raised back up and kept on printing.

How do I get it to stop until I hit print/resume?

-Steve
____________________________________________________
See my projects at https://www.theneverendingprojectslist.com

jsc
Posts: 1864
Joined: Thu Apr 10, 2014 4:00 am

Re: Got the Time? (Clock)

Post by jsc » Sat Mar 28, 2015 5:35 am

Are you printing through Simplify3D or OctoPrint? (which one?)

User avatar
sthone
Posts: 897
Joined: Tue Jul 08, 2014 8:25 pm
Location: Connecticut
Contact:

Re: Got the Time? (Clock)

Post by sthone » Sat Mar 28, 2015 12:11 pm

I first tried octoprint and it didn't stop either but I wasn't watching closely so I don't know if it dropped either. The second time was with S3D running the g code from the library if that matters.
____________________________________________________
See my projects at https://www.theneverendingprojectslist.com

User avatar
ednisley
Posts: 1188
Joined: Fri Apr 11, 2014 5:34 pm
Location: Halfway up the Hudson
Contact:

Re: Got the Time? (Clock)

Post by ednisley » Sat Mar 28, 2015 1:02 pm

sthone wrote:but it never paused
Marlin doesn't implement M0 in the V1.0.0 code used in Makergear's versions, so it's effectively a no-op.

V1.0.2 does implement it, but with a caveat:

Code: Select all

// M0   - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)
// M1   - Same as M0
Looks like you can't get there from here...

User avatar
sthone
Posts: 897
Joined: Tue Jul 08, 2014 8:25 pm
Location: Connecticut
Contact:

Re: Got the Time? (Clock)

Post by sthone » Sat Mar 28, 2015 2:12 pm

I think I got it ....

Code: Select all

M25: Pause SD print 
... seemed to do the trick. At least using octoprint I can't test it with S3D for another few hours.

I'm going to run a few more test then I'll do a quick how to post for any other newbies out there.

-Steve
____________________________________________________
See my projects at https://www.theneverendingprojectslist.com

jsc
Posts: 1864
Joined: Thu Apr 10, 2014 4:00 am

Re: Got the Time? (Clock)

Post by jsc » Sat Mar 28, 2015 5:22 pm

Okay, there's your problem. You're doing an SD print, sorry I should have mentioned that.

M0 is not a normal gcode to be sent to Marlin. Certain hosts trap it and simply pause the print. You need to be printing directly from OctoPrint or S3D for M0 to work. Different hosts use different syntax. Repetier uses @pause, for example. I don't know what Printrun uses.

Post Reply