Close



Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Student
    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))

  2. #2
    Super Moderator Geoff's Avatar
    Join Date
    Nov 2013
    Location
    NSW, Australia
    Posts
    1,824
    Add Geoff on Thingiverse
    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.

  3. #3
    Senior Engineer
    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.

  4. #4
    Student
    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?

  5. #5
    Student
    Join Date
    Jun 2014
    Location
    Australia
    Posts
    18
    Quote Originally Posted by Mjolinor View Post
    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.
    Yeah true; but what interface would I use to send the (converted) commands to the printer? PuTTY or something similar maybe? Is this even possible?

  6. #6
    Super Moderator Geoff's Avatar
    Join Date
    Nov 2013
    Location
    NSW, Australia
    Posts
    1,824
    Add Geoff on Thingiverse
    Quote Originally Posted by Default View Post
    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?
    The 1280 uses a different baud rate..

    http://forum.arduino.cc/index.php?topic=68689.0


  7. #7
    Student
    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.

  8. #8
    Senior Engineer
    Join Date
    Jun 2014
    Location
    Burnley, UK
    Posts
    1,662
    Quote Originally Posted by Default View Post
    Yeah true; but what interface would I use to send the (converted) commands to the printer? PuTTY or something similar maybe? Is this even possible?
    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.

  9. #9
    Student
    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.

  10. #10
    Student
    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!

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •