Notifications
Clear all

Help Getting Start/Stop gCode to work  

  RSS
James Olmstead
(@james-olmstead)
Member
Help Getting Start/Stop gCode to work

Hi All, 

I use to use PrusaSlicer as my main slicer when using my Ender 3pro until I upgraded my printer to using the Sonic Pad. All instructions for it were for using cura and I admit that has been working well for me, however I want to get back to using PrusaSlicer again. Th problem I am having is that I somehow deleted my Start and End gcode settings and cant seem to find where i may have saved the setup i had. I tried copying the start/stop settings i had from cura into it but i get errors so I was hoping that maybe someone could take a look at what i have and help me get my prusa start/stop settings to be similar. 

; Ender 3 Pro w/Sonic Pad and Sprite Extruder Pro
; End G-Code

G91 ;Relative positioning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positioning

G1 X0 Y{machine_depth} ;Present print
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
M140 S0 ;Turn-off bed

M84 X Y E ;Disable all steppers but Z

 

; Ender 3 Pro w/Sonic Pad and Sprite Extruder Pro
; Start G-Code

; Set Movement...
G90; Use absolute positioning.
M83; Use relative extrusion.

; Heat Bed...
M140 S{material_bed_temperature_layer_0}; Start heating bed.

; Home Axis...
G28; Home all axis to know where everything is.

; Bed Mesh - Use one of CALIBRATE or PROFILE LOAD. Uncomment if/as required.
M104 S150; Start pre-heating hotend without oozing filament.
M190 S{material_bed_temperature_layer_0}; Wait for bed temperature when creating new bed mesh.
M109 S150; Wait for hotend pre-heat temperature to create new bed mesh with everything heated.
BED_MESH_CALIBRATE
;BED_MESH_PROFILE LOAD=default

; Ready Nozzle...
G1 Z2.0 F3000; Move Z Axis up to avoid bed.
G1 X2.0 Y20 F5000; Move above purge-line start, so any hotend oozing is out the way.
G1 Z0.28; Drop and wait for temperature.

; Await Bed+Nozzle Temp...
M104 S150; Start pre-heating hotend without oozing filament.
M190 S{material_bed_temperature_layer_0}; Wait for bed temperature before printing.
M109 S{material_print_temperature_layer_0}; Set and wait for hotend to reach temperature.

; Purge Nozzle...
G92 E0; Reset extruder.
G1 X2.0 Y140 Z0.28 F1500 E10; Draw the first line.
G1 X2.3 Y140 Z0.28 F5000; Move to side a little.
G1 X2.3 Y10 Z0.28 F1500 E10; Draw the second line.

M82; Use absolute extrusion.

; Print...

 

This is what i get when i slice.

G-code export to C:\Users\olmst\AppData\Local\Temp\.5328.gcode failed due to invalid custom G-code sections:

end_gcode
Parsing error at line 11: Not a variable name
G1 X0 Y{machine_depth} ;Present print
        ^
start_gcode
Parsing error at line 9: Not a variable name
M140 S{material_bed_temperature_layer_0}; Start heating bed.
       ^
Please inspect the file C:\Users\olmst\AppData\Local\Temp\.5328.gcode.tmp for error messages enclosed between
        !!!!! Failed to process the custom G-code template ...
and
        !!!!! End of an error report for the custom G-code template ...
for all macro processing errors.

 

Thank you for your help. I am looking forward to how to make this work. 

Posted : 09/10/2024 9:39 pm
Sembazuru
(@sembazuru)
Prominent Member
RE:

Cura and PrusaSlicer use differently named placeholders, and you'll need to do the translation from Cura placeholder names to PrusaSlicer placeholder names.

Probably the easiest way to do this is in PrusaSlicer because there is an editing mode that gives you a hierarchical list of all the placeholder names. Apparently you've done the first step of copy/paste the Cura custom g-code into the appropriate places in PrusaSlicer. Each of the text boxes for custom g-code in PrusaSlicer has an edit button. My mouse pointer is next to it in this screenshot:

This will give you a screen with two panes:

The one on the left is the hierarchical list of placeholder names and the one on the right is an editing box for the g-code. Select one and below the list will be the syntax and a description for the selected placeholder. Double-click on the placeholder name and it will be inserted into the g-code where your cursor is.

Be warned: Some placeholders are named with a completely different mindset. For example your Cura Placeholder "machine_depth" I'm guessing is the max Y of the print area, so in PrusaSlicer it would be "print_bed_max[1]". (I think you want a "1" there to mean y, I think x would be "0" (zero). You may have to experiment to be sure.) Also, you may have to choose a static value for some Cura placeholders as there may be some that don't exist in PrusaSlicer.

This post was modified 2 months ago by Sembazuru

See my (limited) designs on:
Printables - https://www.printables.com/@Sembazuru
Thingiverse - https://www.thingiverse.com/Sembazuru/designs

Posted : 21/10/2024 9:38 pm
_KaszpiR_
(@_kaszpir_)
Prominent Member
RE: Help Getting Start/Stop gCode to work

Maybe start from re-running Configuration Wizard and use 3rd party printer, Creality Ender 3 Pro is on the list.

https://help.prusa3d.com/article/configuration-wizard_1754

See my GitHub and printables.com for some 3d stuff that you may like.

Posted : 22/10/2024 7:55 am
Share: