A Question for GCode experts..

Post Reply
User avatar
mvansomeren
Printmaster!
Posts: 207
Joined: Mon Jan 26, 2015 1:18 pm
Location: Northridge, CA

A Question for GCode experts..

Post by mvansomeren »

Recently I got it into my mind that some of the curling and warping with larger surface area ABS prints can be avoided by gradually cooling the print bed.

The theory is that if you have a large rectangular piece that is a half inch or more in height, that rapid cooling causes the top layers to cool much faster than the bottom layers, causing the top to shrink (contract) at a faster rate than the bottom, causing the curling or warping (right around 40C). I base this on a recent experience where the print was fine until the print was finished. As the bed was cooling down, two sides began to curl upwards. Part of the problem may have been not having enough glue stick. But I also thought, what if I regulate the cool down of the bed gradually so that the top layers aren't allowed to cool dramatically faster than the bottom layers? So this is what I did.

My print bed is at 95C during printing. Once the print was finished I did the following:

Set the temp to 75C
wait 3 min
Set the temp to 70C
wait 3 min
Set the temp to 65C
wait 3 min
Set the temp to 60C
wait 3 min
Set the temp to 55C
wait 3 min
Set the temp to 50C
wait 3 min
set the temp to 40C
wait 3 min
shut off heat bed.

The key is that it must reach the set temp and then start the 3 min timer.

My question to the G Code experts is, can these be written in G code so that I can add it to the end G Code in my slicer software? If so, how would it be written?

Thanks for taking a look.
___________________________________________________
Proud owner and builder of the Rostock MAX V2
Corsair RM750 PSU, Stepper Motor Dampers, Stock Hotend.
User avatar
Jimustanguitar
ULTIMATE 3D JEDI
Posts: 2631
Joined: Sun Mar 31, 2013 1:35 am
Location: Notre Dame area
Contact:

Re: A Question for GCode experts..

Post by Jimustanguitar »

G4 S180 ;(g4 is the command, and s180 is the time in seconds)
That will cause a 3 minute pause between lines.

For the temperature set points, perhaps someone smarter than myself can help. I'd assume that there's a way to do this with relative values instead of absolute so that you could just write "decrease 5, wait, decrease 5, wait..." instead of manually writing in absolute temps that may change depending on the part.



So your parts don't warp while printing, it's when the bed cools after the print is done? Mine print as the print is happening, and the damage is done before the cooldown at the end. Weird.
User avatar
mvansomeren
Printmaster!
Posts: 207
Joined: Mon Jan 26, 2015 1:18 pm
Location: Northridge, CA

Re: A Question for GCode experts..

Post by mvansomeren »

Jimustanguitar wrote:G4 S180 ;(g4 is the command, and s180 is the time in seconds)
That will cause a 3 minute pause between lines.

For the temperature set points, perhaps someone smarter than myself can help. I'd assume that there's a way to do this with relative values instead of absolute so that you could just write "decrease 5, wait, decrease 5, wait..." instead of manually writing in absolute temps that may change depending on the part.



So your parts don't warp while printing, it's when the bed cools after the print is done? Mine print as the print is happening, and the damage is done before the cooldown at the end. Weird.
yes, as I mentioned in the first post, the print was fine all the way through the print. I walked away from it and I heard the "pop" as the print released from the bed - the temp was about 40C, and when I looked at the print, the base, which was about 1/2" thick, was curled up on two sides. I think the appropriate amount of glue stick and making sure it's fresh before every print prevents it from warping during the print.

Last night I did a print that had a rectangular base of 4" X 6" and a 1/2" high, and this time I used the method I described to cool down the bed and it didn't warp or curl at all. I should mention that I am using an aluminum heat defuser disk in between the glass and Onyx that I think helps keep the temperature even accross the entire print bed.
___________________________________________________
Proud owner and builder of the Rostock MAX V2
Corsair RM750 PSU, Stepper Motor Dampers, Stock Hotend.
IMBoring25
Printmaster!
Posts: 616
Joined: Wed Mar 18, 2015 1:11 am

Re: A Question for GCode experts..

Post by IMBoring25 »

