Page 1 of 1
S3D Starting gcode
Posted: Tue Jan 24, 2017 10:13 am
by dirtsky
I'm new to these forums but, I have been using S3D for about 5 months now. How would I make S3D's starting gcode similar to how Cura starts before printing? I'm pretty sure most have you have used Cura at one point by now before moving to S3D and how Cura starts it will home the axis's and and raise about 15mm and then slowly move to its printing point. Right now I have the starting gcode from Cura in S3D and it will home axis's and will raise up like Cura does at the start of printing but it will lower back to the bed skate across the glass. What I'm asking is how would I make it not do that? Thanks in advance.
Re: S3D Starting gcode
Posted: Thu Jan 26, 2017 7:09 pm
by the_arrest
Hey mate, I posted this yesterday on a similar topic so I'll just cut and paste it here.
If you download a program like Notepad++ you can read/edit the g-code file created by Cura and see the commands that are different from the S3D generated ones. I've used Cura for a while and I love the smooth glide through the XYZ to the start position. I've just got onto S3D finally and that was one of the first things I wanted to address. I got notepad++ and had a squiz. Here's what I found -
(I'm using a Creatbot DH+ that uses RepRap/Marlin)
The Cura line for the initial movement to the start position looks like this in an old gcode file I used to compare:
G0 F4200 X106.181 Y106.825 Z0.200
(with the X/Y obviously being dependent on the position on the bed in Cura)
The S3D movement is written as two separate movements that look like this:
G92 E0
G1 Z0.200 F3000
; layer 1, Z = 0.2
T1
; tool H0.200 W0.400
; skirt
G1 X68.938 Y64.912 F4200
G1 E0.0000 F540
G92 E0
So what you'll need to do is edit the g-code after it's been written by S3D.
Here's what I've done.
I've modded the startup script from the Cura based Creatware that primed the extruder to look like this:
G28 ; home all axes
G92 E0 ; zero the extruded length
G1 Z15.0 F2000 ; move the platform down 15mm
G1 F200 E20 ; extrude 20mm of feed stock
M117 Printing... ; display 'Printing...' on LCD screen
What follows is stock from S3D:
G92 E0
G1 E-6.0000 F1800
G1 Z0.200 F3000
; layer 1, Z = 0.2
T1
; tool H0.200 W0.400
; skirt
G1 X46.480 Y56.414 F4200
G1 E0.0000 F540
G92 E0
Which I edited to look like this:
G92 E0
G1 X46.480 Y56.414 Z0.200 E5 F4200
; layer 1, Z = 0.2
T1
; tool H0.200 W0.400
; skirt
G92 E0
I've combined the two movements and added an extrusion en route to the start of the print.
I got rid of the G1 E-6.0000 F1800 line which was retracting the filament just before starting the print, which meant that the skirt only kicked in on about the third lap (the E value was equal to the retraction amount set in the Extruder tab).
I also nuked the G1 E0.0000 F540 line as is was doing nothing beneficial as far as I could see.
Just open the file, make the changes then save. You'll be gliding into a glorious landing at the start point from then on.
I'm sure there's a bit of tweaking and refinement that can be done in different situations, and I'm definitely an amateur when it comes to g-code (this is actually my first crack at custom script) so there's room to experiment. I'll update you if I stumble across any other settings that'll help.
Hope that gets you started though mate.
Re: S3D Starting gcode
Posted: Tue Jan 31, 2017 10:52 am
by dirtsky
Thank you very much I will give this a shot with Notepad++ as I use it for changing my configuration.h file when making firmware changes.