gnea\grbl-Mega  1.0f
Source Code Documentation ( Internal Workings )
motion_control.h
Go to the documentation of this file.
1 /*
2  motion_control.h - high level interface for issuing motion commands
3  Part of Grbl
4 
5  Copyright (c) 2011-2016 Sungeun K. Jeon for Gnea Research LLC
6  Copyright (c) 2009-2011 Simen Svale Skogsrud
7 
8  Grbl is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  Grbl is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with Grbl. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 #ifndef motion_control_h
23 #define motion_control_h
24 
26 #define HOMING_CYCLE_LINE_NUMBER 0
27 #define PARKING_MOTION_LINE_NUMBER 0
28 
29 #define HOMING_CYCLE_ALL 0
30 #define HOMING_CYCLE_X bit(X_AXIS)
31 #define HOMING_CYCLE_Y bit(Y_AXIS)
32 #define HOMING_CYCLE_Z bit(Z_AXIS)
33 
35 // unless invert_feed_rate is true. Then the feed_rate means that the motion should be completed in
36 // (1 minute)/feed_rate time.
37 void mc_line(float *target, plan_line_data_t *pl_data);
39 // offset == offset from current xyz, axis_XXX defines circle plane in tool space, axis_linear is
40 // the direction of helical travel, radius == circle radius, is_clockwise_arc boolean. Used
41 // for vector transformation direction.
42 void mc_arc(float *target, plan_line_data_t *pl_data, float *position, float *offset, float radius,
43  uint8_t axis_0, uint8_t axis_1, uint8_t axis_linear, uint8_t is_clockwise_arc);
45 void mc_dwell(float seconds);
47 void mc_homing_cycle(uint8_t cycle_mask);
49 uint8_t mc_probe_cycle(float *target, plan_line_data_t *pl_data, uint8_t parser_flags);
51 void mc_parking_motion(float *parking_target, plan_line_data_t *pl_data);
53 void mc_reset();
54 
55 #endif
uint8_t mc_probe_cycle(float *target, plan_line_data_t *pl_data, uint8_t parser_flags)
Perform tool length probe cycle. Requires probe switch.
void mc_arc(float *target, plan_line_data_t *pl_data, float *position, float *offset, float radius, uint8_t axis_0, uint8_t axis_1, uint8_t axis_linear, uint8_t is_clockwise_arc)
Execute an arc in offset mode format. position == current xyz, target == target xyz,.
Planner data prototype. Must be used when passing new motions to the planner.
Definition: planner.h:78
void mc_homing_cycle(uint8_t cycle_mask)
Perform homing cycle to locate machine zero. Requires limit switches.
void mc_reset()
Performs system reset. If in motion state, kills all motion and sets system alarm.
void mc_line(float *target, plan_line_data_t *pl_data)
Execute linear motion in absolute millimeter coordinates. Feed rate given in millimeters/second.
void mc_dwell(float seconds)
Dwell for a specific number of seconds.
void mc_parking_motion(float *parking_target, plan_line_data_t *pl_data)
Plans and executes the single special motion case for parking. Independent of main planner buffer...
plan_line_data_t * pl_data
Definition: gcode.c:859