grblHAL core  20240704
machine_limits.h
Go to the documentation of this file.
1 /*
2  machine_limits.h - code pertaining to limit-switches and performing the homing cycle
3 
4  Part of grblHAL
5 
6  Copyright (c) 2017-2023 Terje Io
7  Copyright (c) 2012-2015 Sungeun K. Jeon
8  Copyright (c) 2009-2011 Simen Svale Skogsrud
9 
10  Grbl is free software: you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  Grbl is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with Grbl. If not, see <http://www.gnu.org/licenses/>.
22 */
23 
24 #ifndef _MACHINE_LIMITS_H_
25 #define _MACHINE_LIMITS_H_
26 
27 #include "nuts_bolts.h"
28 
29 typedef enum
30 {
35 
36 void limits_init (void);
37 
38 // Perform one portion of the homing cycle based on the input settings.
39 status_code_t limits_go_home (axes_signals_t cycle);
40 
41 // Check for soft limit violations
42 void limits_soft_check (float *target, planner_cond_t condition);
43 
44 // Check if homing is required.
45 bool limits_homing_required (void);
46 
47 // Set axes to be homed from settings.
48 void limits_set_homing_axes (void);
49 void limits_set_machine_positions (axes_signals_t cycle, bool add_pulloff);
50 void limits_set_work_envelope (void);
51 
53 
55 
56 #endif
homing_mode_t
Definition: machine_limits.h:30
@ HomingMode_Pulloff
Definition: machine_limits.h:33
@ HomingMode_Seek
Definition: machine_limits.h:31
@ HomingMode_Locate
Definition: machine_limits.h:32
void limits_set_machine_positions(axes_signals_t cycle, bool add_pulloff)
status_code_t limits_go_home(axes_signals_t cycle)
Definition: machine_limits.c:515
void limits_soft_check(float *target, planner_cond_t condition)
Definition: machine_limits.c:548
bool limits_homing_required(void)
Definition: machine_limits.c:588
void limits_set_homing_axes(void)
Definition: machine_limits.c:574
axes_signals_t limit_signals_merge(limit_signals_t signals)
Definition: machine_limits.c:42
void limits_set_work_envelope(void)
Definition: machine_limits.c:114
void limits_init(void)
Definition: machine_limits.c:782
void limit_interrupt_handler(limit_signals_t state)
Definition: machine_limits.c:82
Limit switches struct, consists of four packed axes_signals_t structs in 32 bits.
Definition: nuts_bolts.h:156
Definition: nuts_bolts.h:130
Definition: planner.h:27