Welcome! Log In Create A New Profile

Advanced

Modify Marlin 1.1.x for endless loop

Posted by nerginer 
Modify Marlin 1.1.x for endless loop
July 16, 2020 04:05AM
Hi,

I want to modify marlin 1.1.x firmware in order to make it run the gcode inside the sd card forever (until e-stop triggered)
Any ideas are welcome.

Regards,
Nuri
Re: Modify Marlin 1.1.x for endless loop
July 16, 2020 08:55AM
I don't know if this works but try putting the following at the end of your gcode file
M400 ; make sure all moves have finished so nothing is queued
M23 filename.gco   ; same gcode file these lines are in.
M24

Edited 1 time(s). Last edit at 07/16/2020 08:56AM by Dust.
Re: Modify Marlin 1.1.x for endless loop
July 16, 2020 01:10PM
We are very close

M23 loads the file but M24 did not start it
In the LCD it requieres resume print.

How can we solve it. Firmware mod is also possible for me

Regards
Nuri
Re: Modify Marlin 1.1.x for endless loop
July 16, 2020 06:13PM
Copy-pasting the GCODE into the file for about a thousand times isn't a solution I guess?


http://www.marinusdebeer.nl/
Re: Modify Marlin 1.1.x for endless loop
July 17, 2020 02:41AM
>Copy-pasting the GCODE into the file for about a thousand times isn't a solution I guess?
No smiling smiley

Can I add a M command that can rewind the program in the SD card and run it?

functions I may use

card.startFileprint();
card.openAndPrintFile(card.filename);

Any idea about how to implement this?
Re: Modify Marlin 1.1.x for endless loop
July 17, 2020 12:28PM
I know I'm off base by mentioning this but Teacup has a Canned Cycle built into it where G-code commands will be executed over and over until the reset button is pushed or the power is killed. It's used for exhibitions
VDX
Re: Modify Marlin 1.1.x for endless loop
July 17, 2020 02:17PM
... I've modified Pronterface to check for an "automode" flag and, if found, restart the load+run session anew ... but this was for running from the PC, not the SD card ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Modify Marlin 1.1.x for endless loop
July 18, 2020 01:22AM
I have find the solution with @Dust's idea

First I upgraded my firmware to Marlin 1.1.9

I added at the end of my code file (filename.gco)

M32 filename.gco

Thank you everybody specially Dust

Regards
Nuri
Re: Modify Marlin 1.1.x for endless loop
July 18, 2020 03:59AM
Quote
nerginer
I have find the solution with @Dust's idea

First I upgraded my firmware to Marlin 1.1.9

I added at the end of my code file (filename.gco)

M32 filename.gco

Thank you everybody specially Dust

Regards
Nuri

Ah! M32..

[marlinfw.org]

Easy to find indeed.

"The M32 command exists to allow G-code to load other G-code files and run them as sub-programs. This can be useful to change the start / end gcode for a batch of files without having to edit them all."

And very useful in certain situations... Hmmm. Never knew this. It might come in handy with the pen plotter I'm building.

Edited 1 time(s). Last edit at 07/18/2020 04:00AM by Ohmarinus.


http://www.marinusdebeer.nl/
Sorry, only registered users may post in this forum.

Click here to login