<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Problem using send.py [SOLVED]</title>
        <description> I use skeinforge to slice and want to avoid having to open up the reprap host in order to send gcode to my printer so I wrote a simple batch file wrapper for send.py:
send.bat:
echo %1
C:\Python27\python.exe &quot;C:\Documents and Settings\Greg\Desktop\reprap\skeinforge\fabmetheus_utilities\miscellaneous\fabricate\send.py&quot; -v -p COM3 %1 
pause
I then associated .gcode with the send.bat script so that all I have to do is double click the gcode and it sends it to the printer.
The problem is, when it gets to a gcode that the 5d firmwaare doesn&#039;t understand e.g. M103 it just sits there waiting to get an ok from the printer, but that never comes and it stops at that point.
I tried using replace.csv to replace M103 and M101 codes with a comment &quot;;&quot;, but send.py still seems to wait after sending the comment. It gets this far and then stops:


C:\Documents and Settings\Greg\Desktop\reprap\models&amp;gt;echo &quot;C:\Documents and Sett
ings\Greg\Desktop\reprap\models\disc_export.gcode&quot;
&quot;C:\Documents and Settings\Greg\Desktop\reprap\models\disc_export.gcode&quot;

C:\Documents and Settings\Greg\Desktop\reprap\models&amp;gt;C:\Python27\python.exe &quot;C:\
Documents and Settings\Greg\Desktop\reprap\skeinforge\fabmetheus_utilities\misce
llaneous\fabricate\send.py&quot; -v -p COM3 &quot;C:\Documents and Settings\Greg\Desktop\r
eprap\models\disc_export.gcode&quot;
You have requested that verbosity be set to True
All communication with the arduino will be printed
Arduino port set to COM3
Opening serial port: COM3
Serial Open?: True
Baud Rate: 19200
Resetting arduino...
&amp;lt; start
&amp;gt; G21
&amp;lt; ok
&amp;gt; G90
&amp;lt; ok
&amp;gt; T0
&amp;lt; ok
&amp;gt; M104 S205
&amp;lt; ok
&amp;gt; G92 E0
&amp;lt; ok
&amp;gt; G1 Z8.0 F50
&amp;lt; ok
&amp;gt; G28 Y0
&amp;lt; ok
&amp;gt; G28 X0
&amp;lt; ok
&amp;gt; G1 X122.0 F3000
&amp;lt; ok
&amp;gt; G28 Z0
&amp;lt; ok
&amp;gt; G92 Z0
&amp;lt; ok
&amp;gt; G1 Z8.0 F50
&amp;lt; ok
&amp;gt; M109 S205
&amp;lt; ok
&amp;gt; M113 S0.75
&amp;lt; ok
&amp;gt; G92 E0
&amp;lt; ok
&amp;gt; G90
&amp;lt; ok
&amp;gt; G21
&amp;lt; ok
&amp;gt; ;

I next tried to just manually remove the &quot;;&quot;
This is the output I get when running the program:
C:\Documents and Settings\Greg\Desktop\reprap\models&amp;gt;echo &quot;C:\Documents and Sett
ings\Greg\Desktop\reprap\models\disc_export.gcode&quot;
&quot;C:\Documents and Settings\Greg\Desktop\reprap\models\disc_export.gcode&quot;

C:\Documents and Settings\Greg\Desktop\reprap\models&amp;gt;C:\Python27\python.exe &quot;C:\
Documents and Settings\Greg\Desktop\reprap\skeinforge\fabmetheus_utilities\misce
llaneous\fabricate\send.py&quot; -v -p COM3 &quot;C:\Documents and Settings\Greg\Desktop\r
eprap\models\disc_export.gcode&quot;
You have requested that verbosity be set to True
All communication with the arduino will be printed
Arduino port set to COM3
Opening serial port: COM3
Serial Open?: True
Baud Rate: 19200
Resetting arduino...
&amp;lt; start
&amp;gt; G21
&amp;lt; ok
&amp;gt; G90
&amp;lt; ok
&amp;gt; T0
&amp;lt; ok
&amp;gt; M104 S205
&amp;lt; ok
&amp;gt; G92 E0
&amp;lt; ok
&amp;gt; G1 Z8.0 F50
&amp;lt; ok
&amp;gt; G28 Y0
&amp;lt; ok
&amp;gt; G28 X0
&amp;lt; ok
&amp;gt; G1 X122.0 F3000
&amp;lt; ok
&amp;gt; G28 Z0
&amp;lt; ok
&amp;gt; G92 Z0
&amp;lt; ok
&amp;gt; G1 Z8.0 F50
&amp;lt; ok
&amp;gt; M109 S205
&amp;lt; ok
&amp;gt; M113 S0.75
&amp;lt; ok
&amp;gt; G92 E0
&amp;lt; ok
&amp;gt; G90
&amp;lt; ok
&amp;gt; G21
&amp;lt; ok
&amp;gt; M105
&amp;lt; ok T:193 B:193
&amp;gt; M113 S1.0
&amp;lt; ok
&amp;gt; M108 S26.0
&amp;lt; ok
&amp;gt; M104 S195.0
&amp;lt; ok
&amp;gt; M108 S15.6
&amp;lt; ok
&amp;gt; G1 X87.14 Y47.15 Z0.2 F575.999
&amp;lt; ok
&amp;gt; G1 F11400.0
&amp;lt; ok
&amp;gt; G1 E12.0
&amp;lt; ok
&amp;gt; G1 F575.999
&amp;lt; ok
&amp;gt; G92 E0
&amp;lt; ok
&amp;gt; G1 X87.14 Y62.85 Z0.2 F575.999 E25.529
&amp;lt; ok
&amp;gt; G1 X102.86 Y62.85 Z0.2 F575.999 E51.058
And when it gets to the end, it just stops.
The full gcode I am trying to send is here: [pastebin.com]
It is just a simple disc on a single layer with an outline created using Lenbok&#039;s outline plugin.
Sending the same gcode using the reprap host works fine.

