Welcome! Log In Create A New Profile

Advanced

Whats the right way to setup start/end gcode (temps and stuff)

Posted by 6of1 
Whats the right way to setup start/end gcode (temps and stuff)
October 19, 2012 08:53PM
I am trying to setup Repetier and Slic3r but I am getting confused.

In Slic3r I have this for my start and end gcode:

START:
G28 ; Home all axes
M140 S115 ; Set bed temp, no wait.
M104 S225 ; Set nozzle temp, no wait.
M116 ; Wait until target temperatures for extruder and heated bed are reached
G92 E0 ; Reset extruder
G1 E3 F1200 ; Prime extruder 3mm
G1 E2 F1200 ; Retract extruder 1mm
G92 E0 ; Reset extruder

END:
G28 X0 ; Home x axis
M84 ; Disable motors
M104 S0 ; Make sure the extruder is turned off.
M140 S0 ; Make sure the bed is turned off.
M107 ; Fan off


When I run Slic3r from Repetier Host, then look at the Gcode in Repetiers editor I have nothing in the Start or End filters and the gcode itself doesnt look right. here is what I get:

M190 S115 ; wait for bed temperature to be reached
M104 S225 ; set temperature
G28 ; Home all axes
M140 S115 ; Set bed temp, no wait.
M104 S225 ; Set nozzle temp, no wait.
M116 ; Wait until target temperatures for extruder and heated bed are reached
G92 E0 ; Reset extruder
G1 E3 F1200 ; Prime extruder 3mm
G1 E2 F1200 ; Retract extruder 1mm
G92 E0 ; Reset extruder
M109 S225 ; wait for temperature to be reached
G90 ; use absolute coordinates
G21 ; set units to millimeters
G92 E0
M82 ; use absolute distances for extrusion
G1 F1800.000 E-1.00000
G92 E0
G1 Z0.300 F5400.000
G1 X80.500 Y65.950
G1 F1800.000 E1.00000
G1 X81.090 Y65.350 F720.000 E1.01604
G1 X81.520 Y64.990 E1.02673
G1 X82.220 Y64.530 E1.04269
BLA BLA BLA....
G1 X84.873 Y90.914 E2.28070
G1 X84.879 Y71.459 E2.65148
G1 F1800.000 E1.65148
G92 E0
G28 X0 ; Home x axis
M84 ; Disable motors
M104 S0 ; Make sure the extruder is turned off.
M140 S0 ; Make sure the bed is turned off.
M107 ; Fan off
; filament used = 57.7mm (0.3cm3)


Im guessing my issue here is "too many cooks in the kitchen". We have Slic3r & Repetier trying to set temps (slic3r setting 2, first layer and print). then me adding start temps and commands is just adding to the mess. Is there a uniform way of doing this? can temps be removed from something and all still work?
Re: Whats the right way to setup start/end gcode (temps and stuff)
October 20, 2012 06:25AM
It is quite simple. Repetier-Host has Start gcode/End gcode. These are independent of any slicers. So if you use different slicers and want the same start code, put your code there and remove the start/end code in your slicers.

The host does not see if a slicer has it's own start/end code. The complete slicer result including start/end code from slicer goes directly to gcode in the editor.

So it is up to you, where you want your codes. The host always send host startcode, gcode from slicer, host endcode, and then activated printer actions on end of job. If you kill a job or pause a job the matching codes in host are send after stopping the job.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: Whats the right way to setup start/end gcode (temps and stuff)
October 21, 2012 11:53AM
Well I did get it working.. sorta..

-In Repetier FW M116 isnt supported.
So I have to use M190 (set Bed & wait) then M109 (set Extr & wait), which takes longer then setting both and then telling the machine to wait for both (M116), but whatever.

-Another thing that is wrong is I think I found a bug in slic3r 0.9.3 or its just setup this way.
In order for me to keep my different temps attached to the flavor of filament I'm using I wanted slic3r to handle the start & end code (along with first layer temps). I needed slic3r to Home my XYZ before setting temps (I use the heat bed as a cap for the extr so it doesn't ooze and i can walk away). What I did was I set in slic3r "first layer bed temp" & "first layer extr temp" to 0. Then I set my normal after first layer temps. I let the start code set my first layer temps expecting slic3r to do a M104 & M140 after the first layer is placed. For some reason slic3r only changed the extr temp M104 after the first layer & nowhere in the gcode did it change my bed temps (except turning it off at the end). I also removed all temp settings from Repetier host so I know my Gcode is mostly controlling it.

-Also I am getting serious drift on my X axis.
I have turned down the print speed using the slider to see if it was a inertia issue (which I have never had on my X axis) and it seems like the machine pauses, then prints wrong, then pauses, then prints wrong some more. I am going to try and upload a video showing it. Where is the setting for the endstops during normal print? I want to try turning them off.

