diff --git a/changelog.md b/changelog.md index 80a0fb4..1b93552 100644 --- a/changelog.md +++ b/changelog.md @@ -1,10 +1,20 @@ ## grblHAL changelog +Build 20250927 + +Core: + +* Fix for stepper spindle in polling mode causing alarm 14 when used for spindle synced motion \(G33, G76\). +Ref. iMXRT1062 discussion [#100](https://github.com/grblHAL/iMXRT1062/discussions/100). + +--- + Build 20250926 Core: -* Updated motion in units per revolution mode (G95) to handle spindle RPM changes. Changed initial wait for two index pulses to check RPM > 0 before starting such motion. +* Updated motion in units per revolution mode (G95) to handle spindle RPM changes. +Changed initial wait for two index pulses to check RPM > 0 before starting such motion. --- @@ -35,6 +45,8 @@ Plugins: * Misc, eventout: added _Motion_ event \(trigged by RUN, JOG and HOMING states\) and toggle events for optional stop, single step and block delete signals. Ref. discussion [#813](https://github.com/grblHAL/core/discussions/813). +--- + Build 20250910 Core: diff --git a/grbl.h b/grbl.h index e328072..d4a6b6e 100644 --- a/grbl.h +++ b/grbl.h @@ -42,7 +42,7 @@ #else #define GRBL_VERSION "1.1f" #endif -#define GRBL_BUILD 20250926 +#define GRBL_BUILD 20250927 #define GRBL_URL "https://github.com/grblHAL" diff --git a/ngc_params.c b/ngc_params.c index 8e7c609..cb7ccfc 100644 --- a/ngc_params.c +++ b/ngc_params.c @@ -171,7 +171,7 @@ static float tool_offset (ngc_param_id_t id) { uint_fast8_t axis = id % 10; - return _convert_pos(axis <= N_AXIS ? gc_state.tool_length_offset[axis] : 0.0f, axis); + return axis <= N_AXIS ? gc_state.tool_length_offset[axis] : 0.0f; } static float g28_home (ngc_param_id_t id) @@ -183,7 +183,7 @@ static float g28_home (ngc_param_id_t id) if(axis <= N_AXIS && settings_read_coord_data(CoordinateSystem_G28, &data.xyz)) value = data.xyz[axis - 1]; - return _convert_pos(value, axis); + return value; } static float g30_home (ngc_param_id_t id) @@ -195,13 +195,13 @@ static float g30_home (ngc_param_id_t id) #if COMPATIBILITY_LEVEL > 1 if(id <= CoordinateSystem_G59) { #endif - if(axis <= N_AXIS && settings_read_coord_data(CoordinateSystem_G30, &data.xyz)) + if (axis <= N_AXIS && settings_read_coord_data(CoordinateSystem_G30, &data.xyz)) value = data.xyz[axis - 1]; #if COMPATIBILITY_LEVEL > 1 } #endif - return _convert_pos(value, axis); + return value; } static float coord_system (ngc_param_id_t id) @@ -220,7 +220,7 @@ static float coord_system_offset (ngc_param_id_t id) if (axis > 0 && axis <= N_AXIS && settings_read_coord_data((coord_system_id_t)id, &data.xyz)) value = data.xyz[axis - 1]; - return _convert_pos(value, axis); + return value; } static float g92_offset_applied (ngc_param_id_t id) @@ -232,7 +232,7 @@ static float g92_offset (ngc_param_id_t id) { uint_fast8_t axis = id % 10; - return _convert_pos(axis <= N_AXIS ? gc_state.g92_coord_offset[axis - 1] : 0.0f, axis); + return axis <= N_AXIS ? gc_state.g92_coord_offset [axis - 1] : 0.0f; } static float work_position (ngc_param_id_t id) @@ -677,7 +677,7 @@ static char *ngc_name_tolower (char *s) static char name[NGC_MAX_PARAM_LENGTH + 1]; uint_fast8_t len = 0; - char c, *s1 = s, *s2 = name; + char c, *s1 = s, *s2 = name; while((c = *s1++) && len <= NGC_MAX_PARAM_LENGTH) { if(c > ' ') { @@ -687,7 +687,7 @@ static char *ngc_name_tolower (char *s) } *s2 = '\0'; - return name; + return name; } bool ngc_named_param_get (char *name, float *value) @@ -999,7 +999,7 @@ uint_fast8_t ngc_call_level (void) uint8_t ngc_float_decimals (void) { - return settings.flags.report_inches ? N_DECIMAL_COORDVALUE_INCH : N_DECIMAL_COORDVALUE_MM; + return settings.flags.report_inches ? N_DECIMAL_COORDVALUE_INCH : N_DECIMAL_COORDVALUE_MM; } static status_code_t macro_get_setting (void) diff --git a/state_machine.c b/state_machine.c index 9c1875a..4af1100 100644 --- a/state_machine.c +++ b/state_machine.c @@ -272,6 +272,8 @@ void state_set (sys_state_t new_state) while(index != block->spindle.hal->get_data(SpindleData_Counters)->index_count) { + grbl.on_execute_realtime(sys_state); + if(hal.get_elapsed_ticks() - ms > 5000) { system_raise_alarm(Alarm_Spindle); return; @@ -283,12 +285,6 @@ void state_set (sys_state_t new_state) } // TODO: allow real time reporting? } - - if(block->spindle.hal->get_data(SpindleData_RPM)->rpm == 0.0f) { - system_raise_alarm(Alarm_Spindle); - return; - } - } else if(block->spindle.hal->get_data(SpindleData_RPM)->rpm == 0.0f) { system_raise_alarm(Alarm_Spindle); return;