gnea\grbl-Mega
1.0f
Source Code Documentation ( Internal Workings )
config.h
Go to the documentation of this file.
1
/*
2
config.h - compile time configuration
3
Part of Grbl
4
5
Copyright (c) 2012-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
*/
22
// users will not need to directly modify these, but they are here for specific needs, i.e.
23
// performance tuning or adjusting to non-typical machines.
25
26
#ifndef config_h
27
#define config_h
28
#include "
grbl.h
"
29
31
//
33
// one configuration file by placing their specific defaults and pin map at the bottom of this file.
34
// If doing so, simply comment out these two defines and see instructions below.
35
#define DEFAULTS_GENERIC
36
#define CPU_MAP_2560_INITIAL
37
// #define BAUD_RATE 230400
39
#define BAUD_RATE 115200
40
// serial read data stream and are not passed to the grbl line execution parser. Select characters
42
// that do not and must not exist in the streamed g-code program. ASCII control characters may be
43
// used, if they are available per user setup. Also, extended ASCII codes (>127), which are never in
44
// g-code programs, maybe selected for interface programs.
45
//
47
48
#define CMD_RESET 0x18
49
#define CMD_STATUS_REPORT '?'
50
#define CMD_CYCLE_START '~'
51
#define CMD_FEED_HOLD '!'
52
// at character value 128 (0x80) and up to 255 (0xFF). If the normal set of realtime commands,
55
// such as status reports, feed hold, reset, and cycle start, are moved to the extended set
56
// space, serial.c's RX ISR will need to be modified to accomodate the change.
57
// #define CMD_RESET 0x80
58
// #define CMD_STATUS_REPORT 0x81
59
// #define CMD_CYCLE_START 0x82
60
// #define CMD_FEED_HOLD 0x83
61
#define CMD_SAFETY_DOOR 0x84
62
#define CMD_JOG_CANCEL 0x85
63
#define CMD_DEBUG_REPORT 0x86
64
#define CMD_FEED_OVR_RESET 0x90
65
#define CMD_FEED_OVR_COARSE_PLUS 0x91
66
#define CMD_FEED_OVR_COARSE_MINUS 0x92
67
#define CMD_FEED_OVR_FINE_PLUS 0x93
68
#define CMD_FEED_OVR_FINE_MINUS 0x94
69
#define CMD_RAPID_OVR_RESET 0x95
70
#define CMD_RAPID_OVR_MEDIUM 0x96
71
#define CMD_RAPID_OVR_LOW 0x97
72
// #define CMD_RAPID_OVR_EXTRA_LOW 0x98 //!< *NOT SUPPORTED*
73
#define CMD_SPINDLE_OVR_RESET 0x99
74
#define CMD_SPINDLE_OVR_COARSE_PLUS 0x9A
75
#define CMD_SPINDLE_OVR_COARSE_MINUS 0x9B
76
#define CMD_SPINDLE_OVR_FINE_PLUS 0x9C
77
#define CMD_SPINDLE_OVR_FINE_MINUS 0x9D
78
#define CMD_SPINDLE_OVR_STOP 0x9E
79
#define CMD_COOLANT_FLOOD_OVR_TOGGLE 0xA0
80
#define CMD_COOLANT_MIST_OVR_TOGGLE 0xA1
81
// the user to perform the homing cycle (or override the locks) before doing anything else. This is
83
// mainly a safety feature to remind the user to home, since position is unknown to Grbl.
84
#define HOMING_INIT_LOCK
85
// to quickly engage the limit switches, followed by a slower locate mode, and finished by a short
87
// pull-off motion to disengage the limit switches. The following HOMING_CYCLE_x defines are executed
88
// in order starting with suffix 0 and completes the homing routine for the specified-axes only. If
89
// an axis is omitted from the defines, it will not home, nor will the system update its position.
90
// Meaning that this allows for users with non-standard cartesian machines, such as a lathe (x then z,
91
// with no y), to configure the homing cycle behavior to their needs.
92
//
94
// cycle, but this requires some pin settings changes in cpu_map.h file. For example, the default homing
95
// cycle can share the Z limit pin with either X or Y limit pins, since they are on different cycles.
96
// By sharing a pin, this frees up a precious IO pin for other purposes. In theory, all axes limit pins
97
// may be reduced to one pin, if all axes are homed with seperate cycles, or vice versa, all three axes
98
// on separate pin, but homed in one cycle. Also, it should be noted that the function of hard limits
99
// will not be affected by pin sharing.
100
//
102
#define HOMING_CYCLE_0 (1<<Z_AXIS)
103
#define HOMING_CYCLE_1 ((1<<X_AXIS)|(1<<Y_AXIS))
104
// #define HOMING_CYCLE_2
105
// #define HOMING_CYCLE_0 ((1<<X_AXIS)|(1<<Y_AXIS))
108
// #define HOMING_CYCLE_1 (1<<Y_AXIS)
110
// This help in preventing overshoot and should improve repeatability. This value should be one or
112
// greater.
113
#define N_HOMING_LOCATE_CYCLE 1
114
// cycle is still invoked by the $H command. This is disabled by default. It's here only to address
116
// users that need to switch between a two-axis and three-axis machine. This is actually very rare.
117
// If you have a two-axis machine, DON'T USE THIS. Instead, just alter the homing cycle for two-axes.
118
// #define HOMING_SINGLE_AXIS_COMMANDS //!< Default disabled. Uncomment to enable.
120
// for professional CNC machines, regardless of where the limit switches are located. Uncomment this
121
// define to force Grbl to always set the machine origin at the homed location despite switch orientation.
122
// #define HOMING_FORCE_SET_ORIGIN //!< Uncomment to enable.
124
// and addresses are defined in settings.h. With the current settings, up to 2 startup blocks may
125
// be stored and executed in order. These startup blocks would typically be used to set the g-code
126
// parser state depending on user preferences.
127
#define N_STARTUP_LINE 2
128
// determined by realistic and commonly observed values in CNC machines. For example, position
130
// values cannot be less than 0.001mm or 0.0001in, because machines can not be physically more
131
// precise this. So, there is likely no need to change these, but you can if you need to here.
132
//
134
#define N_DECIMAL_COORDVALUE_INCH 4
135
#define N_DECIMAL_COORDVALUE_MM 3
136
#define N_DECIMAL_RATEVALUE_INCH 1
137
#define N_DECIMAL_RATEVALUE_MM 0
138
#define N_DECIMAL_SETTINGVALUE 3
139
#define N_DECIMAL_RPMVALUE 0
140
// this feature. Since the two switches are sharing a single pin, there is no way for Grbl to tell
142
// which one is enabled. This option only effects homing, where if a limit is engaged, Grbl will
143
// alarm out and force the user to manually disengage the limit switch. Otherwise, if you have one
144
// limit switch for each axis, don't enable this option. By keeping it disabled, you can perform a
145
// homing cycle while on the limit switch and not have to move the machine off of it.
146
// #define LIMITS_TWO_SWITCHES_ON_AXES
148
// through an automatically generated message. If disabled, users can still access the last probe
149
// coordinates through Grbl '$#' print parameters.
150
#define MESSAGE_PROBE_COORDINATES
151
// immediately forces a feed hold and then safely de-energizes the machine. Resuming is blocked until
153
// the safety door is re-engaged. When it is, Grbl will re-energize the machine and then resume on the
154
// previous tool path, as if nothing happened.
155
// #define ENABLE_SAFETY_DOOR_INPUT_PIN //!< Default disabled. Uncomment to enable.
157
// between restoring the spindle and coolant and resuming the cycle.
158
#define SAFETY_DOOR_SPINDLE_DELAY 4.0
159
#define SAFETY_DOOR_COOLANT_DELAY 1.0
160
// IMPORTANT: If homing is enabled, you must reconfigure the homing cycle #defines above to
162
// #define HOMING_CYCLE_0 (1<<X_AXIS) and #define HOMING_CYCLE_1 (1<<Y_AXIS)
163
//
165
// defined at (http://corexy.com/theory.html). Motors are assumed to positioned and wired exactly as
166
// described, if not, motions may move in strange directions. Grbl requires the CoreXY A and B motors
167
// have the same steps per mm internally.
168
// #define COREXY //!< Default disabled. Uncomment to enable.
170
// normally-closed switches on the specified pins, rather than the default normally-open switches.
171
//
173
// inverting only two control pins, the safety door and reset. See cpu_map.h for other bit definitions.
174
// #define INVERT_CONTROL_PIN_MASK CONTROL_MASK //!< Default disabled. Uncomment to disable.
175
// #define INVERT_CONTROL_PIN_MASK ((1<<CONTROL_SAFETY_DOOR_BIT)|(CONTROL_RESET_BIT)) //!< Default disabled.
177
// such as hard limits and homing. However, this is different from overall invert limits setting.
178
// This build option will invert only the limit pins defined here, and then the invert limits setting
179
// will be applied to all of them. This is useful when a user has a mixed set of limit pins with both
180
// normally-open(NO) and normally-closed(NC) switches installed on their machine.
181
//
183
// #define INVERT_LIMIT_PIN_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)) //!< Default disabled. Uncomment to enable.
185
// for some pre-built electronic boards.
186
// #define INVERT_SPINDLE_ENABLE_PIN //!< Default disabled. Uncomment to enable.
188
// for some pre-built electronic boards.
189
// #define INVERT_COOLANT_FLOOD_PIN //!< Default disabled. Uncomment to enable.
190
// #define INVERT_COOLANT_MIST_PIN //!< Default disabled. Note: Enable M7 mist coolant in config.h
192
// by default. This is to make it as simple as possible for new users to start using Grbl. When homing
193
// is enabled and a user has installed limit switches, Grbl will boot up in an ALARM state to indicate
194
// Grbl doesn't know its position and to force the user to home before proceeding. This option forces
195
// Grbl to always initialize into an ALARM state regardless of homing or not. This option is more for
196
// OEMs and LinuxCNC users that would like this power-cycle behavior.
197
// #define FORCE_INITIALIZATION_ALARM //!< Default disabled. Uncomment to enable.
199
// before initialization. If it detects a problem and the hard limits setting is enabled, Grbl will
200
// simply message the user to check the limits and enter an alarm state, rather than idle. Grbl will
201
// not throw an alarm message.
202
#define CHECK_LIMITS_AT_INIT
203
// ADVANCED CONFIGURATION OPTIONS:
206
// #define DEBUG //!< Uncomment to enable. Default disabled.
208
// allowable override values and the coarse and fine increments per command received. Please
209
// note the allowable values in the descriptions following each define.
210
#define DEFAULT_FEED_OVERRIDE 100
211
#define MAX_FEED_RATE_OVERRIDE 200
212
#define MIN_FEED_RATE_OVERRIDE 10
213
#define FEED_OVERRIDE_COARSE_INCREMENT 10
214
#define FEED_OVERRIDE_FINE_INCREMENT 1
215
216
#define DEFAULT_RAPID_OVERRIDE 100
217
#define RAPID_OVERRIDE_MEDIUM 50
218
#define RAPID_OVERRIDE_LOW 25
219
// #define RAPID_OVERRIDE_EXTRA_LOW 5
220
221
#define DEFAULT_SPINDLE_SPEED_OVERRIDE 100
222
#define MAX_SPINDLE_SPEED_OVERRIDE 200
223
#define MIN_SPINDLE_SPEED_OVERRIDE 10
224
#define SPINDLE_OVERRIDE_COARSE_INCREMENT 10
225
#define SPINDLE_OVERRIDE_FINE_INCREMENT 1
226
// This compile-time option includes the restoring of the feed, rapid, and spindle speed override values
228
// to their default values at program end.
229
#define RESTORE_OVERRIDES_AFTER_PROGRAM_END
230
// fields from the report. This caused issues for GUI developers, who've had to manage several scenarios
232
// and configurations. The increased efficiency of the new reporting style allows for all data fields to
233
// be sent without potential performance issues.
234
//
236
// situation demands it, but be aware GUIs may depend on this data. If disabled, it may not be compatible.
237
#define REPORT_FIELD_BUFFER_STATE
238
#define REPORT_FIELD_PIN_STATE
239
#define REPORT_FIELD_CURRENT_FEED_SPEED
240
#define REPORT_FIELD_WORK_COORD_OFFSET
241
#define REPORT_FIELD_OVERRIDES
242
#define REPORT_FIELD_LINE_NUMBERS
243
// change often. The following macros configures how many times a status report needs to be called before
245
// the associated data is refreshed and included in the status report. However, if one of these value
246
// changes, Grbl will automatically include this data in the next status report, regardless of what the
247
// count is at the time. This helps reduce the communication overhead involved with high frequency reporting
248
// and agressive streaming. There is also a busy and an idle refresh count, which sets up Grbl to send
249
// refreshes more often when its not doing anything important. With a good GUI, this data doesn't need
250
// to be refreshed very often, on the order of a several seconds.
251
//
253
#define REPORT_OVR_REFRESH_BUSY_COUNT 20
254
#define REPORT_OVR_REFRESH_IDLE_COUNT 10
255
#define REPORT_WCO_REFRESH_BUSY_COUNT 30
256
#define REPORT_WCO_REFRESH_IDLE_COUNT 10
257
// acceleration, particularly noticeable on machines that run at very high feedrates, but may negatively
259
// impact performance. The correct value for this parameter is machine dependent, so it's advised to
260
// set this only as high as needed. Approximate successful values can widely range from 50 to 200 or more.
261
//
263
// When increasing this value, this stores less overall time in the segment buffer and vice versa. Make
264
// certain the step segment buffer is increased/decreased to account for these changes.
265
#define ACCELERATION_TICKS_PER_SECOND 100
266
// smoothing the stepping of multi-axis motions. This feature smooths motion particularly at low step
268
// frequencies below 10kHz, where the aliasing between axes of multi-axis motions can cause audible
269
// noise and shake your machine. At even lower step frequencies, AMASS adapts and provides even better
270
// step smoothing. See stepper.c for more details on the AMASS system works.
271
#define ADAPTIVE_MULTI_AXIS_STEP_SMOOTHING
272
// check in the settings module to prevent settings values that will exceed this limitation. The maximum
274
// step rate is strictly limited by the CPU speed and will change if something other than an AVR running
275
// at 16MHz is used.
276
//
278
// #define MAX_STEP_RATE_HZ 30000 //!< Hz
280
// enabled. This simplifies the wiring for users by requiring only a switch connected to ground,
281
// although its recommended that users take the extra step of wiring in low-pass filter to reduce
282
// electrical noise detected by the pin. If the user inverts the pin in Grbl settings, this just flips
283
// which high or low reading indicates an active signal. In normal operation, this means the user
284
// needs to connect a normal-open switch, but if inverted, this means the user should connect a
285
// normal-closed switch.
286
// The following options disable the internal pull-up resistors, sets the pins to a normal-low
287
// operation, and switches must be now connect to Vcc instead of ground. This also flips the meaning
288
// of the invert pin Grbl setting, where an inverted setting now means the user should connect a
289
// normal-open switch and vice versa.
290
//
292
// WARNING: When the pull-ups are disabled, this requires additional wiring with pull-down resistors!
293
//#define DISABLE_LIMIT_PIN_PULL_UP
294
//#define DISABLE_PROBE_PIN_PULL_UP
295
//#define DISABLE_CONTROL_PIN_PULL_UP
297
// the selected axis with the tool oriented toward the negative direction. In other words, a positive
298
// tool length offset value is subtracted from the current location.
299
#define TOOL_LENGTH_OFFSET_AXIS Z_AXIS
300
// The PWM pin will still read 0V when the spindle is disabled. Most users will not need this option, but
302
// it may be useful in certain scenarios. This minimum PWM settings coincides with the spindle rpm minimum
303
// setting, like rpm max to max PWM. This is handy if you need a larger voltage difference between 0V disabled
304
// and the voltage set by the minimum PWM for minimum rpm. This difference is 0.02V per PWM value. So, when
305
// minimum PWM is at 1, only 0.02 volts separate enabled and disabled. At PWM 5, this would be 0.1V. Keep
306
// in mind that you will begin to lose PWM resolution with increased minimum PWM values, since you have less
307
// and less range over the total 255 PWM levels to signal different spindle speeds.
308
//
310
// #define SPINDLE_PWM_MIN_VALUE 5 //!< Default disabled. Uncomment to enable. Must be greater than zero. Integer (1-255).
312
// removed, capitalized letters, no comments) and is to be immediately executed by Grbl. Echoes will not be
313
// sent upon a line buffer overflow, but should for all normal lines sent to Grbl. For example, if a user
314
// sendss the line 'g1 x1.032 y2.45 (test comment)', Grbl will echo back in the form '[echo: G1X1.032Y2.45]'.
315
//
317
// performance. If absolutely needed for normal operation, the serial write buffer should be greatly increased
318
// to help minimize transmission waiting within the serial write protocol.
319
// #define REPORT_ECHO_LINE_RECEIVED //!< Default disabled. Uncomment to enable.
321
// every buffer block junction, except for starting from rest and end of the buffer, which are always
322
// zero. This value controls how fast the machine moves through junctions with no regard for acceleration
323
// limits or angle between neighboring block line move directions. This is useful for machines that can't
324
// tolerate the tool dwelling for a split second, i.e. 3d printers or laser cutters. If used, this value
325
// should not be much greater than zero or to the minimum value necessary for the machine to work.
326
#define MINIMUM_JUNCTION_SPEED 0.0
327
// value. This also ensures that a planned motion always completes and accounts for any floating-point
329
// round-off errors. Although not recommended, a lower value than 1.0 mm/min will likely work in smaller
330
// machines, perhaps to 0.1mm/min, but your success may vary based on multiple factors.
331
#define MINIMUM_FEED_RATE 1.0
332
// correction with expensive sin() and cos() calcualtions. This parameter maybe decreased if there
334
// are issues with the accuracy of the arc generations, or increased if arc execution is getting
335
// bogged down by too many trig calculations.
336
#define N_ARC_CORRECTION 12
337
// errors when arc at semi-circles(pi) or full-circles(2*pi). Offset-based arcs are much more accurate
339
// but still have a problem when arcs are full-circles (2*pi). This define accounts for the floating
340
// point issues when offset-based arcs are commanded as full circles, but get interpreted as extremely
341
// small arcs with around machine epsilon (1.2e-7rad) due to numerical round-off and precision issues.
342
// This define value sets the machine epsilon cutoff to determine if the arc is a full-circle or not.
343
//
345
// much greater than this. The default setting should capture most, if not all, full arc error situations.
346
#define ARC_ANGULAR_TRAVEL_EPSILON 5E-7
347
// a maximum time delay of roughly 55 minutes, more than enough for most any application. Increasing
349
// this delay will increase the maximum dwell time linearly, but also reduces the responsiveness of
350
// run-time command executions, like status reports, since these are performed between each dwell
351
// time step. Also, keep in mind that the Arduino delay timer is not very accurate for long delays.
352
#define DWELL_TIME_STEP 50
353
// another interrupt (Timer2 compare) to manage it. The main Grbl interrupt (Timer1 compare)
355
// sets the direction pins, and does not immediately set the stepper pins, as it would in
356
// normal operation. The Timer2 compare fires next to set the stepper pins after the step
357
// pulse delay time, and Timer2 overflow will complete the step pulse, except now delayed
358
// by the step pulse time plus the step pulse delay. (Thanks langwadt for the idea!)
359
//
361
// user-supplied step pulse time, the total time must not exceed 127us. Reported successful
362
// values for certain setups have ranged from 5 to 20us.
363
// #define STEP_PULSE_DELAY 10 //!< Step pulse delay in microseconds. Default disabled.
365
// majority of RAM that Grbl uses is based on this buffer size. Only increase if there is extra
366
// available RAM, like when re-compiling for a Mega or Sanguino. Or decrease if the Arduino
367
// begins to crash due to the lack of available RAM or if the CPU is having trouble keeping
368
// up with planning new incoming motions as they are executed.
369
// #define BLOCK_BUFFER_SIZE 36 //!< Uncomment to override default in planner.h.
371
// and the planner blocks. Each segment is set of steps executed at a constant velocity over a
372
// fixed time defined by ACCELERATION_TICKS_PER_SECOND. They are computed such that the planner
373
// block velocity profile is traced exactly. The size of this buffer governs how much step
374
// execution lead time there is for other Grbl processes have to compute and do their thing
375
// before having to come back and refill this buffer, currently at ~50msec of step moves.
376
// #define SEGMENT_BUFFER_SIZE 10 //!< Uncomment to override default in stepper.h.
378
// each of the startup blocks, as they are each stored as a string of this size. Make sure
379
// to account for the available EEPROM at the defined memory address in settings.h and for
380
// the number of desired startup blocks.
381
//
383
// can be too small and g-code blocks can get truncated. Officially, the g-code standards
384
// support up to 256 characters. In future versions, this default will be increased, when
385
// we know how much extra memory space we can re-invest into this.
386
// #define LINE_BUFFER_SIZE 256 //!< Uncomment to override default in protocol.h
387
388
// Serial send and receive buffer size. The receive buffer is often used as another streaming
389
// buffer to store incoming blocks to be processed by Grbl when its ready. Most streaming
390
// interfaces will character count and track each block send to each block response. So,
391
// increase the receive buffer if a deeper receive buffer is needed for streaming and avaiable
392
// memory allows. The send buffer primarily handles messages in Grbl. Only increase if large
393
// messages are sent and Grbl begins to stall, waiting to send the rest of the message.
394
//
396
// #define RX_BUFFER_SIZE 255 //!< Uncomment to override defaults in serial.h
397
// #define TX_BUFFER_SIZE 255
399
// info. This size differs from the LINE_BUFFER_SIZE as the EEPROM is usually limited in size.
400
//
402
// these string storage locations won't corrupt one another.
403
// #define EEPROM_LINE_SIZE 80 //!< Uncomment to override defaults in settings.h
404
405
// Toggles XON/XOFF software flow control for serial communications. Not officially supported
406
// due to problems involving the Atmega8U2 USB-to-serial chips on current Arduinos. The firmware
407
// on these chips do not support XON/XOFF flow control characters and the intermediate buffer
408
// in the chips cause latency and overflow problems with standard terminal programs. However,
409
// using specifically-programmed UI's to manage this latency problem has been confirmed to work.
410
// As well as, older FTDI FT232RL-based Arduinos(Duemilanove) are known to work with standard
411
// terminal programs since their firmware correctly manage these XON/XOFF characters. In any
412
// case, please report any successes to grbl administrators!
413
// #define ENABLE_XONXOFF //!< Default disabled. Uncomment to enable.
415
// monitoring the hard limit switch pins will enable the Arduino's watchdog timer to re-check
416
// the limit pin state after a delay of about 32msec. This can help with CNC machines with
417
// problematic false triggering of their hard limit switches, but it WILL NOT fix issues with
418
// electrical interference on the signal cables from external sources. It's recommended to first
419
// use shielded signal cables with their shielding connected to ground (old USB/computer cables
420
// work well and are cheap to find) and wire in a low-pass circuit into each limit pin.
421
// #define ENABLE_SOFTWARE_DEBOUNCE //!< Default disabled. Uncomment to enable.
423
// the position to the probe target, when enabled sets the position to the start position.
424
// #define SET_CHECK_MODE_PROBE_TO_START //!< Default disabled. Uncomment to enable.
426
// change inside the hard limit ISR routine. By default, Grbl will trigger the hard limits
427
// alarm upon any pin change, since bouncing switches can cause a state check like this to
428
// misread the pin. When hard limits are triggered, they should be 100% reliable, which is the
429
// reason that this option is disabled by default. Only if your system/electronics can guarantee
430
// that the switches don't bounce, we recommend enabling this option. This will help prevent
431
// triggering a hard limit when the machine disengages from the switch.
432
//
434
// #define HARD_LIMIT_FORCE_STATE_CHECK //!< Default disabled. Uncomment to enable.
436
// homing cycle to ensure the limit switches are engaged and cleared through each phase of
437
// the cycle. The search phase uses the axes max-travel setting times the SEARCH_SCALAR to
438
// determine distance to look for the limit switch. Once found, the locate phase begins and
439
// uses the homing pull-off distance setting times the LOCATE_SCALAR to pull-off and re-engage
440
// the limit switch.
441
//
443
// #define HOMING_AXIS_SEARCH_SCALAR 1.5 //!< Uncomment to override defaults in limits.c.
444
// #define HOMING_AXIS_LOCATE_SCALAR 10.0 //!< Uncomment to override defaults in limits.c.
446
// these commands may be undesirable. Simply comment the desired macro to disable it.
447
//
449
#define ENABLE_RESTORE_EEPROM_WIPE_ALL
450
#define ENABLE_RESTORE_EEPROM_DEFAULT_SETTINGS
451
#define ENABLE_RESTORE_EEPROM_CLEAR_PARAMETERS
452
// the settings or other EEPROM data structure changes between Grbl versions, Grbl will automatically
454
// wipe and restore the EEPROM. This macro controls what data is wiped and restored. This is useful
455
// particularily for OEMs that need to retain certain data. For example, the BUILD_INFO string can be
456
// written into the Arduino EEPROM via a seperate .INO sketch to contain product data. Altering this
457
// macro to not restore the build info EEPROM will ensure this data is retained after firmware upgrades.
458
//
460
// #define SETTINGS_RESTORE_ALL (SETTINGS_RESTORE_DEFAULTS | SETTINGS_RESTORE_PARAMETERS | SETTINGS_RESTORE_STARTUP_LINES | SETTINGS_RESTORE_BUILD_INFO)
462
// be placed into EEPROM via external means with a valid checksum value. This macro option is useful
463
// to prevent this data from being over-written by a user, when used to store OEM product data.
464
//
466
// the SETTING_RESTORE_ALL macro above and remove SETTINGS_RESTORE_BUILD_INFO from the mask.
467
//
469
#define ENABLE_BUILD_INFO_WRITE_COMMAND
470
// the stepper ISRs and serial comm ISRs. In the event of a long EEPROM write, this ISR pause can
472
// cause active stepping to lose position and serial receive data to be lost. This configuration
473
// option forces the planner buffer to completely empty whenever the EEPROM is written to prevent
474
// any chance of lost steps.
475
// However, this doesn't prevent issues with lost serial RX data during an EEPROM write, especially
476
// if a GUI is premptively filling up the serial RX buffer simultaneously. It's highly advised for
477
// GUIs to flag these gcodes (G10,G28.1,G30.1) to always wait for an 'ok' after a block containing
478
// one of these commands before sending more data to eliminate this issue.
479
//
481
// coordinate set g-code commands (G10,G28/30.1) are not, since they are part of an active streaming
482
// job. At this time, this option only forces a planner buffer sync with these g-code commands.
483
#define FORCE_BUFFER_SYNC_DURING_EEPROM_WRITE
484
// may not correlate to what is executing, because `WPos:` is based on the g-code parser state, which
486
// can be several motions behind. This option forces the planner buffer to empty, sync, and stop
487
// motion whenever there is a command that alters the work coordinate offsets `G10,G43.1,G92,G54-59`.
488
// This is the simplest way to ensure `WPos:` is always correct. Fortunately, it's exceedingly rare
489
// that any of these commands are used need continuous motions through them.
490
#define FORCE_BUFFER_SYNC_DURING_WCO_CHANGE
491
// may be different than some pro-class machine control, it's arguable that it should be this way.
493
// Most probe sensors produce different levels of error that is dependent on rate of speed. By
494
// keeping probing cycles to their programmed feed rates, the probe sensor should be a lot more
495
// repeatable. If needed, you can disable this behavior by uncommenting the define below.
496
// #define ALLOW_FEED_OVERRIDE_DURING_PROBE_CYCLES //!< Default disabled. Uncomment to enable.
498
// that desire this feature for their integrated machines. At the moment, Grbl assumes that
499
// the parking motion only involves one axis, although the parking implementation was written
500
// to be easily refactored for any number of motions on different axes by altering the parking
501
// source code. At this time, Grbl only supports parking one axis (typically the Z-axis) that
502
// moves in the positive direction upon retracting and negative direction upon restoring position.
503
// The motion executes with a slow pull-out retraction motion, power-down, and a fast park.
504
// Restoring to the resume position follows these set motions in reverse: fast restore to
505
// pull-out position, power-up with a time-out, and plunge back to the original position at the
506
// slower pull-out rate.
507
//
509
// does not work with HOMING_FORCE_SET_ORIGIN enabled. Parking motion also moves only in
510
// positive direction.
511
// #define PARKING_ENABLE //!< Default disabled. Uncomment to enable
513
#define PARKING_AXIS Z_AXIS
514
#define PARKING_TARGET -5.0
515
#define PARKING_RATE 500.0
516
#define PARKING_PULLOUT_RATE 100.0
517
#define PARKING_PULLOUT_INCREMENT 5.0
518
// Must be positive value or equal to zero.
519
// is not actively moving or receiving any commands, a sleep timer will start. If any data or commands
521
// are received, the sleep timer will reset and restart until the above condition are not satisfied.
522
// If the sleep timer elaspes, Grbl will immediately execute the sleep mode by shutting down the spindle
523
// and coolant and entering a safe sleep state. If parking is enabled, Grbl will park the machine as
524
// well. While in sleep mode, only a hard/soft reset will exit it and the job will be unrecoverable.
525
//
527
// keep Grbl from sleeping, employ a stream of '?' status report commands as a connection "heartbeat".
528
// #define SLEEP_ENABLE //!< Default disabled. Uncomment to enable.
529
#define SLEEP_DURATION 5.0
530
// override immediately after coming to a stop. However, this also means that the laser still may
532
// be reenabled by disabling the spindle stop override, if needed. This is purely a safety feature
533
// to ensure the laser doesn't inadvertently remain powered while at a stop and cause a fire.
534
#define DISABLE_LASER_DURING_HOLD
535
536
544
547
548
#endif
grbl.h
grbl
config.h
Generated by
1.8.10