Welcome! Log In Create A New Profile

Advanced

Modify file name display in Marlin 1.1.9

Posted by HAJM 
Modify file name display in Marlin 1.1.9
January 20, 2020 04:12PM
How can I modify Marlin1.1.9 so that when I select a file to print from the LCD screen, the file name is displayed for a short time before the "Bed heating" message appears. At the moment, the chosen file name doesn't appear until the bed and extruder heating is finished. The reason I want to do this is that often when I click the LCD, the knob turns slightly and I select the wrong file name, which isn't immediately apparent.

I have tried looking in the code to find where the click on a file name is detected, so that I can trace to the point where I could display the file name before the "Bed heating" message, but cannot find this, nor can I find where the file name is displayed after the two heating messages are finished.
Re: Modify file name display in Marlin 1.1.9
January 20, 2020 08:50PM
You should be able to do this by putting a delay in your gcode start file

eg put this at the top of your gcode.start (where depends on your slicer)
G4 P60000

delay for a minute, this should leave the filename on screen for a minute
Re: Modify file name display in Marlin 1.1.9
January 21, 2020 06:10AM
I have put this command (modified to G4 P5000) in code.start as the first command, before the command to heat the bed, but it makes no difference; the "Bed heating" message still appears immediately - no 5 seconds delay. I am using Cura 4.2.1 as my slicer and it puts several commands before the code.start commands. Perhaps this is the reason the filename disappears, but anyway the G4 command doesn't work.
Re: Modify file name display in Marlin 1.1.9
January 21, 2020 10:38AM
what do you have in your slicers start code atm
Re: Modify file name display in Marlin 1.1.9
January 21, 2020 12:27PM
To show what I have at the moment, I have attached a file containing the initial lines of the gcode file produced by Cura for one of my prints. It includes the "G4 S5" command at the start of the Cure Start Code section.
Attachments:
open | download - InitialGcode.txt (648 bytes)
Re: Modify file name display in Marlin 1.1.9
January 21, 2020 04:04PM
You need to put the heating placeholders in the machine settings start g code otherwise cura will auto insert them before the start g code during slicing


something like

G4 P50000

M104 S{default_material_print_temperature}

M140 S{default_material_bed_temperature} ;Start heating bed

M190 S{material_bed_temperature_layer_0} ;Wait for bed to reach temp before proceeding

M109 S{material_print_temperature_layer_0} ;Wait for extruder to reach temp before proceeding
Re: Modify file name display in Marlin 1.1.9
January 22, 2020 10:08AM
Thanks. I see what you mean and could do this, but a problem would be that it would only work properly for one material. When Cura inserts the extra commands it uses the temperature settings for the currently selected material, but there is no way to do that in the gcode start text.

One solution would be to alter the ChangeAtZ script in the Cura package to make it insert a G4 S5 command as the first command - I have done this manually on a code file and it works. Unfortunately, I cannot understand the ChangeAtZ script because, although I know several programming languages, Python is not one of them.

Do you or anyone else know how to amend ChangeAtZ to do this? Alternatively, could I use the postprocessing option in the Extensions menu to write a separate script to add the G4 S5 command after the ";Generated with Cura_SteamEngine 4.2.1" line in every code file?

Thanks again for your help so far.
Sorry, only registered users may post in this forum.

Click here to login