-
Greetings. I have been scratching my head for a few days, trying to tweak My machine has no limit switches on X and Y axis, and one limit switch on the negative side of Z axis. My FluidNC config.yaml to drive it is name: "MyCNC"
board: "MyCNC"
start:
must_home: false
stepping:
engine: RMT
idle_ms: 254
dir_delay_us: 1
pulse_us: 3
disable_delay_us: 0
axes:
shared_stepper_disable_pin: gpio.19
x:
steps_per_mm: 34
max_rate_mm_per_min: 2200
acceleration_mm_per_sec2: 80
max_travel_mm: 51
motor0:
standard_stepper:
direction_pin: gpio.5
step_pin: gpio.18
motor1:
null_motor:
y:
steps_per_mm: 34
max_rate_mm_per_min: 2200
acceleration_mm_per_sec2: 80
max_travel_mm: 51
motor0:
standard_stepper:
direction_pin: gpio.22
step_pin: gpio.21
motor1:
null_motor:
z:
steps_per_mm: 50
max_rate_mm_per_min: 700
acceleration_mm_per_sec2: 100
max_travel_mm: 15
motor0:
limit_neg: gpio.23
hard_limits: false
standard_stepper:
direction_pin: gpio.4
step_pin: gpio.16
disable_pin: gpio.17
motor1:
null_motor: My current incorrect settings for grblHAL is
static const int UNDEFINED_PIN = 255;
#define STEP_TIMER_GROUP TIMER_GROUP_0
#define STEP_TIMER_INDEX TIMER_0
#define X_STEP_PIN GPIO_NUM_18
#define Y_STEP_PIN GPIO_NUM_21
#define Z_STEP_PIN GPIO_NUM_16
#define X_DIRECTION_PIN GPIO_NUM_5
#define Y_DIRECTION_PIN GPIO_NUM_22
#define Z_DIRECTION_PIN GPIO_NUM_4
#define STEPPERS_ENABLE_PIN GPIO_NUM_19
#define X_LIMIT_PIN UNDEFINED_PIN
#define Y_LIMIT_PIN UNDEFINED_PIN
#define Z_LIMIT_PIN GPIO_NUM_23
#define SPINDLE_ENABLE_PIN UNDEFINED_PIN
#define SPINDLEPWMPIN UNDEFINED_PIN
// only showing lines with my edits
#define INVERT_ST_ENABLE_MASK (X_AXIS_BIT|Y_AXIS_BIT)
#define INVERT_LIMIT_BIT_MASK (X_AXIS_BIT|Y_AXIS_BIT|Z_AXIS_BIT)
#define DEFAULT_X_STEPS_PER_MM 34.0f
#define DEFAULT_Y_STEPS_PER_MM DEFAULT_X_STEPS_PER_MM
#define DEFAULT_Z_STEPS_PER_MM 50.0f
#define DEFAULT_X_MAX_RATE 2200.0f
#define DEFAULT_Y_MAX_RATE DEFAULT_X_MAX_RATE
#define DEFAULT_Z_MAX_RATE 700.0f
#define DEFAULT_X_ACCELERATION 80
#define DEFAULT_Y_ACCELERATION DEFAULT_X_ACCELERATION
#define DEFAULT_Z_ACCELERATION 100
#define DEFAULT_X_MAX_TRAVEL 51.0f
#define DEFAULT_Y_MAX_TRAVEL DEFAULT_X_MAX_TRAVEL
#define DEFAULT_Z_MAX_TRAVEL 15.0f
#define DEFAULT_STEP_PULSE_MICROSECONDS 3.0f
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 254
#define DEFAULT_JUNCTION_DEVIATION 0.01f
#define DEFAULT_ARC_TOLERANCE 0.002f Can you point out what I'm doing incorrectly here please? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Most settings in grbl/config.h are defaults and can be changed at run time with $-settings - this means changing these and reflashing will not make them take effect until a $RST=* command is issued. Check with the The board map to use is selected in CMakeLists.txt, have you done that? Is the voltage level on the |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response 🙂 OPTION(BOARD_BDRING_V4 "Compile for bdring v4 3-axis board" OFF)
OPTION(BOARD_MY_MACHINE "Compile for my_machine_map.h" ON) and my
and
I don't have the meters with me so can't probe the pins directly at the moment, but I've tried editing $4 and $5, to combinations of 0 and 7 to no avail. |
Beta Was this translation helpful? Give feedback.
-
If it helps, I just tried out Grbl_Esp32. Here's my equivalent settings to successfully drive the machine: #pragma once
#define MACHINE_NAME "MyCNC"
#define X_STEP_PIN GPIO_NUM_18
#define Y_STEP_PIN GPIO_NUM_21
#define Z_STEP_PIN GPIO_NUM_16
#define X_DIRECTION_PIN GPIO_NUM_5
#define Y_DIRECTION_PIN GPIO_NUM_22
#define Z_DIRECTION_PIN GPIO_NUM_4
#define Z_LIMIT_PIN GPIO_NUM_23
#define STEPPERS_DISABLE_PIN GPIO_NUM_19
#define Z_DISABLE_PIN GPIO_NUM_17
#define DEFAULT_STEP_PULSE_MICROSECONDS 3
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 254
#define DEFAULT_JUNCTION_DEVIATION 0.01
#define DEFAULT_ARC_TOLERANCE 0.002
#define DEFAULT_HOMING_ENABLE 0
#define DEFAULT_X_STEPS_PER_MM 34
#define DEFAULT_Y_STEPS_PER_MM DEFAULT_X_STEPS_PER_MM
#define DEFAULT_Z_STEPS_PER_MM 50.0
#define DEFAULT_X_MAX_RATE 2200.0
#define DEFAULT_Y_MAX_RATE DEFAULT_X_MAX_RATE
#define DEFAULT_Z_MAX_RATE 700.0
#define DEFAULT_X_ACCELERATION 80.0
#define DEFAULT_Y_ACCELERATION DEFAULT_X_ACCELERATION
#define DEFAULT_Z_ACCELERATION 100.0
#define DEFAULT_X_MAX_TRAVEL 51.0f
#define DEFAULT_Y_MAX_TRAVEL 51.0f
#define DEFAULT_Z_MAX_TRAVEL 15.0f
#undef ENABLE_BLUETOOTH
#undef ENABLE_TELNET
#undef ENABLE_AUTHENTICATION
#undef ENABLE_SD_CARD |
Beta Was this translation helpful? Give feedback.
-
Replace driver.c with this version and do not define unassigned pins as pin 255 - somehow this leaves pin 19 as an input later in the startup sequence. my_machine_map.h:
|
Beta Was this translation helpful? Give feedback.
Replace driver.c with this version
driver.zip
and do not define unassigned pins as pin 255 - somehow this leaves pin 19 as an input later in the startup sequence.
my_machine_map.h: