Welcome! Log In Create A New Profile

Advanced

pronterface move the motors but will not print

Posted by locwiki 
pronterface move the motors but will not print
September 14, 2013 10:47AM
I've just managed to assemble all motors and endstops and connect my ramps 1.4 to pronterface.
I am able to move manually the motors (and check the endstops) from pronterface but when I try to print a file (from pronterface) the printer only performs the first movement and then stops. To simplify the test I have written a small python program that read the file (with the g-codes) line by line and send them to the printer. The program prints all the sent g-commands and the answers given by the ramps 1.4. After sending each g-code the script waits until the ramps board send back and "ok" string

When I run the script this is what I get

Sending: G21
: ok
Sending: G90
: ok
Sending: G92 X0 Y0 Z0
: ok
Sending: G0 X0 Y0 Z0 F2000.0
: ok
Sending: G04 P0.0000
: ok
Sending: G01 X18.1707723751 Y13.6126984210 Z0.3972982631 F2497.8512747620
: ok
Sending: G01 X36.3415447502 Y27.2253968420 Z0.0000000000 F2497.8512747620
................(PROGRAM STOPS HERE SINCE NO OK IS RETURN)

If I comment the line that waits for an answer the whole file is processed and the printer moves for a while but this is not the ideal situation because many g-code send before the previous moment ends are not processed.


Configuration:
ramps 1.4 board with Sprinter firmware.
Sprinter configuration file is available at [mega.co.nz]
testfile is available at [mega.co.nz]
python script is available at [mega.co.nz]


thanks for the help

Roberto
Re: pronterface move the motors but will not print
September 14, 2013 09:35PM
Q: What speed are you communicating to RAMPS/Sprinter with, and what sort of Arduino Mega do you have (2560, 1280, Taurino, etc)?

Also:

Q. What OS are you using to talk to the Mega?

Some of the newer Megas use a 16u2 or 32u2 in place of the FT232 serial chip used on the original Arduino Mega 1280.

With certain OS's, (Linux seems to have the issue most often) you tend to find that some of the baud rates just don't want to work. Basically characters get lost due to sync issues, causing invalid commands to be received - this can lock up the firmware, or they just get ignored..

You might want to try different speeds to see if the issue goes away.
Re: pronterface move the motors but will not print
September 15, 2013 03:54AM
Cefiar Wrote:
-------------------------------------------------------
> Q: What speed are you communicating to
> RAMPS/Sprinter with, and what sort of Arduino Mega
> do you have (2560, 1280, Taurino, etc)?
>
> Also:
>
> Q. What OS are you using to talk to the Mega?
>
Hi,

I have tried two operation systems: opensuse 12.2 (linux) and windows 7
In opensuse I have installed pronterface and my python script, in windows repetierHost
Regarding baud speed I have tried 115200 and 9600
The arduino mega is 2560
I have even tried different usb cables (just in case)

The only extra test I can think about is try a different firmware version

cheers

Roberto

> Some of the newer Megas use a 16u2 or 32u2 in
> place of the FT232 serial chip used on the
> original Arduino Mega 1280.
>
> With certain OS's, (Linux seems to have the issue
> most often) you tend to find that some of the baud
> rates just don't want to work. Basically
> characters get lost due to sync issues, causing
> invalid commands to be received - this can lock up
> the firmware, or they just get ignored..
>
> You might want to try different speeds to see if
> the issue goes away.
Re: pronterface move the motors but will not print
September 15, 2013 09:05PM
Why don't you download the Sprinter firmware from...

[koti.kapsi.fi]

and then configure the firmware to suit set-up?


_______________________________________
Waitaki 3D Printer
Re: pronterface move the motors but will not print
September 16, 2013 03:41AM
Finally, I discover the problem. I had compiled Sprinter with arduino 1.0. It seems that arduino 1.0 serial port buffer size in 64 bytes while
arduino 0.23 is 127. I guess pronterface assumes that the buffer size is 127 so whenever a command line longer than 63 bytes were send to the printer the next the buffer was truncated.

The problem (an solution) is well described here:

[www.hobbytronics.co.uk]

Thanks for all the suggestions

Roberto
Sorry, only registered users may post in this forum.

Click here to login