Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simplify3D G-Code Scripts
#1
Hello Everyone,

Still a little bit of a noob here but i'm getting my fingers dirty enough. Up and running with Repetier and OctoPi. However before I decided to void my warranty I tried out (and purchased) Simplify 3D I used it for slicing and printing. It worked/works great but there are some nice things about the stock firmware i miss and thats what I'm hoping you might be able to help me emulate again.

First just an FYI for any other noobs out there I had to add
"G28 X0 Y0 Z0;" to my Starting G-Code otherwise my printer would just starting printing from wherever is was last, this home everything before you get started (see picture)
Also I had to change the Temp Settings or it would just try to print at whatever temp it was when i pressed print

Lastly, and what i'm hoping for your help with. I'm trying to copy the behavior of lowering the heated bed to the bottom when the print is complete. The program comes with the following G-Code by default at the end.
"M103 ; turn off extruder and retraction
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
M107 ; turn off fan
M127 ; turn off valve
M84 ; disable motors"

I tried editing it to
"M103 ; turn off extruder and retraction
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
M107 ; turn off fan
M127 ; turn off valve
G90 X0 Y0 Z160; Send Axis home
M84 ; disable motors"

But it doesn't seem to do anything, any ideas?[Image: StartingCode.png][Image: Temp.png]
Reply
#2
well your starting code is little bit light and end code contains several unused codes
also the G90 does not take any argument, the correct command should be G1 X0 Y0 then G1 Z160.0, always better to separate xy to z as they have different acceleration, so Z acceleration will slow down the XY one if put together
please refer to https://github.com/luc-github/Repetier-F...petier.ino
for the list of available GCODE for DAVINCI repetier FW

I think it is in another thread but here my start/end of simplify FYR (sorry it is little bit fancy)
Start:
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
G28 ; Home extruder
G1 Z15.0 ;move the platform down 15mm
G92 E0 ;zero the extruded length
G1 F200 E3 ;extrude 3mm of feed stock
G92 E0 ;zero the extruded length again
M100
G4 P2
;Indiana
M300 S1318 P240
M300 S0 P120
M300 S1396 P120
M300 S1567 P120
M300 S0 P120
M300 S2093 P960
M300 S0 P120
M300 S1174 P240
M300 S0 P120
M300 S1318 P120
M300 S1396 P960
M300 S0 P240
M300 S1567 P240
M300 S0 P120
M300 S880 P120
M300 S987 P120
M300 S0 P120
M300 S2793 P960
M300 S0 P240
M300 S880 P240
M300 S0 P120
M300 S987 P120
M300 S2093 P480
M300 S2349 P480
M300 S2637 P480


End:
G91 ;relative positioning
G1 E-1 F300 ;retract the filament a bit before lifting the nozzle to release some of the pressure
G1 Z+0.5 E-5 X-20 Y-20 F150 ;move Z up a bit and retract filament even more
M100
G28 X0 Y0 ;move X/Y to min endstops so the head is out of the way
M84 ;steppers off
G90 ;absolute positioning
M104 S0 T0 ;extruder heater off
M104 S0 T1 ;extruder heater off
M140 S0 ;heated bed heater off (if you have it)
;FunkyTown
M300 S2093 P240
M300 S2093 P240
M300 S932 P240
M300 S2093 P240
M300 S0 P240
M300 S1567 P240
M300 S0 P240
M300 S1567 P240
M300 S2093 P240
M300 S2793 P240
M300 S2637 P240
M300 S2093 P240
M300 S0 P960


Hope it helps
Reply
#3
Thanks Luc! Not the op but I'm promptly stealing this. Smile. I've been using a rather large block of code I compiled from multiple other threads and I'm pretty sure I had some redundancy and unused codes in there as well.

Haha! Going on an adventure everytime you print.
Reply
#4
Don't know if this is off topic or not, but i have issues with post-process scripting. If i insert one of the available commands there, their are not executed but a line in the comments is added with the things i've written. Example: with the PREPEND command shown in your first attachment, after the generation of g-code, all i get is a line between the comments like
;POSTPROCESSING {PREPEND ";total_filament_length=etc..."}
instead of having a line like
;total_filament_length=etc...
at the end of the comments.
Sorry if i explained it in a weird way but i'm not English native so i hope you'd understand.
Thank you!
Reply
#5
Thanks Luc,

One last issue (for now) have you ever had a hard time getting the printer to preheat using simplify3d in ubuntu/linux. Everything works and if I set temps in Octoprint and let it heat up first i have no issues. It's strange because if i use the exact same settings in windows everything works. I'm thinking about adding some "M6" commands to the starting script :S any ideas?
Reply
#6
should be same linux or windows
what you call " hard time getting the printer to preheat " it is heating and do not wait for printing ? or not heating at all ?
Reply
#7
Here are my scripts that I use in S3D, tried to mimic the pre-heating and nozzle cleaning from OEM. But I took out the purge line because I use skirts now. There are a couple un-needed movements in the start script that I haven't bothered to remove that were related to that purge line... but they don't hurt anything.

