Da Prusa a CNC 5 Assi April 23, 2015 11:01AM |
Registered: 10 years ago Posts: 21 |
Re: Da Prusa a CNC 5 Assi April 23, 2015 11:07AM |
Registered: 9 years ago Posts: 176 |
Re: Da Prusa a CNC 5 Assi April 23, 2015 02:50PM |
Moderator Registered: 11 years ago Posts: 1,865 |
Re: Da Prusa a CNC 5 Assi April 23, 2015 05:36PM |
Registered: 10 years ago Posts: 6,409 |
Re: Da Prusa a CNC 5 Assi April 24, 2015 04:30AM |
Registered: 10 years ago Posts: 21 |
inline void gcode_G0_G1() { if (IsRunning()) { get_coordinates(); // For X Y Z E F #ifdef FWRETRACT if (autoretract_enabled && !(code_seen('X') || code_seen('Y') || code_seen('Z')) && code_seen('E')) { float echange = destination[E_AXIS] - current_position[E_AXIS]; // Is this move an attempt to retract or recover? if ((echange < -MIN_RETRACT && !retracted[active_extruder]) || (echange > MIN_RETRACT && retracted[active_extruder])) { current_position[E_AXIS] = destination[E_AXIS]; // hide the slicer-generated retract/recover from calculations plan_set_e_position(current_position[E_AXIS]); // AND from the planner retract(!retracted[active_extruder]); return; } } #endif //FWRETRACT prepare_move(); //ClearToSend(); } }
inline void gcode_G0_G1() { if (IsRunning()) { get_coordinates(); prepare_move(); //ClearToSend(); } }
void prepare_move() { clamp_to_software_endstops(destination); refresh_cmd_timeout(); #ifdef PREVENT_DANGEROUS_EXTRUDE (void)prevent_dangerous_extrude(current_position[E_AXIS], destination[E_AXIS]); #endif line_to_destination(feedrate * feedrate_multiplier / 100.0); set_current_to_destination(); }la funzione che aggiunge il movimento è line_to_destination(feedrate...)
inline void line_to_destination(float mm_m) { plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], mm_m/60, active_extruder); }
inline void line_to_destination(float mm_m) { plan_buffer_line_mia(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], destination[C_AXIS], mm_m/60, active_extruder); //plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], mm_m/60, active_extruder); }Non sto ad incollare qui la funzione in quanto, anche ripulita alla mia maniera rimane comunque abbastanza lunga; sostanzialmente dentro questa funzione ho aggiunto a tutti i calcoli anche l'asse C e facendo in modo di usare il T1 (secondo estrusore) della RAMPS
#define NUM_AXIS 5 enum AxisEnum {X_AXIS=0, Y_AXIS=1, A_AXIS=0, B_AXIS=1, Z_AXIS=2, E_AXIS=3, C_AXIS=4, X_HEAD=5, Y_HEAD=6}; const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E', 'C'}; #define AXIS_RELATIVE_MODES {false, false, false, false,false} #define DEFAULT_AXIS_STEPS_PER_UNIT {160,80,4000,42.666,42.666} // default steps per unit for Ultimaker #define DEFAULT_MAX_FEEDRATE {500, 500, 3, 45, 45} // (mm/sec) #define DEFAULT_MAX_ACCELERATION {6000,6000,50,9000,9000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.Da notare che sull'enum degli assi ho modificato la sequenza in modo di avere X Y Z E C = 0 1 2 3 4
Re: Da Prusa a CNC 5 Assi April 24, 2015 07:18AM |
Registered: 11 years ago Posts: 15 |
Re: Da Prusa a CNC 5 Assi April 24, 2015 07:59AM |
Registered: 10 years ago Posts: 21 |
Re: Da Prusa a CNC 5 Assi April 24, 2015 11:06AM |
Registered: 10 years ago Posts: 21 |
Re: Da Prusa a CNC 5 Assi April 26, 2015 12:08PM |
Registered: 10 years ago Posts: 21 |
Re: Da Prusa a CNC 5 Assi April 26, 2015 12:23PM |
Registered: 10 years ago Posts: 21 |
Re: Da Prusa a CNC 5 Assi April 26, 2015 12:44PM |
Registered: 10 years ago Posts: 6,409 |
Re: Da Prusa a CNC 5 Assi April 26, 2015 12:46PM |
Registered: 10 years ago Posts: 3,268 |
Re: Da Prusa a CNC 5 Assi April 26, 2015 01:08PM |
Registered: 10 years ago Posts: 21 |
Re: Da Prusa a CNC 5 Assi April 26, 2015 03:30PM |
Registered: 9 years ago Posts: 690 |
Re: Da Prusa a CNC 5 Assi April 26, 2015 04:44PM |
Registered: 10 years ago Posts: 21 |
Re: Da Prusa a CNC 5 Assi April 27, 2015 02:48AM |
Registered: 10 years ago Posts: 21 |
Re: Da Prusa a CNC 5 Assi June 07, 2015 03:18PM |
Registered: 9 years ago Posts: 18 |
Re: Da Prusa a CNC 5 Assi June 08, 2015 02:48AM |
Admin Registered: 11 years ago Posts: 954 |
Re: Da Prusa a CNC 5 Assi June 08, 2015 03:16AM |
Registered: 10 years ago Posts: 21 |
Re: Da Prusa a CNC 5 Assi June 09, 2015 04:03AM |
Admin Registered: 11 years ago Posts: 954 |
Re: Da Prusa a CNC 5 Assi June 10, 2015 06:17AM |
Registered: 10 years ago Posts: 21 |
Re: Da Prusa a CNC 5 Assi June 10, 2015 01:43PM |
Registered: 13 years ago Posts: 4,555 |
Re: Da Prusa a CNC 5 Assi June 10, 2015 03:12PM |
Registered: 10 years ago Posts: 19 |
Re: Da Prusa a CNC 5 Assi August 22, 2015 02:17AM |
Registered: 9 years ago Posts: 1 |
Re: Da Prusa a CNC 5 Assi January 09, 2016 05:41AM |
Registered: 10 years ago Posts: 92 |
Re: Da Prusa a CNC 5 Assi January 16, 2016 03:05AM |
Registered: 10 years ago Posts: 92 |
Re: Da Prusa a CNC 5 Assi January 30, 2016 09:29PM |
Registered: 8 years ago Posts: 39 |
Re: Da Prusa a CNC 5 Assi February 01, 2016 02:34AM |
Registered: 10 years ago Posts: 21 |
Re: Da Prusa a CNC 5 Assi February 03, 2016 08:42PM |
Registered: 8 years ago Posts: 39 |
Re: Da Prusa a CNC 5 Assi April 24, 2016 04:30AM |
Registered: 9 years ago Posts: 25 |