|
Re: Project: Teacup Firmware June 02, 2011 06:29AM |
diff --git a/gcode_process.c b/gcode_process.c
index 76a3c3c..4727388 100644
--- a/gcode_process.c
+++ b/gcode_process.c
@@ -469,6 +469,31 @@ void process_gcode_command() {
power_off();
break;
+ // report endstop status
+ case 200:
+ #if defined(X_MIN_PIN)
+ sersendf_P(PSTR("x_min:%d "), x_min());
+ #endif
+ #if defined(X_MAX_PIN)
+ sersendf_P(PSTR("x_max:%d "), x_max());
+ #endif
+ #if defined(Y_MIN_PIN)
+ sersendf_P(PSTR("y_min:%d "), y_min());
+ #endif
+ #if defined(Y_MAX_PIN)
+ sersendf_P(PSTR("y_max:%d "), y_max());
+ #endif
+ #if defined(Z_MIN_PIN)
+ sersendf_P(PSTR("z_min:%d "), z_min());
+ #endif
+ #if defined(Z_MAX_PIN)
+ sersendf_P(PSTR("z_max:%d "), z_max());
+ #endif
+ #if !(defined(X_MIN_PIN) || defined(X_MAX_PIN) || defined(Y_MIN_PIN) || defined(Y
+ sersendf_P(PSTR("no endstops defined"));
+ #endif
+ break;
+
#ifdef DEBUG
// M240- echo off
case 240:
M200 prints the status of the available endstops. I picked the command number pretty much at random, maybe there is a more sensible one.
|
Re: Project: Teacup Firmware June 02, 2011 06:40AM |
Registered: 18 years ago Posts: 1,094 |

|
Re: Project: Teacup Firmware June 02, 2011 06:49AM |

|
Re: Project: Teacup Firmware June 02, 2011 06:53AM |
Registered: 18 years ago Posts: 1,094 |
|
Re: Project: Teacup Firmware June 02, 2011 07:07AM |
iff --git a/gcode_process.c b/gcode_process.c
index 76a3c3c..124c873 100644
--- a/gcode_process.c
+++ b/gcode_process.c
@@ -182,6 +182,21 @@ void process_gcode_command() {
// G28 - go home
case 28:
+ //? ==== G28: Move to Origin ====
+ //?
+ //? Example: G28
+ //?
+ //? This causes the RepRap machine to move back to its X, Y and Z zero endstops.
+ //? accelerating, so as to get there fast. But when it arrives it backs off by 1
+ //? direction slowly, then moves back slowly to the stop. This ensures more accur
+ //?
+ //? If you add coordinates, then just the axes with coordinates specified will be
+ //?
+ //? G28 X0 Y72.3
+ //?
+ //? will zero the X and Y axes, but not Z. The actual coordinate values are ignor
+ //?
+
queue_wait();
if (next_target.seen_X) {
The //? lines can be easily filtered with a script, and you could probably set up a 3-way merge using git with the mediawiki version to avoid losing edits. How different are the firmware currently in development? Would it make sense to make a merged or a separate Wiki page? I'm still in the process of getting my first machine working, so I'm focussing on Teacup.|
Re: Project: Teacup Firmware June 02, 2011 07:41AM |
Registered: 18 years ago Posts: 1,094 |
). In the case of documenting all the gcodes, I think one big commit would be fine.|
Re: Project: Teacup Firmware June 02, 2011 09:12AM |
Registered: 15 years ago Posts: 21 |
|
Re: Project: Teacup Firmware June 02, 2011 10:00AM |
Registered: 18 years ago Posts: 1,094 |


|
Re: Project: Teacup Firmware June 02, 2011 10:27AM |
Registered: 15 years ago Posts: 21 |


|
Re: Project: Teacup Firmware June 02, 2011 10:47AM |
Registered: 18 years ago Posts: 1,094 |
|
Re: Project: Teacup Firmware June 02, 2011 12:11PM |
Registered: 15 years ago Posts: 21 |
|
Re: Project: Teacup Firmware June 02, 2011 02:23PM |
Registered: 15 years ago Posts: 155 |
|
Re: Project: Teacup Firmware June 02, 2011 06:27PM |
Registered: 15 years ago Posts: 2,947 |
| FFF Settings Calculator | Gcode post processors | Geometric Object Deposition Tool Blog |
| Tantillus.org | Mini Printable Lathe | How NOT to install a Pololu driver |
|
Re: Project: Teacup Firmware June 02, 2011 08:08PM |
Registered: 18 years ago Posts: 1,094 |

|
Re: Project: Teacup Firmware June 03, 2011 12:02PM |
Registered: 18 years ago Posts: 1,094 |

|
Re: Project: Teacup Firmware June 03, 2011 07:17PM |
Registered: 15 years ago Posts: 581 |

|
Re: Project: Teacup Firmware June 03, 2011 07:22PM |
Registered: 18 years ago Posts: 1,094 |


|
Re: Project: Teacup Firmware June 04, 2011 03:18AM |
Registered: 16 years ago Posts: 7,616 |
Quote
Now if only there were a way to slow down the really short infill so it doesn't shake my worktable...
| Generation 7 Electronics | Teacup Firmware | RepRap DIY |
|
Re: Project: Teacup Firmware June 04, 2011 03:54AM |
Registered: 15 years ago Posts: 2,947 |
| FFF Settings Calculator | Gcode post processors | Geometric Object Deposition Tool Blog |
| Tantillus.org | Mini Printable Lathe | How NOT to install a Pololu driver |
|
Re: Project: Teacup Firmware June 04, 2011 02:52PM |
Registered: 15 years ago Posts: 581 |
|
prints interrupted June 04, 2011 03:38PM |
Registered: 15 years ago Posts: 27 |
|
Re: prints interrupted June 04, 2011 08:18PM |
Registered: 18 years ago Posts: 1,094 |

Hopefully there's enough documentation for you to find your way around, if not ask here 
|
Re: prints interrupted June 04, 2011 08:19PM |
Registered: 15 years ago Posts: 155 |
|
Re: prints interrupted June 04, 2011 10:32PM |
Registered: 15 years ago Posts: 27 |
m114 ok X:0,Y:0,Z:0,E:0,F:80 UMX:100,UMY:100,UMZ:1,UME:22 g1 x0.1 ok m114 ok X:100,Y:0,Z:0,E:0,F:80 UMX:100,UMY:100,UMZ:1,UME:22 g1 y0.1 ok m114 ok X:100,Y:200,Z:0,E:0,F:80 UMX:100,UMY:100,UMZ:1,UME:22 g1 x0 ok m114 ok X:0,Y:200,Z:0,E:0,F:80 UMX:100,UMY:100,UMZ:1,UME:22 g1 x0.2 ok m114 ok X:200,Y:400,Z:0,E:0,F:80 UMX:100,UMY:100,UMZ:1,UME:22 g1 y0.2 ok m114 ok X:200,Y:800,Z:0,E:0,F:80 UMX:100,UMY:100,UMZ:1,UME:22and so on. The current_position.X affect the current_position.Y in a sort of exponential way. The X and Z axis are not affected by any other, and the Z axis don't affect Y.
case 114:
//? ==== M114: Get Current Position ====
//?
//? Example: M114
//?
//? This causes the RepRap machine to report its current X, Y, Z and E coordinates to the host.
//?
//? For example, the machine returns a string such as:
//?
//? ok C: X:0.00 Y:0.00 Z:0.00 E:0.00
sersendf_P(PSTR("X:%ld,Y:%ld,Z:%ld,E:%ld,F:%ld\n"), ((int32_t)current_position.X) * ((int32_t) UM_PER_STEP_X), ((int32_t)current_position.Y) * ((int32_t) UM_PER_STEP_Y), ((int32_t)current_position.Z) * ((int32_t) UM_PER_STEP_Z), ((int32_t)current_position.E) * ((int32_t) UM_PER_STEP_E), current_position.F);
sersendf_P(PSTR("UMX:%ld,UMY:%ld,UMZ:%ld,UME:%ld\n"), ((int32_t) UM_PER_STEP_X),((int32_t) UM_PER_STEP_Y), ((int32_t) UM_PER_STEP_Z), ((int32_t) UM_PER_STEP_E));
// newline is sent from gcode_parse after we return
break;
|
Re: prints interrupted June 05, 2011 01:20AM |
Registered: 18 years ago Posts: 1,094 |
|
Re: prints interrupted June 05, 2011 01:43AM |
Registered: 18 years ago Posts: 1,094 |
start ok M114 ok X:0.000,Y:0.000,Z:0.000,E:0.000,F:50 X:0,Y:0,Z:0,E:0,F:50 UMX:100,UMY:100,UMZ:1,UME:1 G1 X0.1 ok M114 ok X:0.100,Y:0.000,Z:0.000,E:0.000,F:50 X:100,Y:0,Z:0,E:0,F:50 UMX:100,UMY:100,UMZ:1,UME:1 G1 Y0.1 ok M114 ok X:0.100,Y:0.100,Z:0.000,E:0.000,F:50 X:100,Y:100,Z:0,E:0,F:50 UMX:100,UMY:100,UMZ:1,UME:1 G1 X0 ok M114 ok X:0.000,Y:0.100,Z:0.000,E:0.000,F:50 X:0,Y:100,Z:0,E:0,F:50 UMX:100,UMY:100,UMZ:1,UME:1 G1 X0.2 ok M114 ok X:0.200,Y:0.100,Z:0.000,E:0.000,F:50 X:200,Y:100,Z:0,E:0,F:50 UMX:100,UMY:100,UMZ:1,UME:1 G1 Y0.2 ok M114 ok X:0.200,Y:0.200,Z:0.000,E:0.000,F:50 X:200,Y:200,Z:0,E:0,F:50 UMX:100,UMY:100,UMZ:1,UME:1
|
Re: prints interrupted June 05, 2011 04:33AM |
Registered: 15 years ago Posts: 27 |

|
Re: prints interrupted June 05, 2011 04:38AM |
Registered: 18 years ago Posts: 1,094 |
#define STEPS_PER_MM_X 10.0 #define STEPS_PER_MM_Y 10.0 #define STEPS_PER_MM_Z 1000.0 #include #define STEPS_PER_MM_E (3200.0 * 39.0 / 11.0 / 6.75 / M_PI)
|
Re: prints interrupted June 05, 2011 04:49AM |
Registered: 15 years ago Posts: 27 |
|
Re: prints interrupted June 05, 2011 05:43AM |
Registered: 15 years ago Posts: 27 |
case 114:
//? ==== M114: Get Current Position ====
//?
//? Example: M114
//?
//? This causes the RepRap machine to report its current X, Y, Z and E coordinates to the host.
//?
//? For example, the machine returns a string such as:
//?
//? ok C: X:0.00 Y:0.00 Z:0.00 E:0.00
sersendf_P(PSTR("X:%lq,"), current_position.X * ((int32_t) UM_PER_STEP_X));
sersendf_P(PSTR("Y:%lq,"), current_position.Y * ((int32_t) UM_PER_STEP_Y));
sersendf_P(PSTR("Z:%lq,"), current_position.Z * ((int32_t) UM_PER_STEP_Z));
sersendf_P(PSTR("E:%lq,"), current_position.E * ((int32_t) UM_PER_STEP_E));
sersendf_P(PSTR("F:%ld"), current_position.F);
// newline is sent from gcode_parse after we return
break;