New command-line host for Windows: send-gcode
September 27, 2010 09:57PM
I wanted a simple command-line g-code sender, but was unable to find one that worked on my machine (send.py fails after just a couple commands). The only solution I could find was create one: send-gcode for Windows.

Example use:
send-gcode.exe -p COM4 -b 64000 -f whistle.gc

It normally generates no output, but can show the communications traffic if used with the -v option.

C:\Users\Todd\Desktop\Rapid\>send-gcode.exe -p COM4 -b 64000 -f g2.gcode -v
send: N1 M110*34
recv: DEBUG:LineNr set
recv: ok
send: N2 G28 Y0 F4500.0*33
recv: ok
send: N3 G28 X0 F4500.0*33
recv: ok
send: N4 G1 X140 Y0 F4500.0*81
recv: ok
...

Current limitations:
    * Only accepts g-code from a file, not from the command line
    * No timeouts; if the "ok" message isn't received then it will hang
    * It doesn't reset the motherboard (personal preference, but I'm open to adding an -r option)

This has been tested with:
    * RepRap 5D firmware on Gen 3 electronics, 64000 bps
    * RepRap 5D firmware on Gen 3 electronics, 128000 bps (stress test - this frequently overfills the firmware's buffer, causing send-gcode to resend lines)
    * Windows 7 (64 bit)

It's compiled with:
    * Visual C++ Express 2010 (will not build on older versions)

It should run on:
    * Windows XP (32 bit or 64 bit)
    * Windows Vista (32 bit or 64 bit)
    * Windows 7 (32 bit or 64 bit)

Todd
Re: New command-line host for Windows: send-gcode
October 07, 2010 07:02PM
Sounds interesting, I'd like to try it out. But am I missing a .exe file at git?


--
-Nudel
Blog with RepRap Comic
Re: New command-line host for Windows: send-gcode
October 07, 2010 08:40PM
github buries binaries in hard-to-spot places sad smiley





Edited 1 time(s). Last edit at 10/07/2010 08:41PM by tbfleming.
Attachments:
open | download - step1.png (110.5 KB)
open | download - step2.png (19.6 KB)
Re: New command-line host for Windows: send-gcode
October 08, 2010 06:59AM
Thanks, didn't see that one smiling smiley
But, is there really a compiled send-gcode.exe in there somewhere? Because I still can't find one confused smiley


--
-Nudel
Blog with RepRap Comic
Re: New command-line host for Windows: send-gcode
October 08, 2010 09:16AM
It's in that zip file. It's possible that an overly-agressive browser or security package strips it out sad smiley
Re: New command-line host for Windows: send-gcode
October 08, 2010 09:24AM
Yeah, something must've happened.


Edited 1 time(s). Last edit at 10/08/2010 09:24AM by Nudel.


--
-Nudel
Blog with RepRap Comic
Attachments:
open | download - screenshot.jpg (22.4 KB)
Re: New command-line host for Windows: send-gcode
October 08, 2010 10:50AM
Ah! d38c995 is the source zip. You clicked the "download .zip" button instead of the link I circled (send-gcode-2010-09-27.zip)
Re: New command-line host for Windows: send-gcode
October 08, 2010 12:03PM
Sorry confused smiley
That was terribly stupid of me, I found it.
I'll go and hide in a corner now.


--
-Nudel
Blog with RepRap Comic
Re: New command-line host for Windows: send-gcode
October 08, 2010 12:07PM
It's not you; github just makes it more confusing than it needs to be. Maybe I'll mirror on the Wiki after I get home tonight.
Re: New command-line host for Windows: send-gcode
October 09, 2010 05:25AM
In case you use a firmware which can do XON/XOFF flow control, there's no need for a specific sending application. Just use your favourite serial terminal app or even "cat xxx.gcode >/dev/arduino" on Unixy systems. Implementing flow control isn't terribly difficult, FiveD on Arduino has it already.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: New command-line host for Windows: send-gcode
October 09, 2010 05:38AM
I can't wait to try FiveD on Arduino once it supports non-integer steps-per-mm; rounding that to an integer on my machine would cause holes that are 100mm apart to be off by around 1.5mm.
Re: New command-line host for Windows: send-gcode
October 10, 2010 06:00AM
Quote

I can't wait to try FiveD on Arduino once it supports non-integer steps-per-mm

I took the freedom to write down this feature request in GitHub: [github.com]

Clearly we won't introduce floating point operations just for this, but moving the decimal point three digits to the left should work equally well.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: New command-line host for Windows: send-gcode
October 10, 2010 10:34AM
Great! I suspect 5D on Arduino is well on its way toward becoming the most-favored firmware.
Re: New command-line host for Windows: send-gcode
October 10, 2010 12:59PM
The STEPS_PER_MM_{X|Y|Z|E} value was just raised by factor 1000 in precision. Please test, as I haven't hardware to measure this kind of stuff.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: New command-line host for Windows: send-gcode
October 10, 2010 01:57PM
I'm a bit confused which Gen3 branch I should use.
Re: New command-line host for Windows: send-gcode
October 11, 2010 05:07AM
Yes, Gen3 in the RepRap-recommended setup (i.e. with a secondary controller) is still in the works. Several people are working on this, you probably want to try on one of the "gen3... labeld branches.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: New command-line host for Windows: send-gcode
December 06, 2010 08:58AM
Hello,
nice tool. Is it possible to port it to Linux or are you using crap like .NET?
Re: New command-line host for Windows: send-gcode
December 06, 2010 09:09AM
It's native C++, but uses the Windows API for serial.
Re: New command-line host for Windows: send-gcode
December 06, 2010 11:50AM
OK then it would be possible to port it to Linux. I have here somehwere a serial port class written with boost library.
Re: New command-line host for Windows: send-gcode
February 03, 2011 04:25AM
I tried to use this, but when i click on the .exe file it opens up for a split second then is gone.... im running windows xp. Any thoughts on why it does this?
Re: New command-line host for Windows: send-gcode
February 03, 2011 05:08AM
Quote
daufhammer
I tried to use this, but when i click on the .exe file it opens up for a split second then is gone.... im running windows xp. Any thoughts on why it does this?

eye rolling smiley It is a command line program! You can't just double click on it!!

Example usage:
send-gcode.exe -p COM4 -b 64000 -f whistle.gc

If you had at least opened a dos shell i.e. Windows key - R "cmd" [ENTER] "send-gcode" [ENTER]

then you would have seen:
PARSE ERROR:
             Required argument missing: file

Brief USAGE:
   send-gcode.exe  -f  [-p ] [-b ] [-v] [--] [--version]
                   [-h]

For complete USAGE and HELP type:
   send-gcode.exe --help

You must specify the COM port, baudrate and gcode file.

If you type "send-gcode --help" [ENTER] on the command line then you will see:
C:\temp\send-gcode-2010-09-27>send-gcode.exe --help

USAGE:

   send-gcode.exe  -f  [-p ] [-b ] [-v] [--] [--version]
                   [-h]


Where:

   -f ,  --file 
     (required)  File to send

   -p ,  --port 
     Serial port to use; defaults to COM4

   -b ,  --bps 
     Serial port speed; defaults to 19200

   -v,  --verbose
     Print communications traffic

   --,  --ignore_rest
     Ignores the rest of the labeled arguments following this flag.

   --version
     Displays version information and exits.

   -h,  --help
     Displays usage information and exits.


   send-gcode - sends gcode commands to RepRap 5D firmware


C:\temp\send-gcode-2010-09-27>

Now in Windows you can create a desktop shortcut that would allow you to drop a gcode file on it and then invoke the send-gcode.exe with the appropriate parameters if you want but they must be specified. Normally such a program has defaults for common parameters such as the COM port (COM4) and baudrate (19200) BUT you will always have to specify the gcode file to send!

If you need help creating such a shortcut on the desktop so you can drag & drop gcode files onto it let me know.

You could define two such shortcuts e.g. one for COM3 and one for COM4 (assuming you have two machines).
Also you could define that the file extension .gcode automatically invokes the send-gcode with the proper parameters.

smoking smiley

Edited 3 time(s). Last edit at 02/03/2011 11:13AM by rhmorrison.


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: New command-line host for Windows: send-gcode
April 24, 2011 04:02AM
we can also use send.py from skeinforge?
Re: New command-line host for Windows: send-gcode
May 01, 2013 09:05AM
Hi,

I have Arduino.
Gcode program doesn´t work.

addressed to someone?

thank
Re: New command-line host for Windows: send-gcode
May 02, 2013 02:46AM
@hintss: Yes, you can.
@janickaaa1919: confused smiley


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: New command-line host for Windows: send-gcode
February 10, 2015 10:56AM
Hello!

I'm trying to access and use send-gcode, but the download button on github is gone. Do you know any newer ways, or is send-gcode still the best way to do it? I'm trying to create a 3D-copying machine, and I don't know how to automate the printing once the gcode has been created.
Thank you in advance!
Re: New command-line host for Windows: send-gcode
February 11, 2015 02:11AM
I wrote script for Windows.

just:

C:\Python25\python c:\RepRap\printcore.py COM3 c:\RepRap\Predmety\1mmsquare.gcode

first is path for python, second is path for script in python, third is use port, fourth is path for gcode.

Script printcore is in annex.
Attachments:
open | download - printcore.py (14.1 KB)
Re: New command-line host for Windows: send-gcode
March 02, 2015 05:12PM
How do you run it? From the command prompt? How do you start and monitor the print?

Thanks
Re: New command-line host for Windows: send-gcode
April 07, 2015 09:41AM
I cant find the .exe to download it... :/

Can some one upload these File?
Re: New command-line host for Windows: send-gcode
April 08, 2015 08:08AM
It is not .exe file. You must use comand line for Windows and you must have install python.
Re: New command-line host for Windows: send-gcode
April 10, 2015 05:28PM
send-gcode is out of date and I no longer maintain it, compile it, or use it. Github wiped the .exe during a site reorg.
Sorry, only registered users may post in this forum.

Click here to login