Results 1 to 10 of 18
Thread: Command Line Communication
-
08-15-2014, 10:56 PM #1
- Join Date
- Jun 2014
- Location
- Australia
- Posts
- 18
Command Line Communication
Do any of you know any methods to communicate to the FF Creator X via the command line; I want to send jog/move commands like printer.moveX(100) - or something like that.
I've only had luck communicating with the printer (USB) using ReplicatorG or Makerware. I've tried Repetier Host, Printrun, Cura and MatterControl, but cannot connect (at any baud rate). From what I've read, the FF (or essentially the Makerbot) can only communicate with software that supports x3g.
Is there any method I can use to send commands or connect with any g-code software, maybe by using GPX to convert it first?
(My firmware is Sailfish 7.6 (r1228))
-
08-15-2014, 11:54 PM #2
The flashforge runs on a stock mega board (or mine does) I connect to it at 250kbps and it communicated fine, download and run pronterface, as it connects to your machine alot like an arduino interface and you can play with it manually. That is running marlin mind youI can't say i've tried sailfish nor know much about it.
-
08-16-2014, 01:02 AM #3
- Join Date
- Jun 2014
- Location
- Burnley, UK
- Posts
- 1,662
Sailfish does not understand Gcode. You can convert and send together with GPX if you can get it to work correctly, I failed on that front.
-
08-16-2014, 01:05 AM #4
- Join Date
- Jun 2014
- Location
- Australia
- Posts
- 18
Thanks for the suggestion. I re-downloaded Printrun and ran Pronterface, but had no luck connecting at 250k baud (it just printed "fp-" endlessly after "Connecting...". Other baud rates just print out other random ASCII chars.
My board is a "Flashforge Creator REV C" mightyboard (ATMEGA1280), which is likely the standard board on these printers; any other ideas?
-
08-16-2014, 01:10 AM #5
- Join Date
- Jun 2014
- Location
- Australia
- Posts
- 18
-
08-16-2014, 01:27 AM #6
The 1280 uses a different baud rate..
http://forum.arduino.cc/index.php?topic=68689.0
-
08-16-2014, 02:09 AM #7
- Join Date
- Jun 2014
- Location
- Australia
- Posts
- 18
Nice find . Unfortunately, it still didn't work (random characters being printed). I'll probably need to look into the source of some of these programs to work out what's happening. The 'connect' command shouldn't be influenced by any g-code / x3g issues right; given that it is just arduino C code?
Anyway I'll try some more stuff with Arduino's serial monitor and maybe look at the Sailfish documentation. I'm open for any other ideas, but thanks already for the ones posted.
-
08-16-2014, 07:35 AM #8
- Join Date
- Jun 2014
- Location
- Burnley, UK
- Posts
- 1,662
GPX sends it to the printer directly
Normally to make a x3g file you use:
gpx "input file.gcode" "output file.gcode
If you do:
gpx -"input file.gcode" "serial port name"
You need to check your control panel (Windo$e) or /dev directory (Linux and Mac) for the serial port name.
Then it is supposed to go out of the serial port. I think it works fine on Windo$e and Mac but I can't make it work under Linux.
-
08-16-2014, 07:38 PM #9
- Join Date
- Jun 2014
- Location
- Australia
- Posts
- 18
Good idea to look at GPX!
I've looked at the GPX source (https://github.com/whpthomas/GPX) and it seems like only the 2.0 Alpha has serial support.
I've been running 1.4 (the only version which is available as a Windows exe - from his thingiverse page http://www.thingiverse.com/thing:81425)
In 1.4, the -s flag allows stdin and stdout support for pipes; in 2.0 it's for serial (which I want!). Do I need to compile the source to an exe to get it to work on Windows? The makefile only releases as a tar. As you can probably tell I have very little experience with cross platform stuff like this.
Am I looking at this wrong? How'd you get it to work on Windows? Is the command something like "$gpx -s inputfile.gcode COM12" ? (with the -g and r1d flags setup in the .ini file)
Thanks again for the help.
-
08-23-2014, 02:37 AM #10
- Join Date
- Jun 2014
- Location
- Australia
- Posts
- 18
So I managed to get this to work; all I had to do was install Linux (Ubuntu)...
In case anyone else needs the same functionality, here are the basic steps I went through:
- Install Linux OS (Ubuntu, for e.g.). On a separate note, you can run it off a Live-USB with persistance, which is pretty cool.
- Ensure you can communicate with serial ports. I uninstalled brltty, installed ReplicatorG and Arduino and tested serial comms to ensure it worked with a known-working program.
- Download the latest GPX source (At least 2.0 which support serial communications via the -s flag). 'Install' via make install.
- The commands I ran to test it was working where:
$ echo G1 X10 > move.gcode
$ sudo gpx -s -v move.gcode /dev/ttyACM0
Some points about the serial port:
- You can check which serial port your printer is on with $ dmesg | tail tty
- You'll need to run commands as root (with sudo), or add yourself to the group (dialout) for the tty file. Check it with $ ls -l /dev/tty*
Now to see if I can write a Python program to automate this, and talk with some other sensors simultaneously!
Kickstarter campaing LEGENDARY...
Today, 08:02 AM in Free Self Promotion