Welcome! Log In Create A New Profile

Advanced

sending Gcode over USB serial connection

Posted by shaggers 
sending Gcode over USB serial connection
October 25, 2013 07:59AM
Hi all,

I'm trying to send commands to my printer using a simple serial terminal program that I wrote (I've used it for other arduino projects and know that it works fine), but I'm having some problems...

when I try to send a command (e.g. "G1 X100" to move the printer to X=100mm, the actual string that I send is "G1 X100\n\r"), it doesn't do anything, but the LED on my board flashes to show that some data has been transmitted. what's weird is that if I hit the SEND button repeatedly, it will accept the command on the 6th or 7th send. I get an "ok" message back from the printer when the command finally goes through. This isn't just a time delay, I've checked, I actually have to hit SEND multiple times in rapid succession in order for the command to go through.

I'm using a RUMBA board (from what I understand the processor is basically an arduino mega 2560)
connecting on 115200 baud (as set in my printer's firmware)
running Marlin on the printer

Am I missing something in the handshake or line terminations?

I can't be bothered going into too much detail about the serial terminal program that I put together (like I said, I've used it before and it works fine for sending/receiving strings via UScool smiley, but if anyone has any information on sending Gcode to marlin via Serial, I'd appreciate it. None of the documentation for Marlin, Pronterface, etc have had any information on what the stringsactually look like when they are sent.

Thanks in advance!
Re: sending Gcode over USB serial connection
October 29, 2013 03:47AM
Quote
shaggers
the actual string that I send is "G1 X100\n\r"

Try using the string "G1 X100\r\n" instead!


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: sending Gcode over USB serial connection
May 19, 2018 06:00PM
I know this Topic is dammned old - but saved me!
Was trying to send G-code directly to Marlin and couldn't get it to work - the "\n" was missing. Now works perfect smileys with beer

Thanks a lot!
Sorry, only registered users may post in this forum.

Click here to login