Custom gcode filenames, custom printer?
 
Notifications
Clear all

Custom gcode filenames, custom printer?  

  RSS
Chris Hill
(@chris-hill)
Honorable Member
Custom gcode filenames, custom printer?

I've swapped the belts in my CORE One to 1.5mm pitch, and this requires a change of the 'steps per unit' values (gcode M92) to restore the proper scale.  I've added the necessary command to the start gcode for a dedicated printer (user) preset.  I'd like to replace the '_COREONE_' in the gcode output files with something like '_C1_GT1.5_', just so that I know that that particular gcode file already has the necessary M92 command embedded.

However, as far as I can tell the filename format is a 'per print setting' setting - I'd need to replace {printer_model} with my bespoke text for all of the CORE One's print settings.

I think I can define a new printer model in an ini file somewhere, but it's not clear to me exactly what the hierarchy is.  Is there an easy way to create a clone of my default CORE One printer, give it a new name (so that {printer_model} can still be used), and perhaps even add the necessary M92 command to the start gcode automatically, perhaps with the added benefit that it will appear as a system preset, rather than, as currently, a user preset?  Could this new printer inherit all the original CORE One print settings (0.2 STRUCTUAL etc)?

Posted : 05/07/2025 11:19 am
Chris Hill
(@chris-hill)
Honorable Member
Topic starter answered:
RE: Custom gcode filenames, custom printer?

Hmm - I'm not sure this is going to go anywhere.  I found where I think all the ini files are - I'm on a Mac, so they're in a folder inside the app: /Applications/PrusaSlicer.app/Contents/Resources/profiles

And there's a PrusaResearch.ini in there, that details all the Prusa printers.  But I don't yet see a way to make the program 'see'/'load' any of the changes I make.

And even if I could, there are a couple of issues that mean it wouldn't really help to have a new printer type defined:

1) I don't see a way to automatically define the start g-code for that printer.  There's probably a way, given that the Prusa printers all have bespoke start g-code, but I haven't found it yet.

2) If I do succeed in making my own bespoke copy, with GT1.5 in the name, and with the start g-code adapted, my printer is still going to identify itself in Prusa Connect as a conventional CORE One, so I'm guessing it won't show up as a compatible printer when I try to send print jobs.

There are probably ways around all this, but frankly it would be quicker to just adapt the output filenames for every one of the built-in profiles.  Or do nothing, and just keep my brain in gear when selecting a g-code to print!

But if anyone has any tips for the above, I'm still interested.

Posted : 06/07/2025 12:07 pm
Geoff Steele
(@geoff-steele)
Eminent Member
RE:

Hi Chris

You've sparked my curiosity so I've created a customised core1 printer definition that has text gcode output to have a look at this. 

The good(?) news is m92 doesn't appear anywhere in the test output I created, so when you add it there's nothing to cause a conflict, presuming this isn't a hard-coded value in the firmware.

After the thumbnail in the output the next group of gcode settings appear to all be using values defined in the Machine Limits tab, then there's a comment ";TYPE:Custom" and immediately following that is the text stored in the start_gcode string of the printer's .ini file (and editable in the Custom G-code tab, under Start G-code).

I might be completely missing your point, and apologies if I have - but isn't that the place to try adding the m92 ? The printer will identify as a COREONE, but if this works as you hope, have the right changes.

Cheers, Geoff

Posted : 06/07/2025 1:27 pm
Chris Hill
(@chris-hill)
Honorable Member
Topic starter answered:
RE: Custom gcode filenames, custom printer?

 

Posted by: @geoff-steele

Hi Chris

You've sparked my curiosity so I've created a customised core1 printer definition that has text gcode output to have a look at this. 

The good(?) news is m92 doesn't appear anywhere in the test output I created, so when you add it there's nothing to cause a conflict, presuming this isn't a hard-coded value in the firmware.

After the thumbnail in the output the next group of gcode settings appear to all be using values defined in the Machine Limits tab, then there's a comment ";TYPE:Custom" and immediately following that is the text stored in the start_gcode string of the printer's .ini file (and editable in the Custom G-code tab, under Start G-code).

I might be completely missing your point, and apologies if I have - but isn't that the place to try adding the m92 ? The printer will identify as a COREONE, but if this works as you hope, have the right changes.

Cheers, Geoff

Thanks Geoff

Yes, the firmware has the hardcoded M92 values, so there's no need to include an M92 command in the start g-code if you have a standard printer.  With a non-standard printer that uses 1.5mm belt pitch it becomes necessary to send a specific M92 command.  I've included that command in the start g-code and it works perfectly.

The issue I'm trying to tidy up is that I can't tell from the name of the gcode file whether that 1.5mm-specific M92 command is included, or whether it's one that I created before the switch to 1.5mm, so I was hoping just to find an easy way to automatically include something other than the default {printer_name} placeholder in the output file format.  

My choices seem to be:

1) Edit each of the CORE One's print settings to have some bespoke text instead of the {printer_name} placeholder

2) Create a new printer that has a {printer_name} that identifies it as having 1.5mm belt pitch

Option 1 would also require me to use a user-preset with the required M92 in the start g-code

Option 2 seemed like it would allow me to define some bespoke start g-code at the top level, but I haven't discovered if that's possible.

Posted : 06/07/2025 1:40 pm
Geoff Steele
(@geoff-steele)
Eminent Member
RE: Custom gcode filenames, custom printer?

Ideally you'd want to avoid creating a replacement COREONE1.5 definition in PrusaResearch.ini as that will be likely replaced each update 

Maybe ensuring your customised printer outputs text gcode will be enough? As the default unchanged one will default to the smaller binary option.

I'm presuming Mac's file search can sort out the ones you need then?

I'll give it some more brain cycles...

Posted : 06/07/2025 2:00 pm
Share: