User avatar
thingismith
Posts: 26
Joined: Sat Mar 11, 2017 3:18 pm

Heating After Calibration?

Mon May 21, 2018 8:44 pm

I have a G32 AutoCalibrate command in my starting script, but I'd like it to start before my bed and hotend heats up. I use a nylon filament that drips from the nozzle during the calibration, the filament gets on the bed and dries, so if I miss it in my cleanup, it messes with the calibration for my next print.

Aside from moving it around in the gcode, can S3D be set up to heat the hotend and bed after the starting script?

User avatar
dkightley
Posts: 2224
Joined: Tue Mar 10, 2015 4:09 pm

Re: Heating After Calibration?

Tue May 22, 2018 3:12 pm

I think you may find that the bed and extruder are heated by commands IN the starting script.....so all you need to do is to reorder the commands in this script.
Doug Kightley
Volunteer at the National Tramway Museum http://www.tramway.co.uk
Railway modeller and webmaster at http://www.talkingtgauge.net

User avatar
thingismith
Posts: 26
Joined: Sat Mar 11, 2017 3:18 pm

Re: Heating After Calibration?

Tue May 22, 2018 4:40 pm

I think you misunderstood, when I say "Starting Script," I mean the sub-tab under the "Scripts" tab. There are no heat commands in this sub-tab.

As I said, I was hoping for a solution that wouldn't require me to open the G-code .txt file and move my heat commands after my calibration command. When opening a .txt file over 10MB, there is some hang time in opening and editing the file (for me at least), and delay is the enemy of the efficient!

Maybe I should put in a request for a "Pre-Starting Script"?

shocksofmighty
Posts: 88
Joined: Mon Sep 12, 2016 11:36 am

Re: Heating After Calibration?

Tue May 22, 2018 7:55 pm

If you put the heating commands in the starting script it will override the default M104/109 that get included automatically. Just put the commands as you want them in the start script tab and you are good to go.

User avatar
thingismith
Posts: 26
Joined: Sat Mar 11, 2017 3:18 pm

Re: Heating After Calibration?

Tue May 22, 2018 8:34 pm

Were you pulling my leg? I just tried following your advice, adding the heat commands in the "Starting Script" and creating the G-Code... it just wrote the commands in twice. Weird, it didn't repeat the M106 though.

shocksofmighty
Posts: 88
Joined: Mon Sep 12, 2016 11:36 am

Re: Heating After Calibration?

Tue May 22, 2018 10:44 pm

Read up on how the scripting works. It was confusing for me at first as well. You have to use the variables like [extruder0_temperature] in order to override.

User avatar
thingismith
Posts: 26
Joined: Sat Mar 11, 2017 3:18 pm

Re: Heating After Calibration?

Wed May 23, 2018 12:16 am

Thank you shocksofmighty! :mrgreen: I found the post by keyboardwarrior that explains how to do it:

viewtopic.php?f=8&t=1959

The instructions were a bit confusing...I thought maybe he was trying to say I should enter the command and put the temp values in brackets. For any future onlookers, my script looks like this:

[fan_speed_pwm]
[bed0_temperature]
[extruder0_temperature]
G28 ; home all axes
G32 ; Auto Calibrate
M500 ; create config-override
M106 S0 ; fan speed
M140 S90 ; bed temp
M190 S90 ; wait for bed temp
M104 S240 T0 ; nozzle temp
M109 S240 T0 ; wait for nozzle temp

I am slightly disappointed that the Gcode results in these strange 3 lines in place of where the original heat commands would go:

0
[bed0_temperature]
240

My printer gives me a msg error, but at least it still continues to print.

shocksofmighty
Posts: 88
Joined: Mon Sep 12, 2016 11:36 am

Re: Heating After Calibration?

Wed May 23, 2018 7:13 am

That's because it still isn't quite right. Try this:




G28 ; home all axes
G32 ; Auto Calibrate
M500 ; create config-override
M106 S[fan_speed_pwm] ; fan speed
M140 S[bed0_temperature] ; bed temp
M190 S[bed0_temperature] ; wait for bed temp
M104 S[extruder0_temperature] T0 ; nozzle temp
M109 S[extruder0_temperature] T0 ; wait for nozzle temp

User avatar
thingismith
Posts: 26
Joined: Sat Mar 11, 2017 3:18 pm

Re: Heating After Calibration?

Mon May 28, 2018 10:58 pm

Thank you for the clarification, shocks. I had thought that the variable only negated the original input, but it actually negates it and inserts it in the desired position of the command chain.

For a while I was confused because the resulting gcode wasn't correct. Turns out I had my Bed Temp ID on T1 in the temperature settings, but used [bed0_temperature]. Changed it to [bed1_temperature] and now it works perfectly!

Return to “General Discussion and Tips”