Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
motion_control.h
00001 /* 00002 motion_control.h - high level interface for issuing motion commands 00003 Part of Grbl 00004 00005 Copyright (c) 2011-2016 Sungeun K. Jeon for Gnea Research LLC 00006 Copyright (c) 2009-2011 Simen Svale Skogsrud 00007 00008 Grbl is free software: you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation, either version 3 of the License, or 00011 (at your option) any later version. 00012 00013 Grbl is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with Grbl. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 00022 #ifndef motion_control_h 00023 #define motion_control_h 00024 00025 00026 // System motion commands must have a line number of zero. 00027 #define HOMING_CYCLE_LINE_NUMBER 0 00028 #define PARKING_MOTION_LINE_NUMBER 0 00029 00030 #define HOMING_CYCLE_ALL 0 // Must be zero. 00031 #define HOMING_CYCLE_X bit(X_AXIS) 00032 #define HOMING_CYCLE_Y bit(Y_AXIS) 00033 #define HOMING_CYCLE_Z bit(Z_AXIS) 00034 00035 00036 // Execute linear motion in absolute millimeter coordinates. Feed rate given in millimeters/second 00037 // unless invert_feed_rate is true. Then the feed_rate means that the motion should be completed in 00038 // (1 minute)/feed_rate time. 00039 void mc_line(float *target, plan_line_data_t *pl_data); 00040 00041 // Execute an arc in offset mode format. position == current xyz, target == target xyz, 00042 // offset == offset from current xyz, axis_XXX defines circle plane in tool space, axis_linear is 00043 // the direction of helical travel, radius == circle radius, is_clockwise_arc boolean. Used 00044 // for vector transformation direction. 00045 void mc_arc(float *target, plan_line_data_t *pl_data, float *position, float *offset, float radius, 00046 uint8_t axis_0, uint8_t axis_1, uint8_t axis_linear, uint8_t is_clockwise_arc); 00047 00048 // Dwell for a specific number of seconds 00049 void mc_dwell(float seconds); 00050 00051 // Perform homing cycle to locate machine zero. Requires limit switches. 00052 void mc_homing_cycle(uint8_t cycle_mask); 00053 00054 // Perform tool length probe cycle. Requires probe switch. 00055 uint8_t mc_probe_cycle(float *target, plan_line_data_t *pl_data, uint8_t parser_flags); 00056 00057 // Handles updating the override control state. 00058 void mc_override_ctrl_update(uint8_t override_state); 00059 00060 // Plans and executes the single special motion case for parking. Independent of main planner buffer. 00061 void mc_parking_motion(float *parking_target, plan_line_data_t *pl_data); 00062 00063 // Performs system reset. If in motion state, kills all motion and sets system alarm. 00064 void mc_reset(); 00065 00066 #endif
Generated on Tue Jul 12 2022 20:45:31 by
 1.7.2
 1.7.2