Am I doing something wrong with my use of send.py? Is anyone able to successfully print using send.py? Anything else you can think of that I can try?</description>
        <link>https://reprap.org/forum/read.php?1,68990,68990#msg-68990</link>
        <lastBuildDate>Sat, 06 Jun 2026 19:45:55 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?1,68990,69103#msg-69103</guid>
            <title>Re: Problem using send.py [SOLVED]</title>
            <link>https://reprap.org/forum/read.php?1,68990,69103#msg-69103</link>
            <description><![CDATA[ fdavies and jamesdanielv: Awesome thanks.<br />
<br />
I now have this in my replace.csv:<pre class="bbcode">M101	M105;
M103	M105;
M108	M105;</pre>
<br />
and I modified RepRapArduinoSerialSender.py as follows:<br />
<br />
<pre class="bbcode">		block=block.replace(' ','')
		block=block.replace("\t",'')</pre>
becomes:<br />
<pre class="bbcode">		block=block.replace("\t",' ')</pre>
<br />
This works great. It is fantastic not having to go through 20 mouse clicks to start a print.]]></description>
            <dc:creator>Greg Frost</dc:creator>
            <category>General</category>
            <pubDate>Mon, 27 Dec 2010 22:06:17 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?1,68990,69062#msg-69062</guid>
            <title>Re: Using send.py</title>
            <link>https://reprap.org/forum/read.php?1,68990,69062#msg-69062</link>
            <description><![CDATA[ In a general sense, the host must wait for an OK, as that's what we're using to ensure  that the host doesn't overrun the firmware's recieve buffer - dropping a command will cause a flawed print, and may cause a failed print.  Regularly dropping commands would be guaranteed to cause a failed print.<br />
<br />
So flow control is needed. <br />
<br />
It seems like the firmwares should be required to ALWAYS send a response after every line, even if it's blank or invalid. A simple "ok" for a blank line, maybe a "huh? ok" for an invalid/not recognized command's not an unreasonable requirement... Don't know how to make that change with this particular firmware off the top of my head though. Probably add a "default" case to the bottom of the list, that simply sends a "huh? " (with no line feed) and the ok is probably already handled.]]></description>
            <dc:creator>jgilmore</dc:creator>
            <category>General</category>
            <pubDate>Mon, 27 Dec 2010 10:40:53 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?1,68990,69058#msg-69058</guid>
            <title>Re: Using send.py</title>
            <link>https://reprap.org/forum/read.php?1,68990,69058#msg-69058</link>
            <description><![CDATA[ another option is to send a generic code that sends a reply back<br />
<br />
change/replace.csv file M101,M103  to M105 - this code sends you back the temp value and sends an ok. <br />
<br />
lines with no data seem to cause the firmware to hang. <br />
<br />
nothing to reply to gets no reply, no reply gets no new command. <br />
<br />
I wish that the firmware was an aggressive. meaning that it ensured conversation, and assumed someone was there to talk to it, and kept talking till told to be quiet. we have a passive host and a passive firmware. not much for talking, either one of them!]]></description>
            <dc:creator>jamesdanielv</dc:creator>
            <category>General</category>
            <pubDate>Mon, 27 Dec 2010 09:19:52 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?1,68990,69025#msg-69025</guid>
            <title>Re: Using send.py</title>
            <link>https://reprap.org/forum/read.php?1,68990,69025#msg-69025</link>
            <description><![CDATA[ Oh, some more things:<br />
<br />
In the file 'process_g_code.pde' you can turn on an echo by changing line 95 from "<br />
byte SendDebug =  DEBUG_INFO | DEBUG_ERRORS;"  to "byte SendDebug =  DEBUG_ECHO | DEBUG_INFO | DEBUG_ERRORS;".  When I did this (recompiling and downloading the firmware into the sanguino, of course), I could see what the Sanguino was receiving on its serial port from send.py.  You would have to undo this change after you have finished debugging, of course.<br />
<br />
By doing this I discovered that send.py was removing the spaces in the commands, which changed "G1 X0 Y0" to "G1X0Y0" which the firmware did not seem to like.<br />
<br />
I fixed this by commenting out the following line in the file 'RepRapArduinoSerialSender.py' at approximately line 96<br />
<br />
		#block=block.replace(' ','')<br />
<br />
This line is what takes out the spaces.<br />
<br />
fdavies]]></description>
            <dc:creator>fdavies</dc:creator>
            <category>General</category>
            <pubDate>Sun, 26 Dec 2010 19:31:11 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?1,68990,69024#msg-69024</guid>
            <title>Re: Using send.py</title>
            <link>https://reprap.org/forum/read.php?1,68990,69024#msg-69024</link>
            <description><![CDATA[ I changed the firmware (FiveD_GCode_Interpreter 20100806) in the Sanguino in my Mendel so that it replies to M101 and M103 with 'ok' rather than an error message.  I did this by making the following changes in the file 'process_g_code.pde' <br />
<br />
Original:<br />
<br />
/*<br />
			//turn extruder on, forward<br />
			case 101:<br />
				ex[extruder_in_use]-&gt;setDirection(1);<br />
				ex[extruder_in_use]-&gt;setSpeed(extruder_speed);<br />
				break;<br />
<br />
			//turn extruder on, reverse<br />
			case 102:<br />
				ex[extruder_in_use]-&gt;setDirection(0);<br />
				ex[extruder_in_use]-&gt;setSpeed(extruder_speed);<br />
				break;<br />
<br />
			//turn extruder off<br />
<br />
*/<br />
<br />
Changed to:<br />
<br />
			//turn extruder on, forward<br />
			case 101: /* null code so that skeinforge output can be used easily FD */<br />
				/*ex[extruder_in_use]-&gt;setDirection(1);<br />
				ex[extruder_in_use]-&gt;setSpeed(extruder_speed);*/<br />
				break;<br />
<br />
			//turn extruder off<br />
			case 103:  /* null code so that skeinforge output can be used easily FD */<br />
				/*ex[extruder_in_use]-&gt;setDirection(0);<br />
				ex[extruder_in_use]-&gt;setSpeed(extruder_speed);*/<br />
				break;<br />
<br />
Unless code execution time or code space is extremely tight, this seems like a low risk change.  This has allowed me to use send.py with no complications.  I hope that this helps.<br />
<br />
fdavies]]></description>
            <dc:creator>fdavies</dc:creator>
            <category>General</category>
            <pubDate>Sun, 26 Dec 2010 19:11:36 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?1,68990,69022#msg-69022</guid>
            <title>Re: Using send.py</title>
            <link>https://reprap.org/forum/read.php?1,68990,69022#msg-69022</link>
            <description><![CDATA[ I gave up on send.py and wrote send-gcode: [<a href="http://forums.reprap.org/read.php?156,61227" target="_blank"  rel="nofollow">forums.reprap.org</a>]]]></description>
            <dc:creator>tbfleming</dc:creator>
            <category>General</category>
            <pubDate>Sun, 26 Dec 2010 17:58:41 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?1,68990,68990#msg-68990</guid>
            <title>Problem using send.py [SOLVED]</title>
            <link>https://reprap.org/forum/read.php?1,68990,68990#msg-68990</link>
            <description><![CDATA[ I use skeinforge to slice and want to avoid having to open up the reprap host in order to send gcode to my printer so I wrote a simple batch file wrapper for send.py:<br />
send.bat:<br />
<pre class="bbcode">echo %1
C:\Python27\python.exe "C:\Documents and Settings\Greg\Desktop\reprap\skeinforge\fabmetheus_utilities\miscellaneous\fabricate\send.py" -v -p COM3 %1 
pause</pre>
I then associated .gcode with the send.bat script so that all I have to do is double click the gcode and it sends it to the printer.<br />
The problem is, when it gets to a gcode that the 5d firmwaare doesn't understand e.g. M103 it just sits there waiting to get an ok from the printer, but that never comes and it stops at that point.<br />
I tried using replace.csv to replace M103 and M101 codes with a comment ";", but send.py still seems to wait after sending the comment. It gets this far and then stops:<br />
<pre class="bbcode">

C:\Documents and Settings\Greg\Desktop\reprap\models&gt;echo "C:\Documents and Sett
ings\Greg\Desktop\reprap\models\disc_export.gcode"
"C:\Documents and Settings\Greg\Desktop\reprap\models\disc_export.gcode"

C:\Documents and Settings\Greg\Desktop\reprap\models&gt;C:\Python27\python.exe "C:\
Documents and Settings\Greg\Desktop\reprap\skeinforge\fabmetheus_utilities\misce
llaneous\fabricate\send.py" -v -p COM3 "C:\Documents and Settings\Greg\Desktop\r
eprap\models\disc_export.gcode"
You have requested that verbosity be set to True
All communication with the arduino will be printed
Arduino port set to COM3
Opening serial port: COM3
Serial Open?: True
Baud Rate: 19200
Resetting arduino...
&lt; start
&gt; G21
&lt; ok
&gt; G90
&lt; ok
&gt; T0
&lt; ok
&gt; M104 S205
&lt; ok
&gt; G92 E0
&lt; ok
&gt; G1 Z8.0 F50
&lt; ok
&gt; G28 Y0
&lt; ok
&gt; G28 X0
&lt; ok
&gt; G1 X122.0 F3000
&lt; ok
&gt; G28 Z0
&lt; ok
&gt; G92 Z0
&lt; ok
&gt; G1 Z8.0 F50
&lt; ok
&gt; M109 S205
&lt; ok
&gt; M113 S0.75
&lt; ok
&gt; G92 E0
&lt; ok
&gt; G90
&lt; ok
&gt; G21
&lt; ok
&gt; ;</pre>
<br />
I next tried to just manually remove the ";"<br />
This is the output I get when running the program:<pre class="bbcode">
C:\Documents and Settings\Greg\Desktop\reprap\models&gt;echo "C:\Documents and Sett
ings\Greg\Desktop\reprap\models\disc_export.gcode"
"C:\Documents and Settings\Greg\Desktop\reprap\models\disc_export.gcode"

C:\Documents and Settings\Greg\Desktop\reprap\models&gt;C:\Python27\python.exe "C:\
Documents and Settings\Greg\Desktop\reprap\skeinforge\fabmetheus_utilities\misce
llaneous\fabricate\send.py" -v -p COM3 "C:\Documents and Settings\Greg\Desktop\r
eprap\models\disc_export.gcode"
You have requested that verbosity be set to True
All communication with the arduino will be printed
Arduino port set to COM3
Opening serial port: COM3
Serial Open?: True
Baud Rate: 19200
Resetting arduino...
&lt; start
&gt; G21
&lt; ok
&gt; G90
&lt; ok
&gt; T0
&lt; ok
&gt; M104 S205
&lt; ok
&gt; G92 E0
&lt; ok
&gt; G1 Z8.0 F50
&lt; ok
&gt; G28 Y0
&lt; ok
&gt; G28 X0
&lt; ok
&gt; G1 X122.0 F3000
&lt; ok
&gt; G28 Z0
&lt; ok
&gt; G92 Z0
&lt; ok
&gt; G1 Z8.0 F50
&lt; ok
&gt; M109 S205
&lt; ok
&gt; M113 S0.75
&lt; ok
&gt; G92 E0
&lt; ok
&gt; G90
&lt; ok
&gt; G21
&lt; ok
&gt; M105
&lt; ok T:193 B:193
&gt; M113 S1.0
&lt; ok
&gt; M108 S26.0
&lt; ok
&gt; M104 S195.0
&lt; ok
&gt; M108 S15.6
&lt; ok
&gt; G1 X87.14 Y47.15 Z0.2 F575.999
&lt; ok
&gt; G1 F11400.0
&lt; ok
&gt; G1 E12.0
&lt; ok
&gt; G1 F575.999
&lt; ok
&gt; G92 E0
&lt; ok
&gt; G1 X87.14 Y62.85 Z0.2 F575.999 E25.529
&lt; ok
&gt; G1 X102.86 Y62.85 Z0.2 F575.999 E51.058</pre>
And when it gets to the end, it just stops.<br />
The full gcode I am trying to send is here: [<a href="http://pastebin.com/Rwyx8a8x" target="_blank"  rel="nofollow">pastebin.com</a>]<br />
It is just a simple disc on a single layer with an outline created using Lenbok's outline plugin.<br />
Sending the same gcode using the reprap host works fine.<br />
<br />
Am I doing something wrong with my use of send.py? Is anyone able to successfully print using send.py? Anything else you can think of that I can try?]]></description>
            <dc:creator>Greg Frost</dc:creator>
            <category>General</category>
            <pubDate>Sat, 25 Dec 2010 19:44:38 -0500</pubDate>
        </item>
    </channel>
</rss>