I've had the same thought but haven't looked into it yet. According to the RepRap gcode Wiki, setting M190 with an S waits for the temperature to be within tolerance of the setpoint or higher, so it won't implement a wait on cool-down. It does say Marlin allows you to set M190 with an R to wait for the temperature to be within tolerance of the setpoint, whether heating or cooling. I'd have to dig into the Max's firmware to see if there's an analogous option in its stock version of Repetier. If it's not there, it's probably not hard to write.
IMBoring25
Printmaster!
Posts: 616
Joined: Wed Mar 18, 2015 1:11 am

Re: A Question for GCode experts..

Post by IMBoring25 »

Looks like the stock Repetier firmware only has the heating-only behavior.

From Commands.cpp:

Code: Select all

case 190: // M190 - Wait bed for heater to reach target.
#if HAVE_HEATED_BED
            if(Printer::debugDryrun()) break;
            UI_STATUS_UPD(UI_TEXT_HEATING_BED);
            Commands::waitUntilEndOfAllMoves();
#if HAVE_HEATED_BED
            if (com->hasS()) Extruder::setHeatedBedTemperature(com->S,com->hasF() && com->F>0);
#if defined(SKIP_M190_IF_WITHIN) && SKIP_M190_IF_WITHIN>0
            if(abs(heatedBedController.currentTemperatureC-heatedBedController.targetTemperatureC)<SKIP_M190_IF_WITHIN) break;
#endif
            codenum = HAL::timeInMilliseconds();
            while(heatedBedController.currentTemperatureC+0.5<heatedBedController.targetTemperatureC)
If you don't mind losing the heating-only behavior, it seems that changing the last line of the excerpted code to read:

Code: Select all

while(abs(heatedBedController.currentTemperatureC-heatedBedController.targetTemperatureC)>0.5)
and re-flashing with that firmware would give you the behavior you seek using the G-code below. I haven't tried it and as always when trying a fresh firmware for the first time, be ready to kill the power if anything goofy happens, but I don't see why it shouldn't work.

Code: Select all

M190 S75
G4 S180
M190 S70
G4 S180
etc...

One caveat: You'd have to make sure you never use M190 S0 to turn off the bed or you'd hit an infinite loop. M140 S0 would work for that.
User avatar
mvansomeren
Printmaster!
Posts: 207
Joined: Mon Jan 26, 2015 1:18 pm
Location: Northridge, CA

Re: A Question for GCode experts..

Post by mvansomeren »

hmmmm.... I was hoping it wouldn't require a firmware modification. My printer is working perfectly and my fear is that if I change the firmware, it will cause unexpected issues. And with my luck, even if I restore the firmware to it's original format, the issues would remain. you know what I mean..."but I put it back the way it was and it didn't fix it..."

I do thank you for investigating it and coming up with one possible solution, though.
___________________________________________________
Proud owner and builder of the Rostock MAX V2
Corsair RM750 PSU, Stepper Motor Dampers, Stock Hotend.
IMBoring25
Printmaster!
Posts: 616
Joined: Wed Mar 18, 2015 1:11 am

Re: A Question for GCode experts..

Post by IMBoring25 »

Frankly, while it would make a more consistent ramp, you don't necessarily need the firmware change.

It would only make a difference if you use such a short dwell that the bed cools naturally more slowly than the dwell would imply, which defeats the purpose of doing this in the first place.
Mac The Knife
ULTIMATE 3D JEDI
Posts: 1409
Joined: Sun May 11, 2014 6:18 pm

Re: A Question for GCode experts..

Post by Mac The Knife »

mvansomeren wrote:hmmmm.... I was hoping it wouldn't require a firmware modification. My printer is working perfectly and my fear is that if I change the firmware, it will cause unexpected issues. And with my luck, even if I restore the firmware to it's original format, the issues would remain. you know what I mean..."but I put it back the way it was and it didn't fix it..."

I do thank you for investigating it and coming up with one possible solution, though.

I don't have a copy near me, But I thought in S3D you could create multiple temperature settings based on layer height?
R-Max V2
Eris
Folger Tech FT-5 R2
IMBoring25
Printmaster!
Posts: 616
Joined: Wed Mar 18, 2015 1:11 am

Re: A Question for GCode experts..

Post by IMBoring25 »

Layer height is not a player. The code in question would run as end g-code to cause the bed heater to run sporadically as it cools and control the rate of cooling.
Post Reply

Return to “Other”