Showing posts with label Gcode_interpreter. Show all posts
Showing posts with label Gcode_interpreter. Show all posts

Thursday, August 20, 2009

Arduino Serial monitor and carriage returns

Struggling to get the latest Java Host to talk to the firmware I checked the FiveD Gcode using Arduino's Serial Monitor. It failed the test and then I spent quite some time hours on this to learn that the Serial Monitor does not send the carriage return at the end of the line. Google turned up this Bitlash readme document. Bitlash being another project using the Arduino platform.
As a work-around, tweaked the firmware process_g_code:
// Get a command and process it
void get_and_do_command()
{
//read in characters if we got them.
if (Serial.available())
{
c = Serial.read();
#ifdef JVO_CR_DOT
if(c == '\r' || c == '.')
#else
if(c == '\r')
#end if
c = '\n';

Example of how you can test the firmware by entering the appropriate command, terminated by a dot, in the Arduino Serial Monitor:

M105. ; read the temperature
G1X10. ; position X
G0 X-99. ; X go home
G0 X-99. ; Y go home

See the RepRap wiki for more on G-Codes.
The minimum stops are seen now, for the maximum endstops I have yet to find out why these are not seen by the FW.
To conclude today with the reassuring (?) knowledge that the firmware seems to be ok so the Java Host is next in line.

Thursday, February 26, 2009

Unknown huh?

I got these error messages from the Gcode_interpreter (one advantage of ReplicatorG over the Java Host is that it shows messages from the firmware):
Estimating build time...
Estimated build time is: 13 minutes
Running GCode...
Running warmup commands.
Unknown: E: 151
Running build.
Unknown: huh? G669
Unknown:
Unknown: E: 151
Unknown: huh? G669
Unknown:
Unknown: huh? G669

Checked the code to find that E: indicates a temperature error. Recompiled and ran the Gcode_interpreter in testmode to discover that my own adjustments for the extruder and motor settings conflicted with the EXTRUDER_0_TEMPERATURE_PIN. Now the temperature test reads plausible temperatures and the heater goes hot and cools down.