Printrboard Rev C
Repetier-host & FW
Re: Whats the right way to setup start/end gcode (temps and stuff)
October 21, 2012 02:06PM
6of1 Wrote:
-------------------------------------------------------
> Well I did get it working.. sorta..
>
> -In Repetier FW M116 isnt supported.
> So I have to use M190 (set Bed & wait) then M109
> (set Extr & wait), which takes longer then setting
> both and then telling the machine to wait for both
> (M116), but whatever.
Try M104 S and then do the M190 /M109 that way the extruder already heats during bed heat and you get the same effect.

>
> -Another thing that is wrong is I think I found a
> bug in slic3r 0.9.3 or its just setup this way.
> In order for me to keep my different temps
> attached to the flavor of filament I'm using I
> wanted slic3r to handle the start & end code
> (along with first layer temps). I needed slic3r to
> Home my XYZ before setting temps (I use the heat
> bed as a cap for the extr so it doesn't ooze and i
> can walk away). What I did was I set in slic3r
> "first layer bed temp" & "first layer extr temp"
> to 0. Then I set my normal after first layer
> temps. I let the start code set my first layer
> temps expecting slic3r to do a M104 & M140 after
> the first layer is placed. For some reason slic3r
> only changed the extr temp M104 after the first
> layer & nowhere in the gcode did it change my bed
> temps (except turning it off at the end). I also
> removed all temp settings from Repetier host so I
> know my Gcode is mostly controlling it.

Never experimented with changing temperatures, but they come from Slic3r so you have to ask Alexej for this one.

>
> -Also I am getting serious drift on my X axis.
> I have turned down the print speed using the
> slider to see if it was a inertia issue (which I
> have never had on my X axis) and it seems like the
> machine pauses, then prints wrong, then pauses,
> then prints wrong some more. I am going to try and
> upload a video showing it. Where is the setting
> for the endstops during normal print? I want to
> try turning them off.
>
#define ALWAYS_CHECK_ENDSTOPS false

Make the firmware ignoring endstors during print, if it comes from that. If it is from the endstop you have skew in one direction only.
I had a similar problem last week and it turned out the belt was half dead. At one position the belt wanted to climb on the pulley and not into the grooves, which blocked my y axis sometimes.

> Printrboard Rev C
> Repetier-host & FW


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: Whats the right way to setup start/end gcode (temps and stuff)
October 21, 2012 06:18PM
thanks for the suggestions, I'll give them a try tonight. The "normal layer"/"anything after the first" temp issues are definitely slic3r related but not to big of a deal. getting the start gcode is the most important, I want to get it to the point where its like printing a piece of paper "hit print, walk away".

Yes, it is only skewing in one direction and pausing before it does it. end-stop was exactly what I was thinking, I guess we will see. Kinda aggravating, I have replaced this end-stop 2 times and different brands both times. it never caused any problems in marlin but I might have had the "#define ALWAYS_CHECK_ENDSTOPS false" in that since the beginning. (if marlin even has that setting)
Re: Whats the right way to setup start/end gcode (temps and stuff)
October 21, 2012 08:08PM
Well just an update... and a thank you! repetier

My new start code is:
G28 ; Home all axes
M104 S224 ; Set nozzle temp, no wait. -gets things heated up at same time
M190 S114 ; Set bed temp, wait.
M109 S224 ; Set nozzle temp, wait.
G92 E0 ; Reset extruder
G1 E3 F1200 ; Prime extruder 3mm
G1 E2 F1200 ; Retract extruder 1mm
G92 E0 ; Reset extruder

and it worked great.. never even thought to add M104 so it starts heating.

I made it through a whole test print and I had no skew of the print so "#define ALWAYS_CHECK_ENDSTOPS false" worked from what I can tell..

My motors seem a little louder then they were with marlin fw, the Z is allot louder. any suggestions there?

Edited 1 time(s). Last edit at 10/21/2012 08:09PM by 6of1.
Re: Whats the right way to setup start/end gcode (temps and stuff)
October 22, 2012 03:15AM
Ok, so your endstops suffer crosstalk.

Concerning your stepper sounds. Both firmwares do the same step pin high, step pin low. The only possible difference is the time between high and low. You can change this timing with:;

/** If your stepper needs a longer high signal then given, you can add a delay here.
The delay is realized as a simple loop wasting time, which is not available for other
computations. So make it as low as possible. For the most common drivers no delay is needed, as the
included delay is already enough.
*/
#define STEPPER_HIGH_DELAY 0

When the motors stop, the sound is determined by the position and current flowing. Full step positions have the least sound. The only other value changing the sound is acceleration/speed which could be different.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: Whats the right way to setup start/end gcode (temps and stuff)
October 25, 2012 09:19PM
just out of curiosity, why would I get the end-stop cross talk now?

I was running Pontrface / Lincomatic Marlin on my Printrboard for months and never once did I have this issue. Does marlin have a "ALWAYS_CHECK_ENDSTOPS" setting I don't know about?

I still get the false trigger when a print is finished and the machine homes X & Y. Sometimes (most times) my X stops before it gets to the end-stop.

I guess I should try and re-route my wires.
Sorry, only registered users may post in this forum.

Click here to login