Organizational updates. Mega2560 support moved.
- Mega2560 support has been moved to the Grbl-Mega [project](http://github.com/gnea/grbl-Mega/) to clean up the code and make future developments easier with increased flash and RAM. All new developments between the 328p and Mega2560 will be synced when it makes sense to. - OEM single file compile configuration option. Before OEMs needed to alter three files. Provided a way to just alter the config.h file to contain everything for a particular Grbl build. See config.h for more details. - Removed defaults and cpu_map directories and reverted back to defaults.h and cpu_map.h to contain all definitions. This should help reduce some headaches and the previous implementation inadvertently created. Also, it makes the single file config.h possible. - Moved (and tweaked) the invert control pin mask define and placed into config.h, rather than in the cpu_map.h file. Makes more sense there.
This commit is contained in:
parent
5bfc3a1945
commit
0746a5a1d7
@ -42,6 +42,8 @@ Grbl includes full acceleration management with look ahead. That means the contr
|
|||||||
|
|
||||||
- Updated G28 and G30 behavior from NIST to LinuxCNC g-code description. In short, if a intermediate motion is specified, only the axes specified will move to the stored coordinates, not all axes as before.
|
- Updated G28 and G30 behavior from NIST to LinuxCNC g-code description. In short, if a intermediate motion is specified, only the axes specified will move to the stored coordinates, not all axes as before.
|
||||||
|
|
||||||
|
- **NOTE:** Arduino Mega2560 support has been moved to an active, official Grbl-Mega [project](http://www.github.com/gnea/grbl-Mega/). All new developments here and there will be synced when it makes sense to.
|
||||||
|
|
||||||
- A few bug fixes and lots of refactoring to make the code more efficient and flexible.
|
- A few bug fixes and lots of refactoring to make the code more efficient and flexible.
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
----------------
|
||||||
|
Date: 2016-03-19
|
||||||
|
Author: Sonny Jeon
|
||||||
|
Subject: No variable spindle and spindle speed fix.
|
||||||
|
|
||||||
|
- Soft limit errors were stuck in a feed hold without notifying the
|
||||||
|
user why it was in a hold. When resumed, the soft limit error would
|
||||||
|
kick in. Issue should be fixed to behave as intended to automatically
|
||||||
|
hold and issue a soft limit alarm once the machine has come to a stop.
|
||||||
|
|
||||||
|
|
||||||
----------------
|
----------------
|
||||||
Date: 2016-03-11
|
Date: 2016-03-11
|
||||||
Author: Sonny Jeon
|
Author: Sonny Jeon
|
||||||
|
@ -30,16 +30,16 @@
|
|||||||
#include "grbl.h" // For Arduino IDE compatibility.
|
#include "grbl.h" // For Arduino IDE compatibility.
|
||||||
|
|
||||||
|
|
||||||
// Default settings. Used when resetting EEPROM. Change to desired name in defaults.h
|
// Define CPU pin map and default settings.
|
||||||
|
// NOTE: OEMs can avoid the need to maintain/update the defaults.h and cpu_map.h files and use only
|
||||||
|
// one configuration file by placing their specific defaults and pin map at the bottom of this file.
|
||||||
|
// If doing so, simply comment out these two defines and see instructions below.
|
||||||
#define DEFAULTS_GENERIC
|
#define DEFAULTS_GENERIC
|
||||||
|
#define CPU_MAP_ATMEGA328P // Arduino Uno CPU
|
||||||
|
|
||||||
// Serial baud rate
|
// Serial baud rate
|
||||||
#define BAUD_RATE 115200
|
#define BAUD_RATE 115200
|
||||||
|
|
||||||
// Default cpu mappings. Grbl officially supports the Arduino Uno only. Other processor types
|
|
||||||
// may exist from user-supplied templates or directly user-defined in cpu_map.h
|
|
||||||
#define CPU_MAP_ATMEGA328P // Arduino Uno CPU
|
|
||||||
|
|
||||||
// Define realtime command special characters. These characters are 'picked-off' directly from the
|
// Define realtime command special characters. These characters are 'picked-off' directly from the
|
||||||
// serial read data stream and are not passed to the grbl line execution parser. Select characters
|
// serial read data stream and are not passed to the grbl line execution parser. Select characters
|
||||||
// that do not and must not exist in the streamed g-code program. ASCII control characters may be
|
// that do not and must not exist in the streamed g-code program. ASCII control characters may be
|
||||||
@ -151,11 +151,12 @@
|
|||||||
// have the same steps per mm internally.
|
// have the same steps per mm internally.
|
||||||
// #define COREXY // Default disabled. Uncomment to enable.
|
// #define COREXY // Default disabled. Uncomment to enable.
|
||||||
|
|
||||||
// Inverts pin logic of the control command pins. This essentially means when this option is enabled
|
// Inverts pin logic of the control command pins based on a mask. This essentially means you can use
|
||||||
// you can use normally-closed switches, rather than the default normally-open switches.
|
// normally-closed switches on the specified pins, rather than the default normally-open switches.
|
||||||
// NOTE: If you require individual control pins inverted, keep this macro disabled and simply alter
|
// NOTE: The top option will mask and invert all control pins. The bottom option is an example of
|
||||||
// the CONTROL_INVERT_MASK definition in cpu_map.h files.
|
// inverting only two control pins, the safety door and reset. See cpu_map.h for other bit definitions.
|
||||||
// #define INVERT_ALL_CONTROL_PINS // Default disabled. Uncomment to enable.
|
// #define INVERT_CONTROL_PIN_MASK CONTROL_MASK // Default disabled. Uncomment to disable.
|
||||||
|
// #define INVERT_CONTROL_PIN_MASK ((1<<CONTROL_SAFETY_DOOR_BIT)|(CONTROL_RESET_BIT)) // Default disabled.
|
||||||
|
|
||||||
// Inverts select limit pin states based on the following mask. This effects all limit pin functions,
|
// Inverts select limit pin states based on the following mask. This effects all limit pin functions,
|
||||||
// such as hard limits and homing. However, this is different from overall invert limits setting.
|
// such as hard limits and homing. However, this is different from overall invert limits setting.
|
||||||
@ -165,7 +166,6 @@
|
|||||||
// NOTE: PLEASE DO NOT USE THIS, unless you have a situation that needs it.
|
// NOTE: PLEASE DO NOT USE THIS, unless you have a situation that needs it.
|
||||||
// #define INVERT_LIMIT_PIN_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)) // Default disabled. Uncomment to enable.
|
// #define INVERT_LIMIT_PIN_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)) // Default disabled. Uncomment to enable.
|
||||||
|
|
||||||
|
|
||||||
// Inverts the spindle enable pin from low-disabled/high-enabled to low-enabled/high-disabled. Useful
|
// Inverts the spindle enable pin from low-disabled/high-enabled to low-enabled/high-disabled. Useful
|
||||||
// for some pre-built electronic boards.
|
// for some pre-built electronic boards.
|
||||||
// NOTE: If VARIABLE_SPINDLE is enabled(default), this option has no effect as the PWM output and
|
// NOTE: If VARIABLE_SPINDLE is enabled(default), this option has no effect as the PWM output and
|
||||||
@ -443,7 +443,18 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------------
|
/* ---------------------------------------------------------------------------------------
|
||||||
|
OEM Single File Configuration Option
|
||||||
|
|
||||||
|
Instructions: Paste the cpu_map and default setting definitions below without an enclosing
|
||||||
|
#ifdef. Comment out the CPU_MAP_xxx and DEFAULT_xxx defines at the top of this file, and
|
||||||
|
the compiler will ignore the contents of defaults.h and cpu_map.h and use the definitions
|
||||||
|
below.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Paste CPU_MAP definitions here.
|
||||||
|
|
||||||
|
// Paste default settings definitions here.
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
128
grbl/cpu_map.h
128
grbl/cpu_map.h
@ -18,23 +18,133 @@
|
|||||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* The cpu_map.h files serve as a central pin mapping selection file for different processor
|
/* The cpu_map.h files serve as a central pin mapping selection file for different
|
||||||
types, i.e. AVR 328p or AVR Mega 2560. Each processor has its own pin mapping file.
|
processor types or alternative pin layouts. This version of Grbl officially supports
|
||||||
(i.e. cpu_map_atmega328p.h) Grbl officially supports the Arduino Uno, but the
|
only the Arduino Mega328p. */
|
||||||
other supplied pin mappings are supplied by users, so your results may vary. */
|
|
||||||
|
|
||||||
// NOTE: With new processors, only add the define name and filename to use.
|
|
||||||
|
|
||||||
#ifndef cpu_map_h
|
#ifndef cpu_map_h
|
||||||
#define cpu_map_h
|
#define cpu_map_h
|
||||||
|
|
||||||
|
|
||||||
#ifdef CPU_MAP_ATMEGA328P // (Arduino Uno) Officially supported by Grbl.
|
#ifdef CPU_MAP_ATMEGA328P // (Arduino Uno) Officially supported by Grbl.
|
||||||
#include "cpu_map/cpu_map_atmega328p.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CPU_MAP_ATMEGA2560 // (Arduino Mega 2560) Working @EliteEng
|
// Define serial port pins and interrupt vectors.
|
||||||
#include "cpu_map/cpu_map_atmega2560.h"
|
#define SERIAL_RX USART_RX_vect
|
||||||
|
#define SERIAL_UDRE USART_UDRE_vect
|
||||||
|
|
||||||
|
// Define step pulse output pins. NOTE: All step bit pins must be on the same port.
|
||||||
|
#define STEP_DDR DDRD
|
||||||
|
#define STEP_PORT PORTD
|
||||||
|
#define X_STEP_BIT 2 // Uno Digital Pin 2
|
||||||
|
#define Y_STEP_BIT 3 // Uno Digital Pin 3
|
||||||
|
#define Z_STEP_BIT 4 // Uno Digital Pin 4
|
||||||
|
#define STEP_MASK ((1<<X_STEP_BIT)|(1<<Y_STEP_BIT)|(1<<Z_STEP_BIT)) // All step bits
|
||||||
|
|
||||||
|
// Define step direction output pins. NOTE: All direction pins must be on the same port.
|
||||||
|
#define DIRECTION_DDR DDRD
|
||||||
|
#define DIRECTION_PORT PORTD
|
||||||
|
#define X_DIRECTION_BIT 5 // Uno Digital Pin 5
|
||||||
|
#define Y_DIRECTION_BIT 6 // Uno Digital Pin 6
|
||||||
|
#define Z_DIRECTION_BIT 7 // Uno Digital Pin 7
|
||||||
|
#define DIRECTION_MASK ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits
|
||||||
|
|
||||||
|
// Define stepper driver enable/disable output pin.
|
||||||
|
#define STEPPERS_DISABLE_DDR DDRB
|
||||||
|
#define STEPPERS_DISABLE_PORT PORTB
|
||||||
|
#define STEPPERS_DISABLE_BIT 0 // Uno Digital Pin 8
|
||||||
|
#define STEPPERS_DISABLE_MASK (1<<STEPPERS_DISABLE_BIT)
|
||||||
|
|
||||||
|
// Define homing/hard limit switch input pins and limit interrupt vectors.
|
||||||
|
// NOTE: All limit bit pins must be on the same port, but not on a port with other input pins (CONTROL).
|
||||||
|
#define LIMIT_DDR DDRB
|
||||||
|
#define LIMIT_PIN PINB
|
||||||
|
#define LIMIT_PORT PORTB
|
||||||
|
#define X_LIMIT_BIT 1 // Uno Digital Pin 9
|
||||||
|
#define Y_LIMIT_BIT 2 // Uno Digital Pin 10
|
||||||
|
#ifdef VARIABLE_SPINDLE // Z Limit pin and spindle enabled swapped to access hardware PWM on Pin 11.
|
||||||
|
#define Z_LIMIT_BIT 4 // Uno Digital Pin 12
|
||||||
|
#else
|
||||||
|
#define Z_LIMIT_BIT 3 // Uno Digital Pin 11
|
||||||
|
#endif
|
||||||
|
#define LIMIT_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)|(1<<Z_LIMIT_BIT)) // All limit bits
|
||||||
|
#define LIMIT_INT PCIE0 // Pin change interrupt enable pin
|
||||||
|
#define LIMIT_INT_vect PCINT0_vect
|
||||||
|
#define LIMIT_PCMSK PCMSK0 // Pin change interrupt register
|
||||||
|
|
||||||
|
// Define spindle enable and spindle direction output pins.
|
||||||
|
#define SPINDLE_ENABLE_DDR DDRB
|
||||||
|
#define SPINDLE_ENABLE_PORT PORTB
|
||||||
|
// Z Limit pin and spindle PWM/enable pin swapped to access hardware PWM on Pin 11.
|
||||||
|
#ifdef VARIABLE_SPINDLE
|
||||||
|
#ifdef USE_SPINDLE_DIR_AS_ENABLE_PIN
|
||||||
|
// If enabled, spindle direction pin now used as spindle enable, while PWM remains on D11.
|
||||||
|
#define SPINDLE_ENABLE_BIT 5 // Uno Digital Pin 13 (NOTE: D13 can't be pulled-high input due to LED.)
|
||||||
|
#else
|
||||||
|
#define SPINDLE_ENABLE_BIT 3 // Uno Digital Pin 11
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define SPINDLE_ENABLE_BIT 4 // Uno Digital Pin 12
|
||||||
|
#endif
|
||||||
|
#ifndef USE_SPINDLE_DIR_AS_ENABLE_PIN
|
||||||
|
#define SPINDLE_DIRECTION_DDR DDRB
|
||||||
|
#define SPINDLE_DIRECTION_PORT PORTB
|
||||||
|
#define SPINDLE_DIRECTION_BIT 5 // Uno Digital Pin 13 (NOTE: D13 can't be pulled-high input due to LED.)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Define flood and mist coolant enable output pins.
|
||||||
|
// NOTE: Uno analog pins 4 and 5 are reserved for an i2c interface, and may be installed at
|
||||||
|
// a later date if flash and memory space allows.
|
||||||
|
#define COOLANT_FLOOD_DDR DDRC
|
||||||
|
#define COOLANT_FLOOD_PORT PORTC
|
||||||
|
#define COOLANT_FLOOD_BIT 3 // Uno Analog Pin 3
|
||||||
|
#ifdef ENABLE_M7 // Mist coolant disabled by default. See config.h to enable/disable.
|
||||||
|
#define COOLANT_MIST_DDR DDRC
|
||||||
|
#define COOLANT_MIST_PORT PORTC
|
||||||
|
#define COOLANT_MIST_BIT 4 // Uno Analog Pin 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Define user-control controls (cycle start, reset, feed hold) input pins.
|
||||||
|
// NOTE: All CONTROLs pins must be on the same port and not on a port with other input pins (limits).
|
||||||
|
#define CONTROL_DDR DDRC
|
||||||
|
#define CONTROL_PIN PINC
|
||||||
|
#define CONTROL_PORT PORTC
|
||||||
|
#define CONTROL_RESET_BIT 0 // Uno Analog Pin 0
|
||||||
|
#define CONTROL_FEED_HOLD_BIT 1 // Uno Analog Pin 1
|
||||||
|
#define CONTROL_CYCLE_START_BIT 2 // Uno Analog Pin 2
|
||||||
|
#define CONTROL_SAFETY_DOOR_BIT 1 // Uno Analog Pin 1 NOTE: Safety door is shared with feed hold. Enabled by config define.
|
||||||
|
#define CONTROL_INT PCIE1 // Pin change interrupt enable pin
|
||||||
|
#define CONTROL_INT_vect PCINT1_vect
|
||||||
|
#define CONTROL_PCMSK PCMSK1 // Pin change interrupt register
|
||||||
|
#define CONTROL_MASK ((1<<CONTROL_RESET_BIT)|(1<<CONTROL_FEED_HOLD_BIT)|(1<<CONTROL_CYCLE_START_BIT)|(1<<CONTROL_SAFETY_DOOR_BIT))
|
||||||
|
#define CONTROL_INVERT_MASK CONTROL_MASK // May be re-defined to only invert certain control pins.
|
||||||
|
|
||||||
|
// Define probe switch input pin.
|
||||||
|
#define PROBE_DDR DDRC
|
||||||
|
#define PROBE_PIN PINC
|
||||||
|
#define PROBE_PORT PORTC
|
||||||
|
#define PROBE_BIT 5 // Uno Analog Pin 5
|
||||||
|
#define PROBE_MASK (1<<PROBE_BIT)
|
||||||
|
|
||||||
|
// Start of PWM & Stepper Enabled Spindle
|
||||||
|
#ifdef VARIABLE_SPINDLE
|
||||||
|
// Advanced Configuration Below You should not need to touch these variables
|
||||||
|
#define SPINDLE_PWM_MAX_VALUE 255.0 // Don't change. 328p fast PWM mode fixes top value as 255.
|
||||||
|
#define SPINDLE_TCCRA_REGISTER TCCR2A
|
||||||
|
#define SPINDLE_TCCRB_REGISTER TCCR2B
|
||||||
|
#define SPINDLE_OCR_REGISTER OCR2A
|
||||||
|
#define SPINDLE_COMB_BIT COM2A1
|
||||||
|
|
||||||
|
// 1/8 Prescaler, 8-bit Fast PWM mode. Translates to about 7.8kHz PWM frequency.
|
||||||
|
#define SPINDLE_TCCRA_INIT_MASK ((1<<WGM20) | (1<<WGM21))
|
||||||
|
#define SPINDLE_TCCRB_INIT_MASK (1<<CS21)
|
||||||
|
|
||||||
|
// NOTE: On the 328p, these must be the same as the SPINDLE_ENABLE settings.
|
||||||
|
#define SPINDLE_PWM_DDR DDRB
|
||||||
|
#define SPINDLE_PWM_PORT PORTB
|
||||||
|
#define SPINDLE_PWM_BIT 3 // Uno Digital Pin 11
|
||||||
|
#endif // End of VARIABLE_SPINDLE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,140 +0,0 @@
|
|||||||
/*
|
|
||||||
cpu_map_atmega2560.h - CPU and pin mapping configuration file
|
|
||||||
Part of Grbl
|
|
||||||
|
|
||||||
Copyright (c) 2012-2015 Sungeun K. Jeon
|
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Grbl is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* This cpu_map file serves as a central pin mapping settings file for AVR Mega 2560 */
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef GRBL_PLATFORM
|
|
||||||
#error "cpu_map already defined: GRBL_PLATFORM=" GRBL_PLATFORM
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define GRBL_PLATFORM "Atmega2560"
|
|
||||||
|
|
||||||
// Serial port pins
|
|
||||||
#define SERIAL_RX USART0_RX_vect
|
|
||||||
#define SERIAL_UDRE USART0_UDRE_vect
|
|
||||||
|
|
||||||
// Increase Buffers to make use of extra SRAM
|
|
||||||
//#define RX_BUFFER_SIZE 256
|
|
||||||
//#define TX_BUFFER_SIZE 128
|
|
||||||
//#define BLOCK_BUFFER_SIZE 36
|
|
||||||
//#define LINE_BUFFER_SIZE 100
|
|
||||||
//#define SEGMENT_BUFFER_SIZE 10
|
|
||||||
|
|
||||||
// Define step pulse output pins. NOTE: All step bit pins must be on the same port.
|
|
||||||
#define STEP_DDR DDRA
|
|
||||||
#define STEP_PORT PORTA
|
|
||||||
#define STEP_PIN PINA
|
|
||||||
#define X_STEP_BIT 2 // MEGA2560 Digital Pin 24
|
|
||||||
#define Y_STEP_BIT 3 // MEGA2560 Digital Pin 25
|
|
||||||
#define Z_STEP_BIT 4 // MEGA2560 Digital Pin 26
|
|
||||||
#define STEP_MASK ((1<<X_STEP_BIT)|(1<<Y_STEP_BIT)|(1<<Z_STEP_BIT)) // All step bits
|
|
||||||
|
|
||||||
// Define step direction output pins. NOTE: All direction pins must be on the same port.
|
|
||||||
#define DIRECTION_DDR DDRC
|
|
||||||
#define DIRECTION_PORT PORTC
|
|
||||||
#define DIRECTION_PIN PINC
|
|
||||||
#define X_DIRECTION_BIT 7 // MEGA2560 Digital Pin 30
|
|
||||||
#define Y_DIRECTION_BIT 6 // MEGA2560 Digital Pin 31
|
|
||||||
#define Z_DIRECTION_BIT 5 // MEGA2560 Digital Pin 32
|
|
||||||
#define DIRECTION_MASK ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits
|
|
||||||
|
|
||||||
// Define stepper driver enable/disable output pin.
|
|
||||||
#define STEPPERS_DISABLE_DDR DDRB
|
|
||||||
#define STEPPERS_DISABLE_PORT PORTB
|
|
||||||
#define STEPPERS_DISABLE_BIT 7 // MEGA2560 Digital Pin 13
|
|
||||||
#define STEPPERS_DISABLE_MASK (1<<STEPPERS_DISABLE_BIT)
|
|
||||||
|
|
||||||
// Define homing/hard limit switch input pins and limit interrupt vectors.
|
|
||||||
// NOTE: All limit bit pins must be on the same port
|
|
||||||
#define LIMIT_DDR DDRB
|
|
||||||
#define LIMIT_PORT PORTB
|
|
||||||
#define LIMIT_PIN PINB
|
|
||||||
#define X_LIMIT_BIT 4 // MEGA2560 Digital Pin 10
|
|
||||||
#define Y_LIMIT_BIT 5 // MEGA2560 Digital Pin 11
|
|
||||||
#define Z_LIMIT_BIT 6 // MEGA2560 Digital Pin 12
|
|
||||||
#define LIMIT_INT PCIE0 // Pin change interrupt enable pin
|
|
||||||
#define LIMIT_INT_vect PCINT0_vect
|
|
||||||
#define LIMIT_PCMSK PCMSK0 // Pin change interrupt register
|
|
||||||
#define LIMIT_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)|(1<<Z_LIMIT_BIT)) // All limit bits
|
|
||||||
|
|
||||||
// Define spindle enable and spindle direction output pins.
|
|
||||||
#define SPINDLE_ENABLE_DDR DDRH
|
|
||||||
#define SPINDLE_ENABLE_PORT PORTH
|
|
||||||
#define SPINDLE_ENABLE_BIT 3 // MEGA2560 Digital Pin 6
|
|
||||||
#define SPINDLE_DIRECTION_DDR DDRE
|
|
||||||
#define SPINDLE_DIRECTION_PORT PORTE
|
|
||||||
#define SPINDLE_DIRECTION_BIT 3 // MEGA2560 Digital Pin 5
|
|
||||||
|
|
||||||
// Define flood and mist coolant enable output pins.
|
|
||||||
// NOTE: Uno analog pins 4 and 5 are reserved for an i2c interface, and may be installed at
|
|
||||||
// a later date if flash and memory space allows.
|
|
||||||
#define COOLANT_FLOOD_DDR DDRH
|
|
||||||
#define COOLANT_FLOOD_PORT PORTH
|
|
||||||
#define COOLANT_FLOOD_BIT 5 // MEGA2560 Digital Pin 8
|
|
||||||
#ifdef ENABLE_M7 // Mist coolant disabled by default. See config.h to enable/disable.
|
|
||||||
#define COOLANT_MIST_DDR DDRH
|
|
||||||
#define COOLANT_MIST_PORT PORTH
|
|
||||||
#define COOLANT_MIST_BIT 6 // MEGA2560 Digital Pin 9
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
|
|
||||||
// NOTE: All CONTROLs pins must be on the same port and not on a port with other input pins (limits).
|
|
||||||
#define CONTROL_DDR DDRK
|
|
||||||
#define CONTROL_PIN PINK
|
|
||||||
#define CONTROL_PORT PORTK
|
|
||||||
#define RESET_BIT 0 // MEGA2560 Analog Pin 8
|
|
||||||
#define FEED_HOLD_BIT 1 // MEGA2560 Analog Pin 9
|
|
||||||
#define CYCLE_START_BIT 2 // MEGA2560 Analog Pin 10
|
|
||||||
#define SAFETY_DOOR_BIT 3 // MEGA2560 Analog Pin 11
|
|
||||||
#define CONTROL_INT PCIE2 // Pin change interrupt enable pin
|
|
||||||
#define CONTROL_INT_vect PCINT2_vect
|
|
||||||
#define CONTROL_PCMSK PCMSK2 // Pin change interrupt register
|
|
||||||
#define CONTROL_MASK ((1<<RESET_BIT)|(1<<FEED_HOLD_BIT)|(1<<CYCLE_START_BIT)|(1<<SAFETY_DOOR_BIT))
|
|
||||||
#define CONTROL_INVERT_MASK CONTROL_MASK // May be re-defined to only invert certain control pins.
|
|
||||||
|
|
||||||
// Define probe switch input pin.
|
|
||||||
#define PROBE_DDR DDRK
|
|
||||||
#define PROBE_PIN PINK
|
|
||||||
#define PROBE_PORT PORTK
|
|
||||||
#define PROBE_BIT 7 // MEGA2560 Analog Pin 15
|
|
||||||
#define PROBE_MASK (1<<PROBE_BIT)
|
|
||||||
|
|
||||||
// Start of PWM & Stepper Enabled Spindle
|
|
||||||
#ifdef VARIABLE_SPINDLE
|
|
||||||
// Advanced Configuration Below You should not need to touch these variables
|
|
||||||
// Set Timer up to use TIMER4B which is attached to Digital Pin 7
|
|
||||||
#define PWM_MAX_VALUE 1024.0 // Translates to about 1.9 kHz PWM frequency at 1/8 prescaler
|
|
||||||
#define TCCRA_REGISTER TCCR4A
|
|
||||||
#define TCCRB_REGISTER TCCR4B
|
|
||||||
#define OCR_REGISTER OCR4B
|
|
||||||
#define COMB_BIT COM4B1
|
|
||||||
|
|
||||||
// 1/8 Prescaler, 16-bit Fast PWM mode
|
|
||||||
#define TCCRA_INIT_MASK ((1<<WGM40) | (1<<WGM41))
|
|
||||||
#define TCCRB_INIT_MASK ((1<<WGM42) | (1<<WGM43) | (1<<CS41))
|
|
||||||
#define OCRA_REGISTER OCR4A // 16-bit Fast PWM mode requires top reset value stored here.
|
|
||||||
#define OCRA_TOP_VALUE 0x0400 // PWM counter reset value. Should be the same as PWM_MAX_VALUE in hex.
|
|
||||||
|
|
||||||
#define SPINDLE_PWM_DDR DDRH
|
|
||||||
#define SPINDLE_PWM_PORT PORTH
|
|
||||||
#define SPINDLE_PWM_BIT 4 // MEGA2560 Digital Pin 7
|
|
||||||
#endif // End of VARIABLE_SPINDLE
|
|
@ -1,146 +0,0 @@
|
|||||||
/*
|
|
||||||
cpu_map_atmega328p.h - CPU and pin mapping configuration file
|
|
||||||
Part of Grbl
|
|
||||||
|
|
||||||
Copyright (c) 2012-2015 Sungeun K. Jeon
|
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Grbl is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Grbl officially supports the Arduino Uno, but the other supplied pin mappings are
|
|
||||||
supplied by users, so your results may vary. This cpu_map file serves as a central
|
|
||||||
pin mapping settings file for AVR 328p used on the Arduino Uno. */
|
|
||||||
|
|
||||||
#ifdef GRBL_PLATFORM
|
|
||||||
#error "cpu_map already defined: GRBL_PLATFORM=" GRBL_PLATFORM
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define GRBL_PLATFORM "Atmega328p"
|
|
||||||
|
|
||||||
// Define serial port pins and interrupt vectors.
|
|
||||||
#define SERIAL_RX USART_RX_vect
|
|
||||||
#define SERIAL_UDRE USART_UDRE_vect
|
|
||||||
|
|
||||||
// Define step pulse output pins. NOTE: All step bit pins must be on the same port.
|
|
||||||
#define STEP_DDR DDRD
|
|
||||||
#define STEP_PORT PORTD
|
|
||||||
#define X_STEP_BIT 2 // Uno Digital Pin 2
|
|
||||||
#define Y_STEP_BIT 3 // Uno Digital Pin 3
|
|
||||||
#define Z_STEP_BIT 4 // Uno Digital Pin 4
|
|
||||||
#define STEP_MASK ((1<<X_STEP_BIT)|(1<<Y_STEP_BIT)|(1<<Z_STEP_BIT)) // All step bits
|
|
||||||
|
|
||||||
// Define step direction output pins. NOTE: All direction pins must be on the same port.
|
|
||||||
#define DIRECTION_DDR DDRD
|
|
||||||
#define DIRECTION_PORT PORTD
|
|
||||||
#define X_DIRECTION_BIT 5 // Uno Digital Pin 5
|
|
||||||
#define Y_DIRECTION_BIT 6 // Uno Digital Pin 6
|
|
||||||
#define Z_DIRECTION_BIT 7 // Uno Digital Pin 7
|
|
||||||
#define DIRECTION_MASK ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits
|
|
||||||
|
|
||||||
// Define stepper driver enable/disable output pin.
|
|
||||||
#define STEPPERS_DISABLE_DDR DDRB
|
|
||||||
#define STEPPERS_DISABLE_PORT PORTB
|
|
||||||
#define STEPPERS_DISABLE_BIT 0 // Uno Digital Pin 8
|
|
||||||
#define STEPPERS_DISABLE_MASK (1<<STEPPERS_DISABLE_BIT)
|
|
||||||
|
|
||||||
// Define homing/hard limit switch input pins and limit interrupt vectors.
|
|
||||||
// NOTE: All limit bit pins must be on the same port, but not on a port with other input pins (CONTROL).
|
|
||||||
#define LIMIT_DDR DDRB
|
|
||||||
#define LIMIT_PIN PINB
|
|
||||||
#define LIMIT_PORT PORTB
|
|
||||||
#define X_LIMIT_BIT 1 // Uno Digital Pin 9
|
|
||||||
#define Y_LIMIT_BIT 2 // Uno Digital Pin 10
|
|
||||||
#ifdef VARIABLE_SPINDLE // Z Limit pin and spindle enabled swapped to access hardware PWM on Pin 11.
|
|
||||||
#define Z_LIMIT_BIT 4 // Uno Digital Pin 12
|
|
||||||
#else
|
|
||||||
#define Z_LIMIT_BIT 3 // Uno Digital Pin 11
|
|
||||||
#endif
|
|
||||||
#define LIMIT_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)|(1<<Z_LIMIT_BIT)) // All limit bits
|
|
||||||
#define LIMIT_INT PCIE0 // Pin change interrupt enable pin
|
|
||||||
#define LIMIT_INT_vect PCINT0_vect
|
|
||||||
#define LIMIT_PCMSK PCMSK0 // Pin change interrupt register
|
|
||||||
|
|
||||||
// Define spindle enable and spindle direction output pins.
|
|
||||||
#define SPINDLE_ENABLE_DDR DDRB
|
|
||||||
#define SPINDLE_ENABLE_PORT PORTB
|
|
||||||
// Z Limit pin and spindle PWM/enable pin swapped to access hardware PWM on Pin 11.
|
|
||||||
#ifdef VARIABLE_SPINDLE
|
|
||||||
#ifdef USE_SPINDLE_DIR_AS_ENABLE_PIN
|
|
||||||
// If enabled, spindle direction pin now used as spindle enable, while PWM remains on D11.
|
|
||||||
#define SPINDLE_ENABLE_BIT 5 // Uno Digital Pin 13 (NOTE: D13 can't be pulled-high input due to LED.)
|
|
||||||
#else
|
|
||||||
#define SPINDLE_ENABLE_BIT 3 // Uno Digital Pin 11
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define SPINDLE_ENABLE_BIT 4 // Uno Digital Pin 12
|
|
||||||
#endif
|
|
||||||
#ifndef USE_SPINDLE_DIR_AS_ENABLE_PIN
|
|
||||||
#define SPINDLE_DIRECTION_DDR DDRB
|
|
||||||
#define SPINDLE_DIRECTION_PORT PORTB
|
|
||||||
#define SPINDLE_DIRECTION_BIT 5 // Uno Digital Pin 13 (NOTE: D13 can't be pulled-high input due to LED.)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Define flood and mist coolant enable output pins.
|
|
||||||
// NOTE: Uno analog pins 4 and 5 are reserved for an i2c interface, and may be installed at
|
|
||||||
// a later date if flash and memory space allows.
|
|
||||||
#define COOLANT_FLOOD_DDR DDRC
|
|
||||||
#define COOLANT_FLOOD_PORT PORTC
|
|
||||||
#define COOLANT_FLOOD_BIT 3 // Uno Analog Pin 3
|
|
||||||
#ifdef ENABLE_M7 // Mist coolant disabled by default. See config.h to enable/disable.
|
|
||||||
#define COOLANT_MIST_DDR DDRC
|
|
||||||
#define COOLANT_MIST_PORT PORTC
|
|
||||||
#define COOLANT_MIST_BIT 4 // Uno Analog Pin 4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Define user-control controls (cycle start, reset, feed hold) input pins.
|
|
||||||
// NOTE: All CONTROLs pins must be on the same port and not on a port with other input pins (limits).
|
|
||||||
#define CONTROL_DDR DDRC
|
|
||||||
#define CONTROL_PIN PINC
|
|
||||||
#define CONTROL_PORT PORTC
|
|
||||||
#define RESET_BIT 0 // Uno Analog Pin 0
|
|
||||||
#define FEED_HOLD_BIT 1 // Uno Analog Pin 1
|
|
||||||
#define CYCLE_START_BIT 2 // Uno Analog Pin 2
|
|
||||||
#define SAFETY_DOOR_BIT 1 // Uno Analog Pin 1 NOTE: Safety door is shared with feed hold. Enabled by config define.
|
|
||||||
#define CONTROL_INT PCIE1 // Pin change interrupt enable pin
|
|
||||||
#define CONTROL_INT_vect PCINT1_vect
|
|
||||||
#define CONTROL_PCMSK PCMSK1 // Pin change interrupt register
|
|
||||||
#define CONTROL_MASK ((1<<RESET_BIT)|(1<<FEED_HOLD_BIT)|(1<<CYCLE_START_BIT)|(1<<SAFETY_DOOR_BIT))
|
|
||||||
#define CONTROL_INVERT_MASK CONTROL_MASK // May be re-defined to only invert certain control pins.
|
|
||||||
|
|
||||||
// Define probe switch input pin.
|
|
||||||
#define PROBE_DDR DDRC
|
|
||||||
#define PROBE_PIN PINC
|
|
||||||
#define PROBE_PORT PORTC
|
|
||||||
#define PROBE_BIT 5 // Uno Analog Pin 5
|
|
||||||
#define PROBE_MASK (1<<PROBE_BIT)
|
|
||||||
|
|
||||||
// Start of PWM & Stepper Enabled Spindle
|
|
||||||
#ifdef VARIABLE_SPINDLE
|
|
||||||
// Advanced Configuration Below You should not need to touch these variables
|
|
||||||
#define PWM_MAX_VALUE 255.0 // Don't change. 328p fast PWM mode fixes top value as 255.
|
|
||||||
#define TCCRA_REGISTER TCCR2A
|
|
||||||
#define TCCRB_REGISTER TCCR2B
|
|
||||||
#define OCR_REGISTER OCR2A
|
|
||||||
#define COMB_BIT COM2A1
|
|
||||||
|
|
||||||
// 1/8 Prescaler, 8-bit Fast PWM mode. Translates to about 7.8kHz PWM frequency.
|
|
||||||
#define TCCRA_INIT_MASK ((1<<WGM20) | (1<<WGM21))
|
|
||||||
#define TCCRB_INIT_MASK (1<<CS21)
|
|
||||||
|
|
||||||
// NOTE: On the 328p, these must be the same as the SPINDLE_ENABLE settings.
|
|
||||||
#define SPINDLE_PWM_DDR DDRB
|
|
||||||
#define SPINDLE_PWM_PORT PORTB
|
|
||||||
#define SPINDLE_PWM_BIT 3 // Uno Digital Pin 11
|
|
||||||
#endif // End of VARIABLE_SPINDLE
|
|
372
grbl/defaults.h
372
grbl/defaults.h
@ -23,69 +23,413 @@
|
|||||||
files listed here are supplied by users, so your results may vary. However, this should
|
files listed here are supplied by users, so your results may vary. However, this should
|
||||||
give you a good starting point as you get to know your machine and tweak the settings for
|
give you a good starting point as you get to know your machine and tweak the settings for
|
||||||
your nefarious needs.
|
your nefarious needs.
|
||||||
Ensure one and only one of these DEFAULTS_XXX values is defined in config.h */
|
NOTE: Ensure one and only one of these DEFAULTS_XXX values is defined in config.h */
|
||||||
|
|
||||||
#ifndef defaults_h
|
#ifndef defaults_h
|
||||||
|
|
||||||
// Only define the DEFAULT_XXX with where to find the corresponding default_XXX.h file.
|
|
||||||
// Don't #define defaults_h here, let the selected file do it. Prevents including more than one.
|
|
||||||
|
|
||||||
#ifdef DEFAULTS_GENERIC
|
#ifdef DEFAULTS_GENERIC
|
||||||
// Grbl generic default settings. Should work across different machines.
|
// Grbl generic default settings. Should work across different machines.
|
||||||
#include "defaults/defaults_generic.h"
|
#define DEFAULT_X_STEPS_PER_MM 250.0
|
||||||
|
#define DEFAULT_Y_STEPS_PER_MM 250.0
|
||||||
|
#define DEFAULT_Z_STEPS_PER_MM 250.0
|
||||||
|
#define DEFAULT_X_MAX_RATE 500.0 // mm/min
|
||||||
|
#define DEFAULT_Y_MAX_RATE 500.0 // mm/min
|
||||||
|
#define DEFAULT_Z_MAX_RATE 500.0 // mm/min
|
||||||
|
#define DEFAULT_X_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
||||||
|
#define DEFAULT_Y_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
||||||
|
#define DEFAULT_Z_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
||||||
|
#define DEFAULT_X_MAX_TRAVEL 200.0 // mm
|
||||||
|
#define DEFAULT_Y_MAX_TRAVEL 200.0 // mm
|
||||||
|
#define DEFAULT_Z_MAX_TRAVEL 200.0 // mm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
||||||
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
||||||
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
|
#define DEFAULT_DIRECTION_INVERT_MASK 0
|
||||||
|
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled)
|
||||||
|
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
||||||
|
#define DEFAULT_JUNCTION_DEVIATION 0.01 // mm
|
||||||
|
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
||||||
|
#define DEFAULT_REPORT_INCHES 0 // false
|
||||||
|
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
||||||
|
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
||||||
|
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
||||||
|
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_SEEK_RATE 500.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
||||||
|
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFAULTS_SHERLINE_5400
|
#ifdef DEFAULTS_SHERLINE_5400
|
||||||
// Description: Sherline 5400 mill with three NEMA 23 Keling KL23H256-21-8B 185 oz-in stepper motors,
|
// Description: Sherline 5400 mill with three NEMA 23 Keling KL23H256-21-8B 185 oz-in stepper motors,
|
||||||
// driven by three Pololu A4988 stepper drivers with a 30V, 6A power supply at 1.5A per winding.
|
// driven by three Pololu A4988 stepper drivers with a 30V, 6A power supply at 1.5A per winding.
|
||||||
#include "defaults/defaults_sherline.h"
|
#define MICROSTEPS 2
|
||||||
|
#define STEPS_PER_REV 200.0
|
||||||
|
#define MM_PER_REV (0.050*MM_PER_INCH) // 0.050 inch/rev leadscrew
|
||||||
|
#define DEFAULT_X_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV)
|
||||||
|
#define DEFAULT_Y_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV)
|
||||||
|
#define DEFAULT_Z_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV)
|
||||||
|
#define DEFAULT_X_MAX_RATE 635.0 // mm/min (25 ipm)
|
||||||
|
#define DEFAULT_Y_MAX_RATE 635.0 // mm/min
|
||||||
|
#define DEFAULT_Z_MAX_RATE 635.0 // mm/min
|
||||||
|
#define DEFAULT_X_ACCELERATION (50.0*60*60) // 50*60*60 mm/min^2 = 50 mm/sec^2
|
||||||
|
#define DEFAULT_Y_ACCELERATION (50.0*60*60) // 50*60*60 mm/min^2 = 50 mm/sec^2
|
||||||
|
#define DEFAULT_Z_ACCELERATION (50.0*60*60) // 50*60*60 mm/min^2 = 50 mm/sec^2
|
||||||
|
#define DEFAULT_X_MAX_TRAVEL 225.0 // mm
|
||||||
|
#define DEFAULT_Y_MAX_TRAVEL 125.0 // mm
|
||||||
|
#define DEFAULT_Z_MAX_TRAVEL 170.0 // mm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MAX 2800.0 // rpm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
||||||
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
||||||
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
|
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<Y_AXIS)|(1<<Z_AXIS))
|
||||||
|
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled)
|
||||||
|
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
||||||
|
#define DEFAULT_JUNCTION_DEVIATION 0.01 // mm
|
||||||
|
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
||||||
|
#define DEFAULT_REPORT_INCHES 0 // true
|
||||||
|
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
||||||
|
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
||||||
|
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
||||||
|
#define DEFAULT_HOMING_FEED_RATE 50.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_SEEK_RATE 635.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
||||||
|
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFAULTS_SHAPEOKO
|
#ifdef DEFAULTS_SHAPEOKO
|
||||||
// Description: Shapeoko CNC mill with three NEMA 17 stepper motors, driven by Synthetos
|
// Description: Shapeoko CNC mill with three NEMA 17 stepper motors, driven by Synthetos
|
||||||
// grblShield with a 24V, 4.2A power supply.
|
// grblShield with a 24V, 4.2A power supply.
|
||||||
#include "defaults/defaults_shapeoko.h"
|
#define MICROSTEPS_XY 8
|
||||||
|
#define STEP_REVS_XY 400
|
||||||
|
#define MM_PER_REV_XY (0.08*18*MM_PER_INCH) // 0.08 in belt pitch, 18 pulley teeth
|
||||||
|
#define MICROSTEPS_Z 2
|
||||||
|
#define STEP_REVS_Z 400
|
||||||
|
#define MM_PER_REV_Z 1.250 // 1.25 mm/rev leadscrew
|
||||||
|
#define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
||||||
|
#define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
||||||
|
#define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z)
|
||||||
|
#define DEFAULT_X_MAX_RATE 1000.0 // mm/min
|
||||||
|
#define DEFAULT_Y_MAX_RATE 1000.0 // mm/min
|
||||||
|
#define DEFAULT_Z_MAX_RATE 1000.0 // mm/min
|
||||||
|
#define DEFAULT_X_ACCELERATION (15.0*60*60) // 15*60*60 mm/min^2 = 15 mm/sec^2
|
||||||
|
#define DEFAULT_Y_ACCELERATION (15.0*60*60) // 15*60*60 mm/min^2 = 15 mm/sec^2
|
||||||
|
#define DEFAULT_Z_ACCELERATION (15.0*60*60) // 15*60*60 mm/min^2 = 15 mm/sec^2
|
||||||
|
#define DEFAULT_X_MAX_TRAVEL 200.0 // mm
|
||||||
|
#define DEFAULT_Y_MAX_TRAVEL 200.0 // mm
|
||||||
|
#define DEFAULT_Z_MAX_TRAVEL 200.0 // mm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MAX 10000.0 // rpm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
||||||
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
||||||
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
|
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<Y_AXIS)|(1<<Z_AXIS))
|
||||||
|
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps steppers enabled)
|
||||||
|
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
||||||
|
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
||||||
|
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
||||||
|
#define DEFAULT_REPORT_INCHES 0 // false
|
||||||
|
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
||||||
|
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
||||||
|
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
||||||
|
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_SEEK_RATE 250.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
||||||
|
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFAULTS_SHAPEOKO_2
|
#ifdef DEFAULTS_SHAPEOKO_2
|
||||||
// Description: Shapeoko CNC mill with three NEMA 17 stepper motors, driven by Synthetos
|
// Description: Shapeoko CNC mill with three NEMA 17 stepper motors, driven by Synthetos
|
||||||
// grblShield at 28V.
|
// grblShield at 28V.
|
||||||
#include "defaults/defaults_shapeoko2.h"
|
#define MICROSTEPS_XY 8
|
||||||
|
#define STEP_REVS_XY 200
|
||||||
|
#define MM_PER_REV_XY (2.0*20) // 2mm belt pitch, 20 pulley teeth
|
||||||
|
#define MICROSTEPS_Z 2
|
||||||
|
#define STEP_REVS_Z 200
|
||||||
|
#define MM_PER_REV_Z 1.250 // 1.25 mm/rev leadscrew
|
||||||
|
#define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
||||||
|
#define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
||||||
|
#define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z)
|
||||||
|
#define DEFAULT_X_MAX_RATE 5000.0 // mm/min
|
||||||
|
#define DEFAULT_Y_MAX_RATE 5000.0 // mm/min
|
||||||
|
#define DEFAULT_Z_MAX_RATE 500.0 // mm/min
|
||||||
|
#define DEFAULT_X_ACCELERATION (250.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
||||||
|
#define DEFAULT_Y_ACCELERATION (250.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
||||||
|
#define DEFAULT_Z_ACCELERATION (50.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
||||||
|
#define DEFAULT_X_MAX_TRAVEL 290.0 // mm
|
||||||
|
#define DEFAULT_Y_MAX_TRAVEL 290.0 // mm
|
||||||
|
#define DEFAULT_Z_MAX_TRAVEL 100.0 // mm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MAX 10000.0 // rpm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
||||||
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
||||||
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
|
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<X_AXIS)|(1<<Z_AXIS))
|
||||||
|
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps steppers enabled)
|
||||||
|
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
||||||
|
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
||||||
|
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
||||||
|
#define DEFAULT_REPORT_INCHES 0 // false
|
||||||
|
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
||||||
|
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
||||||
|
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
||||||
|
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_SEEK_RATE 250.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
||||||
|
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFAULTS_SHAPEOKO_3
|
#ifdef DEFAULTS_SHAPEOKO_3
|
||||||
// Description: Shapeoko CNC mill with three NEMA 23 stepper motors, driven by CarbideMotion
|
// Description: Shapeoko CNC mill with three NEMA 23 stepper motors, driven by CarbideMotion
|
||||||
#include "defaults/defaults_shapeoko3.h"
|
#define MICROSTEPS_XY 8
|
||||||
|
#define STEP_REVS_XY 200
|
||||||
|
#define MM_PER_REV_XY (2.0*20) // 2mm belt pitch, 20 pulley teeth
|
||||||
|
#define MICROSTEPS_Z 8
|
||||||
|
#define STEP_REVS_Z 200
|
||||||
|
#define MM_PER_REV_Z (2.0*20) // 2mm belt pitch, 20 pulley teeth
|
||||||
|
#define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
||||||
|
#define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
||||||
|
#define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z)
|
||||||
|
#define DEFAULT_X_MAX_RATE 5000.0 // mm/min
|
||||||
|
#define DEFAULT_Y_MAX_RATE 5000.0 // mm/min
|
||||||
|
#define DEFAULT_Z_MAX_RATE 5000.0 // mm/min
|
||||||
|
#define DEFAULT_X_ACCELERATION (400.0*60*60) // 400*60*60 mm/min^2 = 400 mm/sec^2
|
||||||
|
#define DEFAULT_Y_ACCELERATION (400.0*60*60) // 400*60*60 mm/min^2 = 400 mm/sec^2
|
||||||
|
#define DEFAULT_Z_ACCELERATION (400.0*60*60) // 400*60*60 mm/min^2 = 400 mm/sec^2
|
||||||
|
#define DEFAULT_X_MAX_TRAVEL 425.0 // mm
|
||||||
|
#define DEFAULT_Y_MAX_TRAVEL 465.0 // mm
|
||||||
|
#define DEFAULT_Z_MAX_TRAVEL 80.0 // mm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MAX 10000.0 // rpm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
||||||
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
||||||
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
|
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<X_AXIS)|(1<<Z_AXIS))
|
||||||
|
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps steppers enabled)
|
||||||
|
#define DEFAULT_STATUS_REPORT_MASK 255 // All enabled
|
||||||
|
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
||||||
|
#define DEFAULT_ARC_TOLERANCE 0.01 // mm
|
||||||
|
#define DEFAULT_REPORT_INCHES 0 // false
|
||||||
|
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
||||||
|
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
||||||
|
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
||||||
|
#define DEFAULT_HOMING_FEED_RATE 100.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_SEEK_RATE 1000.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_DEBOUNCE_DELAY 25 // msec (0-65k)
|
||||||
|
#define DEFAULT_HOMING_PULLOFF 5.0 // mm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFAULTS_X_CARVE_500MM
|
#ifdef DEFAULTS_X_CARVE_500MM
|
||||||
// Description: X-Carve 3D Carver CNC mill with three 200 step/rev motors driven by Synthetos
|
// Description: X-Carve 3D Carver CNC mill with three 200 step/rev motors driven by Synthetos
|
||||||
// grblShield at 24V.
|
// grblShield at 24V.
|
||||||
#include "defaults/defaults_x_carve_500mm.h"
|
#define MICROSTEPS_XY 8
|
||||||
|
#define STEP_REVS_XY 200
|
||||||
|
#define MM_PER_REV_XY (2.0*20) // 2mm belt pitch, 20 pulley teeth
|
||||||
|
#define MICROSTEPS_Z 2
|
||||||
|
#define STEP_REVS_Z 200
|
||||||
|
#define MM_PER_REV_Z 2.117 // ACME 3/8-12 Leadscrew
|
||||||
|
#define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
||||||
|
#define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
||||||
|
#define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z)
|
||||||
|
#define DEFAULT_X_MAX_RATE 8000.0 // mm/min
|
||||||
|
#define DEFAULT_Y_MAX_RATE 8000.0 // mm/min
|
||||||
|
#define DEFAULT_Z_MAX_RATE 500.0 // mm/min
|
||||||
|
#define DEFAULT_X_ACCELERATION (500.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
||||||
|
#define DEFAULT_Y_ACCELERATION (500.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
||||||
|
#define DEFAULT_Z_ACCELERATION (50.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
||||||
|
#define DEFAULT_X_MAX_TRAVEL 290.0 // mm
|
||||||
|
#define DEFAULT_Y_MAX_TRAVEL 290.0 // mm
|
||||||
|
#define DEFAULT_Z_MAX_TRAVEL 100.0 // mm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MAX 10000.0 // rpm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
||||||
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
||||||
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
|
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<X_AXIS)|(1<<Y_AXIS))
|
||||||
|
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps steppers enabled)
|
||||||
|
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
||||||
|
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
||||||
|
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
||||||
|
#define DEFAULT_REPORT_INCHES 0 // false
|
||||||
|
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
||||||
|
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
||||||
|
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_DIR_MASK 3 // move positive dir
|
||||||
|
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_SEEK_RATE 750.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
||||||
|
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFAULTS_X_CARVE_1000MM
|
#ifdef DEFAULTS_X_CARVE_1000MM
|
||||||
// Description: X-Carve 3D Carver CNC mill with three 200 step/rev motors driven by Synthetos
|
// Description: X-Carve 3D Carver CNC mill with three 200 step/rev motors driven by Synthetos
|
||||||
// grblShield at 24V.
|
// grblShield at 24V.
|
||||||
#include "defaults/defaults_x_carve_1000mm.h"
|
#define MICROSTEPS_XY 8
|
||||||
|
#define STEP_REVS_XY 200
|
||||||
|
#define MM_PER_REV_XY (2.0*20) // 2mm belt pitch, 20 pulley teeth
|
||||||
|
#define MICROSTEPS_Z 2
|
||||||
|
#define STEP_REVS_Z 200
|
||||||
|
#define MM_PER_REV_Z 2.117 // ACME 3/8-12 Leadscrew
|
||||||
|
#define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
||||||
|
#define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
||||||
|
#define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z)
|
||||||
|
#define DEFAULT_X_MAX_RATE 8000.0 // mm/min
|
||||||
|
#define DEFAULT_Y_MAX_RATE 8000.0 // mm/min
|
||||||
|
#define DEFAULT_Z_MAX_RATE 500.0 // mm/min
|
||||||
|
#define DEFAULT_X_ACCELERATION (500.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
||||||
|
#define DEFAULT_Y_ACCELERATION (500.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
||||||
|
#define DEFAULT_Z_ACCELERATION (50.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
||||||
|
#define DEFAULT_X_MAX_TRAVEL 740.0 // mm
|
||||||
|
#define DEFAULT_Y_MAX_TRAVEL 790.0 // mm
|
||||||
|
#define DEFAULT_Z_MAX_TRAVEL 100.0 // mm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MAX 10000.0 // rpm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
||||||
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
||||||
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
|
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<X_AXIS)|(1<<Y_AXIS))
|
||||||
|
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps steppers enabled)
|
||||||
|
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
||||||
|
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
||||||
|
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
||||||
|
#define DEFAULT_REPORT_INCHES 0 // false
|
||||||
|
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
||||||
|
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
||||||
|
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_DIR_MASK 3 // move positive dir
|
||||||
|
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_SEEK_RATE 750.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
||||||
|
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFAULTS_ZEN_TOOLWORKS_7x7
|
#ifdef DEFAULTS_ZEN_TOOLWORKS_7x7
|
||||||
// Description: Zen Toolworks 7x7 mill with three Shinano SST43D2121 65oz-in NEMA 17 stepper motors.
|
// Description: Zen Toolworks 7x7 mill with three Shinano SST43D2121 65oz-in NEMA 17 stepper motors.
|
||||||
// Leadscrew is different from some ZTW kits, where most are 1.25mm/rev rather than 8.0mm/rev here.
|
// Leadscrew is different from some ZTW kits, where most are 1.25mm/rev rather than 8.0mm/rev here.
|
||||||
// Driven by 30V, 6A power supply and TI DRV8811 stepper motor drivers.
|
// Driven by 30V, 6A power supply and TI DRV8811 stepper motor drivers.
|
||||||
#include "defaults/defaults_zen_toolworks_7x7.h"
|
#define MICROSTEPS 8
|
||||||
|
#define STEPS_PER_REV 200.0
|
||||||
|
#define MM_PER_REV 8.0 // 8 mm/rev leadscrew
|
||||||
|
#define DEFAULT_X_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV)
|
||||||
|
#define DEFAULT_Y_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV)
|
||||||
|
#define DEFAULT_Z_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV)
|
||||||
|
#define DEFAULT_X_MAX_RATE 6000.0 // mm/min
|
||||||
|
#define DEFAULT_Y_MAX_RATE 6000.0 // mm/min
|
||||||
|
#define DEFAULT_Z_MAX_RATE 6000.0 // mm/min
|
||||||
|
#define DEFAULT_X_ACCELERATION (600.0*60*60) // 600*60*60 mm/min^2 = 600 mm/sec^2
|
||||||
|
#define DEFAULT_Y_ACCELERATION (600.0*60*60) // 600*60*60 mm/min^2 = 600 mm/sec^2
|
||||||
|
#define DEFAULT_Z_ACCELERATION (600.0*60*60) // 600*60*60 mm/min^2 = 600 mm/sec^2
|
||||||
|
#define DEFAULT_X_MAX_TRAVEL 190.0 // mm
|
||||||
|
#define DEFAULT_Y_MAX_TRAVEL 180.0 // mm
|
||||||
|
#define DEFAULT_Z_MAX_TRAVEL 150.0 // mm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MAX 10000.0 // rpm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
||||||
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
||||||
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
|
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<Y_AXIS))
|
||||||
|
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled)
|
||||||
|
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
||||||
|
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
||||||
|
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
||||||
|
#define DEFAULT_REPORT_INCHES 0 // false
|
||||||
|
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
||||||
|
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
||||||
|
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
||||||
|
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_SEEK_RATE 250.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
||||||
|
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFAULTS_OXCNC
|
#ifdef DEFAULTS_OXCNC
|
||||||
// Grbl settings for OpenBuilds OX CNC Machine
|
// Grbl settings for OpenBuilds OX CNC Machine
|
||||||
// http://www.openbuilds.com/builds/openbuilds-ox-cnc-machine.341/
|
// http://www.openbuilds.com/builds/openbuilds-ox-cnc-machine.341/
|
||||||
#include "defaults/defaults_oxcnc.h"
|
#define DEFAULT_X_STEPS_PER_MM 26.670
|
||||||
|
#define DEFAULT_Y_STEPS_PER_MM 26.670
|
||||||
|
#define DEFAULT_Z_STEPS_PER_MM 50
|
||||||
|
#define DEFAULT_X_MAX_RATE 500.0 // mm/min
|
||||||
|
#define DEFAULT_Y_MAX_RATE 500.0 // mm/min
|
||||||
|
#define DEFAULT_Z_MAX_RATE 500.0 // mm/min
|
||||||
|
#define DEFAULT_X_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
||||||
|
#define DEFAULT_Y_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
||||||
|
#define DEFAULT_Z_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
||||||
|
#define DEFAULT_X_MAX_TRAVEL 500.0 // mm
|
||||||
|
#define DEFAULT_Y_MAX_TRAVEL 750.0 // mm
|
||||||
|
#define DEFAULT_Z_MAX_TRAVEL 80.0 // mm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
||||||
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
||||||
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
|
#define DEFAULT_DIRECTION_INVERT_MASK 0
|
||||||
|
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled)
|
||||||
|
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
||||||
|
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
||||||
|
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
||||||
|
#define DEFAULT_REPORT_INCHES 0 // false
|
||||||
|
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
||||||
|
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
||||||
|
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
||||||
|
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_SEEK_RATE 500.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
||||||
|
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFAULTS_SIMULATOR
|
#ifdef DEFAULTS_SIMULATOR
|
||||||
// Settings only for Grbl Simulator (www.github.com/grbl/grbl-sim)
|
// Settings only for Grbl Simulator (www.github.com/grbl/grbl-sim)
|
||||||
#include "defaults/defaults_simulator.h"
|
// Grbl generic default settings. Should work across different machines.
|
||||||
|
#define DEFAULT_X_STEPS_PER_MM 1000.0
|
||||||
|
#define DEFAULT_Y_STEPS_PER_MM 1000.0
|
||||||
|
#define DEFAULT_Z_STEPS_PER_MM 1000.0
|
||||||
|
#define DEFAULT_X_MAX_RATE 1000.0 // mm/min
|
||||||
|
#define DEFAULT_Y_MAX_RATE 1000.0 // mm/min
|
||||||
|
#define DEFAULT_Z_MAX_RATE 1000.0 // mm/min
|
||||||
|
#define DEFAULT_X_ACCELERATION (100.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
||||||
|
#define DEFAULT_Y_ACCELERATION (100.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
||||||
|
#define DEFAULT_Z_ACCELERATION (100.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
||||||
|
#define DEFAULT_X_MAX_TRAVEL 1000.0 // mm
|
||||||
|
#define DEFAULT_Y_MAX_TRAVEL 1000.0 // mm
|
||||||
|
#define DEFAULT_Z_MAX_TRAVEL 1000.0 // mm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
||||||
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
||||||
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
|
#define DEFAULT_DIRECTION_INVERT_MASK 0
|
||||||
|
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled)
|
||||||
|
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
||||||
|
#define DEFAULT_JUNCTION_DEVIATION 0.01 // mm
|
||||||
|
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
||||||
|
#define DEFAULT_REPORT_INCHES 0 // false
|
||||||
|
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
||||||
|
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
||||||
|
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_ENABLE 0 // false
|
||||||
|
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
||||||
|
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_SEEK_RATE 500.0 // mm/min
|
||||||
|
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
||||||
|
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
/*
|
|
||||||
defaults_generic.h - defaults settings configuration file
|
|
||||||
Part of Grbl
|
|
||||||
|
|
||||||
Copyright (c) 2012-2015 Sungeun K. Jeon
|
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Grbl is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* The defaults.h file serves as a central default settings file for different machine
|
|
||||||
types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings
|
|
||||||
here are supplied by users, so your results may vary. However, this should give you
|
|
||||||
a good starting point as you get to know your machine and tweak the settings for your
|
|
||||||
nefarious needs. */
|
|
||||||
|
|
||||||
#ifndef defaults_h
|
|
||||||
#define defaults_h
|
|
||||||
|
|
||||||
// Grbl generic default settings. Should work across different machines.
|
|
||||||
#define DEFAULT_X_STEPS_PER_MM 250.0
|
|
||||||
#define DEFAULT_Y_STEPS_PER_MM 250.0
|
|
||||||
#define DEFAULT_Z_STEPS_PER_MM 250.0
|
|
||||||
#define DEFAULT_X_MAX_RATE 500.0 // mm/min
|
|
||||||
#define DEFAULT_Y_MAX_RATE 500.0 // mm/min
|
|
||||||
#define DEFAULT_Z_MAX_RATE 500.0 // mm/min
|
|
||||||
#define DEFAULT_X_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
#define DEFAULT_Y_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
#define DEFAULT_Z_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
#define DEFAULT_X_MAX_TRAVEL 200.0 // mm
|
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 200.0 // mm
|
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 200.0 // mm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK 0
|
|
||||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled)
|
|
||||||
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
|
||||||
#define DEFAULT_JUNCTION_DEVIATION 0.01 // mm
|
|
||||||
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
|
||||||
#define DEFAULT_REPORT_INCHES 0 // false
|
|
||||||
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
|
||||||
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
|
||||||
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
|
||||||
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_SEEK_RATE 500.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
|
||||||
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
defaults_oxcnc.h - defaults settings configuration file
|
|
||||||
Part of Grbl
|
|
||||||
|
|
||||||
Copyright (c) 2012-2015 Sungeun K. Jeon
|
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Grbl is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* The defaults.h file serves as a central default settings file for different machine
|
|
||||||
types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings
|
|
||||||
here are supplied by users, so your results may vary. However, this should give you
|
|
||||||
a good starting point as you get to know your machine and tweak the settings for your
|
|
||||||
nefarious needs. */
|
|
||||||
|
|
||||||
#ifndef defaults_h
|
|
||||||
#define defaults_h
|
|
||||||
|
|
||||||
// Grbl settings for OpenBuilds OX CNC Machine
|
|
||||||
// http://www.openbuilds.com/builds/openbuilds-ox-cnc-machine.341/
|
|
||||||
#define DEFAULT_X_STEPS_PER_MM 26.670
|
|
||||||
#define DEFAULT_Y_STEPS_PER_MM 26.670
|
|
||||||
#define DEFAULT_Z_STEPS_PER_MM 50
|
|
||||||
#define DEFAULT_X_MAX_RATE 500.0 // mm/min
|
|
||||||
#define DEFAULT_Y_MAX_RATE 500.0 // mm/min
|
|
||||||
#define DEFAULT_Z_MAX_RATE 500.0 // mm/min
|
|
||||||
#define DEFAULT_X_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
#define DEFAULT_Y_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
#define DEFAULT_Z_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
#define DEFAULT_X_MAX_TRAVEL 500.0 // mm
|
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 750.0 // mm
|
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 80.0 // mm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK 0
|
|
||||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled)
|
|
||||||
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
|
||||||
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
|
||||||
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
|
||||||
#define DEFAULT_REPORT_INCHES 0 // false
|
|
||||||
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
|
||||||
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
|
||||||
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
|
||||||
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_SEEK_RATE 500.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
|
||||||
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,72 +0,0 @@
|
|||||||
/*
|
|
||||||
defaults_shapeoko.h - defaults settings configuration file
|
|
||||||
Part of Grbl
|
|
||||||
|
|
||||||
Copyright (c) 2012-2015 Sungeun K. Jeon
|
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Grbl is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* The defaults.h file serves as a central default settings file for different machine
|
|
||||||
types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings
|
|
||||||
here are supplied by users, so your results may vary. However, this should give you
|
|
||||||
a good starting point as you get to know your machine and tweak the settings for your
|
|
||||||
nefarious needs. */
|
|
||||||
|
|
||||||
#ifndef defaults_h
|
|
||||||
#define defaults_h
|
|
||||||
|
|
||||||
|
|
||||||
// Description: Shapeoko CNC mill with three NEMA 17 stepper motors, driven by Synthetos
|
|
||||||
// grblShield with a 24V, 4.2A power supply.
|
|
||||||
#define MICROSTEPS_XY 8
|
|
||||||
#define STEP_REVS_XY 400
|
|
||||||
#define MM_PER_REV_XY (0.08*18*MM_PER_INCH) // 0.08 in belt pitch, 18 pulley teeth
|
|
||||||
#define MICROSTEPS_Z 2
|
|
||||||
#define STEP_REVS_Z 400
|
|
||||||
#define MM_PER_REV_Z 1.250 // 1.25 mm/rev leadscrew
|
|
||||||
#define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
|
||||||
#define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
|
||||||
#define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z)
|
|
||||||
#define DEFAULT_X_MAX_RATE 1000.0 // mm/min
|
|
||||||
#define DEFAULT_Y_MAX_RATE 1000.0 // mm/min
|
|
||||||
#define DEFAULT_Z_MAX_RATE 1000.0 // mm/min
|
|
||||||
#define DEFAULT_X_ACCELERATION (15.0*60*60) // 15*60*60 mm/min^2 = 15 mm/sec^2
|
|
||||||
#define DEFAULT_Y_ACCELERATION (15.0*60*60) // 15*60*60 mm/min^2 = 15 mm/sec^2
|
|
||||||
#define DEFAULT_Z_ACCELERATION (15.0*60*60) // 15*60*60 mm/min^2 = 15 mm/sec^2
|
|
||||||
#define DEFAULT_X_MAX_TRAVEL 200.0 // mm
|
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 200.0 // mm
|
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 200.0 // mm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MAX 10000.0 // rpm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<Y_AXIS)|(1<<Z_AXIS))
|
|
||||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps steppers enabled)
|
|
||||||
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
|
||||||
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
|
||||||
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
|
||||||
#define DEFAULT_REPORT_INCHES 0 // false
|
|
||||||
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
|
||||||
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
|
||||||
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
|
||||||
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_SEEK_RATE 250.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
|
||||||
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,71 +0,0 @@
|
|||||||
/*
|
|
||||||
defaults_shapeoko2.h - defaults settings configuration file
|
|
||||||
Part of Grbl
|
|
||||||
|
|
||||||
Copyright (c) 2012-2015 Sungeun K. Jeon
|
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Grbl is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* The defaults.h file serves as a central default settings file for different machine
|
|
||||||
types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings
|
|
||||||
here are supplied by users, so your results may vary. However, this should give you
|
|
||||||
a good starting point as you get to know your machine and tweak the settings for your
|
|
||||||
nefarious needs. */
|
|
||||||
|
|
||||||
#ifndef defaults_h
|
|
||||||
#define defaults_h
|
|
||||||
|
|
||||||
// Description: Shapeoko CNC mill with three NEMA 17 stepper motors, driven by Synthetos
|
|
||||||
// grblShield at 28V.
|
|
||||||
#define MICROSTEPS_XY 8
|
|
||||||
#define STEP_REVS_XY 200
|
|
||||||
#define MM_PER_REV_XY (2.0*20) // 2mm belt pitch, 20 pulley teeth
|
|
||||||
#define MICROSTEPS_Z 2
|
|
||||||
#define STEP_REVS_Z 200
|
|
||||||
#define MM_PER_REV_Z 1.250 // 1.25 mm/rev leadscrew
|
|
||||||
#define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
|
||||||
#define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
|
||||||
#define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z)
|
|
||||||
#define DEFAULT_X_MAX_RATE 5000.0 // mm/min
|
|
||||||
#define DEFAULT_Y_MAX_RATE 5000.0 // mm/min
|
|
||||||
#define DEFAULT_Z_MAX_RATE 500.0 // mm/min
|
|
||||||
#define DEFAULT_X_ACCELERATION (250.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
|
||||||
#define DEFAULT_Y_ACCELERATION (250.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
|
||||||
#define DEFAULT_Z_ACCELERATION (50.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
|
||||||
#define DEFAULT_X_MAX_TRAVEL 290.0 // mm
|
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 290.0 // mm
|
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 100.0 // mm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MAX 10000.0 // rpm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<X_AXIS)|(1<<Z_AXIS))
|
|
||||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps steppers enabled)
|
|
||||||
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
|
||||||
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
|
||||||
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
|
||||||
#define DEFAULT_REPORT_INCHES 0 // false
|
|
||||||
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
|
||||||
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
|
||||||
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
|
||||||
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_SEEK_RATE 250.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
|
||||||
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,70 +0,0 @@
|
|||||||
/*
|
|
||||||
defaults_shapeoko3.h - defaults settings configuration file
|
|
||||||
Part of Grbl
|
|
||||||
|
|
||||||
Copyright (c) 2012-2015 Sungeun K. Jeon
|
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Grbl is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* The defaults.h file serves as a central default settings file for different machine
|
|
||||||
types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings
|
|
||||||
here are supplied by users, so your results may vary. However, this should give you
|
|
||||||
a good starting point as you get to know your machine and tweak the settings for your
|
|
||||||
nefarious needs. */
|
|
||||||
|
|
||||||
#ifndef defaults_h
|
|
||||||
#define defaults_h
|
|
||||||
|
|
||||||
// Description: Shapeoko CNC mill with three NEMA 23 stepper motors, driven by CarbideMotion
|
|
||||||
#define MICROSTEPS_XY 8
|
|
||||||
#define STEP_REVS_XY 200
|
|
||||||
#define MM_PER_REV_XY (2.0*20) // 2mm belt pitch, 20 pulley teeth
|
|
||||||
#define MICROSTEPS_Z 8
|
|
||||||
#define STEP_REVS_Z 200
|
|
||||||
#define MM_PER_REV_Z (2.0*20) // 2mm belt pitch, 20 pulley teeth
|
|
||||||
#define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
|
||||||
#define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
|
||||||
#define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z)
|
|
||||||
#define DEFAULT_X_MAX_RATE 5000.0 // mm/min
|
|
||||||
#define DEFAULT_Y_MAX_RATE 5000.0 // mm/min
|
|
||||||
#define DEFAULT_Z_MAX_RATE 5000.0 // mm/min
|
|
||||||
#define DEFAULT_X_ACCELERATION (400.0*60*60) // 400*60*60 mm/min^2 = 400 mm/sec^2
|
|
||||||
#define DEFAULT_Y_ACCELERATION (400.0*60*60) // 400*60*60 mm/min^2 = 400 mm/sec^2
|
|
||||||
#define DEFAULT_Z_ACCELERATION (400.0*60*60) // 400*60*60 mm/min^2 = 400 mm/sec^2
|
|
||||||
#define DEFAULT_X_MAX_TRAVEL 425.0 // mm
|
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 465.0 // mm
|
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 80.0 // mm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MAX 10000.0 // rpm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<X_AXIS)|(1<<Z_AXIS))
|
|
||||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps steppers enabled)
|
|
||||||
#define DEFAULT_STATUS_REPORT_MASK 255 // All enabled
|
|
||||||
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
|
||||||
#define DEFAULT_ARC_TOLERANCE 0.01 // mm
|
|
||||||
#define DEFAULT_REPORT_INCHES 0 // false
|
|
||||||
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
|
||||||
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
|
||||||
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
|
||||||
#define DEFAULT_HOMING_FEED_RATE 100.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_SEEK_RATE 1000.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_DEBOUNCE_DELAY 25 // msec (0-65k)
|
|
||||||
#define DEFAULT_HOMING_PULLOFF 5.0 // mm
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,68 +0,0 @@
|
|||||||
/*
|
|
||||||
defaults_sherline.h - defaults settings configuration file
|
|
||||||
Part of Grbl
|
|
||||||
|
|
||||||
Copyright (c) 2012-2015 Sungeun K. Jeon
|
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Grbl is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* The defaults.h file serves as a central default settings file for different machine
|
|
||||||
types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings
|
|
||||||
here are supplied by users, so your results may vary. However, this should give you
|
|
||||||
a good starting point as you get to know your machine and tweak the settings for your
|
|
||||||
nefarious needs. */
|
|
||||||
|
|
||||||
#ifndef defaults_h
|
|
||||||
#define defaults_h
|
|
||||||
|
|
||||||
// Description: Sherline 5400 mill with three NEMA 23 Keling KL23H256-21-8B 185 oz-in stepper motors,
|
|
||||||
// driven by three Pololu A4988 stepper drivers with a 30V, 6A power supply at 1.5A per winding.
|
|
||||||
#define MICROSTEPS 2
|
|
||||||
#define STEPS_PER_REV 200.0
|
|
||||||
#define MM_PER_REV (0.050*MM_PER_INCH) // 0.050 inch/rev leadscrew
|
|
||||||
#define DEFAULT_X_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV)
|
|
||||||
#define DEFAULT_Y_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV)
|
|
||||||
#define DEFAULT_Z_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV)
|
|
||||||
#define DEFAULT_X_MAX_RATE 635.0 // mm/min (25 ipm)
|
|
||||||
#define DEFAULT_Y_MAX_RATE 635.0 // mm/min
|
|
||||||
#define DEFAULT_Z_MAX_RATE 635.0 // mm/min
|
|
||||||
#define DEFAULT_X_ACCELERATION (50.0*60*60) // 50*60*60 mm/min^2 = 50 mm/sec^2
|
|
||||||
#define DEFAULT_Y_ACCELERATION (50.0*60*60) // 50*60*60 mm/min^2 = 50 mm/sec^2
|
|
||||||
#define DEFAULT_Z_ACCELERATION (50.0*60*60) // 50*60*60 mm/min^2 = 50 mm/sec^2
|
|
||||||
#define DEFAULT_X_MAX_TRAVEL 225.0 // mm
|
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 125.0 // mm
|
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 170.0 // mm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MAX 2800.0 // rpm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<Y_AXIS)|(1<<Z_AXIS))
|
|
||||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled)
|
|
||||||
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
|
||||||
#define DEFAULT_JUNCTION_DEVIATION 0.01 // mm
|
|
||||||
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
|
||||||
#define DEFAULT_REPORT_INCHES 0 // true
|
|
||||||
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
|
||||||
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
|
||||||
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
|
||||||
#define DEFAULT_HOMING_FEED_RATE 50.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_SEEK_RATE 635.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
|
||||||
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
defaults_simulator.h - defaults settings configuration file
|
|
||||||
Part of Grbl
|
|
||||||
|
|
||||||
Copyright (c) 2012-2015 Sungeun K. Jeon
|
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Grbl is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* The defaults.h file serves as a central default settings file for different machine
|
|
||||||
types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings
|
|
||||||
here are supplied by users, so your results may vary. However, this should give you
|
|
||||||
a good starting point as you get to know your machine and tweak the settings for your
|
|
||||||
nefarious needs. */
|
|
||||||
|
|
||||||
#ifndef defaults_h
|
|
||||||
#define defaults_h
|
|
||||||
|
|
||||||
// Settings only for Grbl Simulator (www.github.com/grbl/grbl-sim)
|
|
||||||
// Grbl generic default settings. Should work across different machines.
|
|
||||||
#define DEFAULT_X_STEPS_PER_MM 1000.0
|
|
||||||
#define DEFAULT_Y_STEPS_PER_MM 1000.0
|
|
||||||
#define DEFAULT_Z_STEPS_PER_MM 1000.0
|
|
||||||
#define DEFAULT_X_MAX_RATE 1000.0 // mm/min
|
|
||||||
#define DEFAULT_Y_MAX_RATE 1000.0 // mm/min
|
|
||||||
#define DEFAULT_Z_MAX_RATE 1000.0 // mm/min
|
|
||||||
#define DEFAULT_X_ACCELERATION (100.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
#define DEFAULT_Y_ACCELERATION (100.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
#define DEFAULT_Z_ACCELERATION (100.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
#define DEFAULT_X_MAX_TRAVEL 1000.0 // mm
|
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 1000.0 // mm
|
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 1000.0 // mm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK 0
|
|
||||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled)
|
|
||||||
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
|
||||||
#define DEFAULT_JUNCTION_DEVIATION 0.01 // mm
|
|
||||||
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
|
||||||
#define DEFAULT_REPORT_INCHES 0 // false
|
|
||||||
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
|
||||||
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
|
||||||
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
|
||||||
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_SEEK_RATE 500.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
|
||||||
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,72 +0,0 @@
|
|||||||
/*
|
|
||||||
defaults_x_carve_1000mm.h - defaults settings configuration file
|
|
||||||
Part of Grbl
|
|
||||||
|
|
||||||
Copyright (c) 2012-2015 Sungeun K. Jeon
|
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Grbl is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* The defaults.h file serves as a central default settings file for different machine
|
|
||||||
types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings
|
|
||||||
here are supplied by users, so your results may vary. However, this should give you
|
|
||||||
a good starting point as you get to know your machine and tweak the settings for your
|
|
||||||
nefarious needs. */
|
|
||||||
|
|
||||||
#ifndef defaults_h
|
|
||||||
#define defaults_h
|
|
||||||
|
|
||||||
// Description: X-Carve 3D Carver CNC mill with three 200 step/rev motors driven by Synthetos
|
|
||||||
// grblShield at 24V.
|
|
||||||
#define MICROSTEPS_XY 8
|
|
||||||
#define STEP_REVS_XY 200
|
|
||||||
#define MM_PER_REV_XY (2.0*20) // 2mm belt pitch, 20 pulley teeth
|
|
||||||
#define MICROSTEPS_Z 2
|
|
||||||
#define STEP_REVS_Z 200
|
|
||||||
#define MM_PER_REV_Z 2.117 // ACME 3/8-12 Leadscrew
|
|
||||||
#define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
|
||||||
#define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
|
||||||
#define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z)
|
|
||||||
#define DEFAULT_X_MAX_RATE 8000.0 // mm/min
|
|
||||||
#define DEFAULT_Y_MAX_RATE 8000.0 // mm/min
|
|
||||||
#define DEFAULT_Z_MAX_RATE 500.0 // mm/min
|
|
||||||
#define DEFAULT_X_ACCELERATION (500.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
|
||||||
#define DEFAULT_Y_ACCELERATION (500.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
|
||||||
#define DEFAULT_Z_ACCELERATION (50.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
|
||||||
#define DEFAULT_X_MAX_TRAVEL 740.0 // mm
|
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 790.0 // mm
|
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 100.0 // mm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MAX 10000.0 // rpm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<X_AXIS)|(1<<Y_AXIS))
|
|
||||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps steppers enabled)
|
|
||||||
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
|
||||||
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
|
||||||
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
|
||||||
#define DEFAULT_REPORT_INCHES 0 // false
|
|
||||||
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
|
||||||
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
|
||||||
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_DIR_MASK 3 // move positive dir
|
|
||||||
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_SEEK_RATE 750.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
|
||||||
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
|||||||
/*
|
|
||||||
defaults_x_carve_500mm.h - defaults settings configuration file
|
|
||||||
Part of Grbl
|
|
||||||
|
|
||||||
Copyright (c) 2012-2015 Sungeun K. Jeon
|
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Grbl is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* The defaults.h file serves as a central default settings file for different machine
|
|
||||||
types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings
|
|
||||||
here are supplied by users, so your results may vary. However, this should give you
|
|
||||||
a good starting point as you get to know your machine and tweak the settings for your
|
|
||||||
nefarious needs. */
|
|
||||||
|
|
||||||
#ifndef defaults_h
|
|
||||||
#define defaults_h
|
|
||||||
|
|
||||||
// Description: X-Carve 3D Carver CNC mill with three 200 step/rev motors driven by Synthetos
|
|
||||||
// grblShield at 24V.
|
|
||||||
#define MICROSTEPS_XY 8
|
|
||||||
#define STEP_REVS_XY 200
|
|
||||||
#define MM_PER_REV_XY (2.0*20) // 2mm belt pitch, 20 pulley teeth
|
|
||||||
#define MICROSTEPS_Z 2
|
|
||||||
#define STEP_REVS_Z 200
|
|
||||||
#define MM_PER_REV_Z 2.117 // ACME 3/8-12 Leadscrew
|
|
||||||
#define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
|
||||||
#define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY)
|
|
||||||
#define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z)
|
|
||||||
#define DEFAULT_X_MAX_RATE 8000.0 // mm/min
|
|
||||||
#define DEFAULT_Y_MAX_RATE 8000.0 // mm/min
|
|
||||||
#define DEFAULT_Z_MAX_RATE 500.0 // mm/min
|
|
||||||
#define DEFAULT_X_ACCELERATION (500.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
|
||||||
#define DEFAULT_Y_ACCELERATION (500.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
|
||||||
#define DEFAULT_Z_ACCELERATION (50.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
|
||||||
#define DEFAULT_X_MAX_TRAVEL 290.0 // mm
|
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 290.0 // mm
|
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 100.0 // mm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MAX 10000.0 // rpm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<X_AXIS)|(1<<Y_AXIS))
|
|
||||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps steppers enabled)
|
|
||||||
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
|
||||||
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
|
||||||
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
|
||||||
#define DEFAULT_REPORT_INCHES 0 // false
|
|
||||||
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
|
||||||
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
|
||||||
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_DIR_MASK 3 // move positive dir
|
|
||||||
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_SEEK_RATE 750.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
|
||||||
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
|||||||
/*
|
|
||||||
defaults_zen_toolworks_7x7.h - defaults settings configuration file
|
|
||||||
Part of Grbl
|
|
||||||
|
|
||||||
Copyright (c) 2012-2015 Sungeun K. Jeon
|
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Grbl is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* The defaults.h file serves as a central default settings file for different machine
|
|
||||||
types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings
|
|
||||||
here are supplied by users, so your results may vary. However, this should give you
|
|
||||||
a good starting point as you get to know your machine and tweak the settings for your
|
|
||||||
nefarious needs. */
|
|
||||||
|
|
||||||
#ifndef defaults_h
|
|
||||||
#define defaults_h
|
|
||||||
|
|
||||||
// Description: Zen Toolworks 7x7 mill with three Shinano SST43D2121 65oz-in NEMA 17 stepper motors.
|
|
||||||
// Leadscrew is different from some ZTW kits, where most are 1.25mm/rev rather than 8.0mm/rev here.
|
|
||||||
// Driven by 30V, 6A power supply and TI DRV8811 stepper motor drivers.
|
|
||||||
#define MICROSTEPS 8
|
|
||||||
#define STEPS_PER_REV 200.0
|
|
||||||
#define MM_PER_REV 8.0 // 8 mm/rev leadscrew
|
|
||||||
#define DEFAULT_X_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV)
|
|
||||||
#define DEFAULT_Y_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV)
|
|
||||||
#define DEFAULT_Z_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV)
|
|
||||||
#define DEFAULT_X_MAX_RATE 6000.0 // mm/min
|
|
||||||
#define DEFAULT_Y_MAX_RATE 6000.0 // mm/min
|
|
||||||
#define DEFAULT_Z_MAX_RATE 6000.0 // mm/min
|
|
||||||
#define DEFAULT_X_ACCELERATION (600.0*60*60) // 600*60*60 mm/min^2 = 600 mm/sec^2
|
|
||||||
#define DEFAULT_Y_ACCELERATION (600.0*60*60) // 600*60*60 mm/min^2 = 600 mm/sec^2
|
|
||||||
#define DEFAULT_Z_ACCELERATION (600.0*60*60) // 600*60*60 mm/min^2 = 600 mm/sec^2
|
|
||||||
#define DEFAULT_X_MAX_TRAVEL 190.0 // mm
|
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 180.0 // mm
|
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 150.0 // mm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MAX 10000.0 // rpm
|
|
||||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<Y_AXIS))
|
|
||||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled)
|
|
||||||
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
|
||||||
#define DEFAULT_JUNCTION_DEVIATION 0.02 // mm
|
|
||||||
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
|
||||||
#define DEFAULT_REPORT_INCHES 0 // false
|
|
||||||
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
|
||||||
#define DEFAULT_INVERT_LIMIT_PINS 0 // false
|
|
||||||
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_ENABLE 0 // false
|
|
||||||
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
|
||||||
#define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_SEEK_RATE 250.0 // mm/min
|
|
||||||
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
|
||||||
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
// Grbl versioning system
|
// Grbl versioning system
|
||||||
#define GRBL_VERSION "1.0c"
|
#define GRBL_VERSION "1.0c"
|
||||||
#define GRBL_VERSION_BUILD "20160319"
|
#define GRBL_VERSION_BUILD "20160330"
|
||||||
|
|
||||||
// Define standard libraries used by Grbl.
|
// Define standard libraries used by Grbl.
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
|
@ -29,19 +29,13 @@ void spindle_init()
|
|||||||
// Configure variable spindle PWM and enable pin, if requried. On the Uno, PWM and enable are
|
// Configure variable spindle PWM and enable pin, if requried. On the Uno, PWM and enable are
|
||||||
// combined unless configured otherwise.
|
// combined unless configured otherwise.
|
||||||
SPINDLE_PWM_DDR |= (1<<SPINDLE_PWM_BIT); // Configure as PWM output pin.
|
SPINDLE_PWM_DDR |= (1<<SPINDLE_PWM_BIT); // Configure as PWM output pin.
|
||||||
TCCRA_REGISTER = TCCRA_INIT_MASK; // Configure PWM output compare timer
|
SPINDLE_TCCRA_REGISTER = SPINDLE_TCCRA_INIT_MASK; // Configure PWM output compare timer
|
||||||
TCCRB_REGISTER = TCCRB_INIT_MASK;
|
SPINDLE_TCCRB_REGISTER = SPINDLE_TCCRB_INIT_MASK;
|
||||||
#ifdef CPU_MAP_ATMEGA2560
|
|
||||||
OCRA_REGISTER = OCRA_TOP_VALUE; // Set the top value for 16-bit fast PWM mode
|
|
||||||
SPINDLE_ENABLE_DDR |= (1<<SPINDLE_ENABLE_BIT); // Configure as output pin.
|
|
||||||
SPINDLE_DIRECTION_DDR |= (1<<SPINDLE_DIRECTION_BIT); // Configure as output pin.
|
|
||||||
#else // Otherwise 328p
|
|
||||||
#ifdef USE_SPINDLE_DIR_AS_ENABLE_PIN
|
#ifdef USE_SPINDLE_DIR_AS_ENABLE_PIN
|
||||||
SPINDLE_ENABLE_DDR |= (1<<SPINDLE_ENABLE_BIT); // Configure as output pin.
|
SPINDLE_ENABLE_DDR |= (1<<SPINDLE_ENABLE_BIT); // Configure as output pin.
|
||||||
#else
|
#else
|
||||||
SPINDLE_DIRECTION_DDR |= (1<<SPINDLE_DIRECTION_BIT); // Configure as output pin.
|
SPINDLE_DIRECTION_DDR |= (1<<SPINDLE_DIRECTION_BIT); // Configure as output pin.
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@ -59,7 +53,7 @@ void spindle_stop()
|
|||||||
{
|
{
|
||||||
// On the Uno, spindle enable and PWM are shared. Other CPUs have seperate enable pin.
|
// On the Uno, spindle enable and PWM are shared. Other CPUs have seperate enable pin.
|
||||||
#ifdef VARIABLE_SPINDLE
|
#ifdef VARIABLE_SPINDLE
|
||||||
TCCRA_REGISTER &= ~(1<<COMB_BIT); // Disable PWM. Output voltage is zero.
|
SPINDLE_TCCRA_REGISTER &= ~(1<<SPINDLE_COMB_BIT); // Disable PWM. Output voltage is zero.
|
||||||
#if defined(CPU_MAP_ATMEGA2560) || defined(USE_SPINDLE_DIR_AS_ENABLE_PIN)
|
#if defined(CPU_MAP_ATMEGA2560) || defined(USE_SPINDLE_DIR_AS_ENABLE_PIN)
|
||||||
#ifdef INVERT_SPINDLE_ENABLE_PIN
|
#ifdef INVERT_SPINDLE_ENABLE_PIN
|
||||||
SPINDLE_ENABLE_PORT |= (1<<SPINDLE_ENABLE_BIT); // Set pin to high
|
SPINDLE_ENABLE_PORT |= (1<<SPINDLE_ENABLE_BIT); // Set pin to high
|
||||||
@ -99,35 +93,31 @@ void spindle_set_state(uint8_t state, float rpm)
|
|||||||
#ifdef VARIABLE_SPINDLE
|
#ifdef VARIABLE_SPINDLE
|
||||||
|
|
||||||
// TODO: Install the optional capability for frequency-based output for servos.
|
// TODO: Install the optional capability for frequency-based output for servos.
|
||||||
#ifdef CPU_MAP_ATMEGA2560
|
|
||||||
uint16_t current_pwm; // 2560 PWM register is 16-bit.
|
|
||||||
#else
|
|
||||||
uint8_t current_pwm; // 328p PWM register is 8-bit.
|
uint8_t current_pwm; // 328p PWM register is 8-bit.
|
||||||
#endif
|
|
||||||
|
|
||||||
// Calculate PWM register value based on rpm max/min settings and programmed rpm.
|
// Calculate PWM register value based on rpm max/min settings and programmed rpm.
|
||||||
if (rpm <= 0.0) { spindle_stop(); } // RPM should never be negative, but check anyway.
|
if (rpm <= 0.0) { spindle_stop(); } // RPM should never be negative, but check anyway.
|
||||||
else {
|
else {
|
||||||
if (settings.rpm_max <= settings.rpm_min) {
|
if (settings.rpm_max <= settings.rpm_min) {
|
||||||
// No PWM range possible. Set simple on/off spindle control pin state.
|
// No PWM range possible. Set simple on/off spindle control pin state.
|
||||||
current_pwm = PWM_MAX_VALUE;
|
current_pwm = SPINDLE_PWM_MAX_VALUE;
|
||||||
} else {
|
} else {
|
||||||
if (rpm > settings.rpm_max) { rpm = settings.rpm_max; }
|
if (rpm > settings.rpm_max) { rpm = settings.rpm_max; }
|
||||||
if (rpm < settings.rpm_min) { rpm = settings.rpm_min; }
|
if (rpm < settings.rpm_min) { rpm = settings.rpm_min; }
|
||||||
#ifdef SPINDLE_MINIMUM_PWM
|
#ifdef SPINDLE_MINIMUM_PWM
|
||||||
float pwm_gradient = (PWM_MAX_VALUE-SPINDLE_MINIMUM_PWM)/(settings.rpm_max-settings.rpm_min);
|
float pwm_gradient = (SPINDLE_PWM_MAX_VALUE-SPINDLE_MINIMUM_PWM)/(settings.rpm_max-settings.rpm_min);
|
||||||
current_pwm = floor( (rpm-settings.rpm_min)*pwm_gradient + (SPINDLE_MINIMUM_PWM+0.5));
|
current_pwm = floor( (rpm-settings.rpm_min)*pwm_gradient + (SPINDLE_MINIMUM_PWM+0.5));
|
||||||
#else
|
#else
|
||||||
float pwm_gradient = (PWM_MAX_VALUE)/(settings.rpm_max-settings.rpm_min);
|
float pwm_gradient = (SPINDLE_PWM_MAX_VALUE)/(settings.rpm_max-settings.rpm_min);
|
||||||
current_pwm = floor( (rpm-settings.rpm_min)*pwm_gradient + 0.5);
|
current_pwm = floor( (rpm-settings.rpm_min)*pwm_gradient + 0.5);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
OCR_REGISTER = current_pwm; // Set PWM output level.
|
SPINDLE_OCR_REGISTER = current_pwm; // Set PWM output level.
|
||||||
TCCRA_REGISTER |= (1<<COMB_BIT); // Ensure PWM output is enabled.
|
SPINDLE_TCCRA_REGISTER |= (1<<SPINDLE_COMB_BIT); // Ensure PWM output is enabled.
|
||||||
|
|
||||||
// On the Uno, spindle enable and PWM are shared, unless otherwise specified.
|
// On the Uno, spindle enable and PWM are shared, unless otherwise specified.
|
||||||
#if defined(CPU_MAP_ATMEGA2560) || defined(USE_SPINDLE_DIR_AS_ENABLE_PIN)
|
#if defined(USE_SPINDLE_DIR_AS_ENABLE_PIN)
|
||||||
#ifdef INVERT_SPINDLE_ENABLE_PIN
|
#ifdef INVERT_SPINDLE_ENABLE_PIN
|
||||||
SPINDLE_ENABLE_PORT &= ~(1<<SPINDLE_ENABLE_BIT);
|
SPINDLE_ENABLE_PORT &= ~(1<<SPINDLE_ENABLE_BIT);
|
||||||
#else
|
#else
|
||||||
|
@ -41,16 +41,16 @@ uint8_t system_control_get_state()
|
|||||||
{
|
{
|
||||||
uint8_t control_state = 0;
|
uint8_t control_state = 0;
|
||||||
uint8_t pin = (CONTROL_PIN & CONTROL_MASK);
|
uint8_t pin = (CONTROL_PIN & CONTROL_MASK);
|
||||||
#ifndef INVERT_ALL_CONTROL_PINS
|
#ifdef INVERT_CONTROL_PIN_MASK
|
||||||
pin ^= CONTROL_INVERT_MASK;
|
pin ^= INVERT_CONTROL_PIN_MASK;
|
||||||
#endif
|
#endif
|
||||||
if (pin) {
|
if (pin) {
|
||||||
#ifdef ENABLE_SAFETY_DOOR_INPUT_PIN
|
#ifdef ENABLE_SAFETY_DOOR_INPUT_PIN
|
||||||
if (bit_istrue(pin,(1<<SAFETY_DOOR_BIT))) { control_state |= CONTROL_PIN_INDEX_SAFETY_DOOR; }
|
if (bit_isfalse(pin,(1<<CONTROL_SAFETY_DOOR_BIT))) { control_state |= CONTROL_PIN_INDEX_SAFETY_DOOR; }
|
||||||
#endif
|
#endif
|
||||||
if (bit_istrue(pin,(1<<RESET_BIT))) { control_state |= CONTROL_PIN_INDEX_RESET; }
|
if (bit_isfalse(pin,(1<<CONTROL_RESET_BIT))) { control_state |= CONTROL_PIN_INDEX_RESET; }
|
||||||
if (bit_istrue(pin,(1<<FEED_HOLD_BIT))) { control_state |= CONTROL_PIN_INDEX_FEED_HOLD; }
|
if (bit_isfalse(pin,(1<<CONTROL_FEED_HOLD_BIT))) { control_state |= CONTROL_PIN_INDEX_FEED_HOLD; }
|
||||||
if (bit_istrue(pin,(1<<CYCLE_START_BIT))) { control_state |= CONTROL_PIN_INDEX_CYCLE_START; }
|
if (bit_isfalse(pin,(1<<CONTROL_CYCLE_START_BIT))) { control_state |= CONTROL_PIN_INDEX_CYCLE_START; }
|
||||||
}
|
}
|
||||||
return(control_state);
|
return(control_state);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user