<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Subprograms using Marlin ?</title>
        <description> I am trying to make a filled square using Marlin, and it is/was my understanding that it can be implemented using some code similar to this:


G90
G0 X0 Y0
G1 X20 Y0
M98 P101
M98 P101
M98 P101
M98 P101
M98 P101
M98 P101
M98 P101
M98 P101
M98 P101
M98 P101
M30

O101
G91
G1 X0 Y1
G1 X-20 Y0
G1 X0 Y1
G1 X20 Y0
G90
M99

but this does not work. Is this an issue with Marlin? Is there any other easy way do do the same thing?</description>
        <link>https://reprap.org/forum/read.php?146,292105,292105#msg-292105</link>
        <lastBuildDate>Mon, 15 Jun 2026 01:53:39 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?146,292105,870723#msg-870723</guid>
            <title>Re: Subprograms using Marlin ?</title>
            <link>https://reprap.org/forum/read.php?146,292105,870723#msg-870723</link>
            <description><![CDATA[ Marlin has had this functionality for a while. But it isn't always working. In fact, I'm debugging it now…<br />
<br />
Inside your G-code file you simply have a line like this to run another file:<br />
<br />
<pre class="bbcode">
M32 P !/FOLDER/FILE.GCO#
</pre>]]></description>
            <dc:creator>Thinkyhead</dc:creator>
            <category>Firmware - mainstream and related support</category>
            <pubDate>Sun, 12 Apr 2020 14:50:11 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?146,292105,294259#msg-294259</guid>
            <title>Re: Subprograms using Marlin ?</title>
            <link>https://reprap.org/forum/read.php?146,292105,294259#msg-294259</link>
            <description><![CDATA[ in repetier host under g-code menu there are several sets of command sections  for start gcode, ending gcode, layer change for example to add special code into. if this is at the beginning of print then start gcode would be a place to look at.]]></description>
            <dc:creator>jamesdanielv</dc:creator>
            <category>Firmware - mainstream and related support</category>
            <pubDate>Mon, 13 Jan 2014 22:27:52 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?146,292105,293046#msg-293046</guid>
            <title>Re: Subprograms using Marlin ?</title>
            <link>https://reprap.org/forum/read.php?146,292105,293046#msg-293046</link>
            <description><![CDATA[ bobc, thank you for the reply.<br />
<br />
I use the Repetier Host, so it would be more adequate to say that subprogram treatment should be a functionality of either this program or of a (possibly written in Python) pre-processor? I guess that I will search for these solutions then!<br />
<br />
Regards]]></description>
            <dc:creator>bowzee</dc:creator>
            <category>Firmware - mainstream and related support</category>
            <pubDate>Sat, 11 Jan 2014 11:42:59 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?146,292105,292977#msg-292977</guid>
            <title>Re: Subprograms using Marlin ?</title>
            <link>https://reprap.org/forum/read.php?146,292105,292977#msg-292977</link>
            <description><![CDATA[ I don't know of any printer firmwares that implement subprograms like that. One problem is that reprap printers parse gcode line by line, so you would need to store the whole file on SD card to be able to do it. RepRapPro have implemented similar functionality using the same commands but they have done it in a non-standard way.<br />
<br />
In general the Gcode used by 3d printers is a quite limited subset of the complete GCode spec.<br />
<br />
One way to use such Gcode with existing printer firmwares is to do a macro expansion on the host side, before sending to the printer, with a bit of Python for example.]]></description>
            <dc:creator>bobc</dc:creator>
            <category>Firmware - mainstream and related support</category>
            <pubDate>Sat, 11 Jan 2014 09:35:15 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?146,292105,292105#msg-292105</guid>
            <title>Subprograms using Marlin ?</title>
            <link>https://reprap.org/forum/read.php?146,292105,292105#msg-292105</link>
            <description><![CDATA[ I am trying to make a filled square using Marlin, and it is/was my understanding that it can be implemented using some code similar to this:<br />
<br />
<pre class="bbcode">
<b>G90
G0 X0 Y0
G1 X20 Y0
M98 P101
M98 P101
M98 P101
M98 P101
M98 P101
M98 P101
M98 P101
M98 P101
M98 P101
M98 P101
M30

O101
G91
G1 X0 Y1
G1 X-20 Y0
G1 X0 Y1
G1 X20 Y0
G90
M99</b></pre>
<br />
but this does not work. Is this an issue with Marlin? Is there any other easy way do do the same thing?]]></description>
            <dc:creator>bowzee</dc:creator>
            <category>Firmware - mainstream and related support</category>
            <pubDate>Thu, 09 Jan 2014 18:13:27 -0500</pubDate>
        </item>
    </channel>
</rss>