Start:
M140 S[bed2_temperature] ; Bed (no wait)
M104 S[extruder0_temperature] ; Extruder (no wait)
M106 S255 ; Start fan
G90 ; set absolute coordinates
M109 S[extruder0_temperature] ; Extruder (wait)
M190 S[bed2_temperature] ; Bed (wait)
M117 Start
M117 Cleaning
M100 ; Cleaning
G1 Z5 F1500
G1 X0 Y15 F1000
G1 X4 Y30 F1000
G92 E0 ; reset extrusion distance
M117 Printing


End:
M104 S0 ; turn off extruder
M140 S0 ; turn off Bed
G90 ; Absolute
G28 X0 Y0 ; home
M117 Down Bed
G1 Z200 ; Lower bed
M117 Cleaning
M100 ;Cleaning
M84 ; Disable motors
M117 Cooling
M190 S50 ; Bed (cooling)
M116 ; Wait for all temperatures
M140 S0 ; turn off Bed
M117 Pickup piece
M84 ; Disable motors
M117 Printer Ready
Reply
#8
Why do you handle temperature in your start script ? S3D handle this normally

and in your end script why do you stop bed then heat bed then stop bed again ?
Reply
#9
I don't like how S3D heats in series... waits for bed before it starts the extruder. This script has them heat up at the same time.

The end script could be cleaned up, the idea was to have it cool to 50C before telling you to remove the model. I found over 50C things don't come off easily.
Reply
#10
to heat bed and extruder in same time just use normal temperature in S3D but do not select wait for stabilize
but put M116 in start code
Here my suggestion in red : no need as double usage or not necessary, in blue suggestion to add :
Start:
[strike]M140 S[bed2_temperature] ; Bed (no wait)[/strike]
[strike]M104 S[extruder0_temperature] ; Extruder (no wait)[/strike]
[strike]M106 S255 ; Start fan[/strike]

G21 ;metric values
M82 ;set extruder to absolute mode
G28 ; Home extruder
M117 Heating...
M116 ; wait all temperatures ready

G90 ; set absolute coordinates
[strike]M109 S[extruder0_temperature] ; Extruder (wait)[/strike]
[strike]M190 S[bed2_temperature] ; Bed (wait)[/strike]

M117 Start
M117 Cleaning
M100 ; Cleaning
G1 Z5 F1500
G1 X0 Y15 F1000
G1 X4 Y30 F1000
G92 E0 ; reset extrusion distance
M117 Printing


End:
M104 S0 ; turn off extruder
[strike]M140 S0 ; turn off Bed[/strike]
G90 ; Absolute
G28 X0 Y0 ; home
M117 Down Bed
G1 Z200 ; Lower bed
M117 Cleaning
M100 ;Cleaning
[strike]M84 ; Disable motors[/strike]
M117 Cooling
M190 S50 ; Bed (cooling and wait for stabilize)
[strike]M116 ; Wait for all temperatures[/strike]
M140 S0 ; turn off Bed
M117 Pickup piece
M84 ; Disable motors
M117 Printer Ready
Reply
#11
The first time I tried S3D w/o "wait to stabilize" it started printing before the bed even homed, and before anything warmed up lol

Thanks for the tips
Reply
#12
Printer attempts to heat but it does not wait to heat when I generate the g-code through Ubuntu, it doesn't matter if i hook up directly to the printer or send the g-code to octoprint. Very strange as everything else is constant, octoprint, settings, even the laptop (just different OS). I picked up a cheap SSD to help windows run faster till I figure out a real fix. I shot simplify an email as well we will see what they say. Not a deal breaker just very strange.
Reply
#13
Ditto lol, it just started printing in the air, you didn't need that setting with the stock firmware(not that I would ever want that crap back)
Reply
#14
yes to forget clicking wait for temperature stabilize is common issue, better to add M116 in start code to be safe ^_^
Reply
#15
Is there a way to incorporate steps per mm in gcode like this?

M92 X63.36 Y63.36 Z2272.72 E590
Reply
#16
for repetier fw it is the case, may be stock fw has same support as based on repetier
Reply
#17
Im on 1.1.j so I can fully use S3D
Reply
#18
dont know if this is off topic but i am having trouble using S3D when i got to print something it says i have no filament in print head for the extruder i am using i am my printer is a 2.0A DUO has anyone had this problem before ?
Reply
#19
yes off topic, sensor is managed by printer, you can disable it in menu settings
I guess you use transparent or semi transparent filament
Reply
#20
cheers its working now thanks mate
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)