Professional Documents
Culture Documents
// When homing forced set origin is enabled, soft limits checks need to account for
directionality.
if (bit_istrue(settings.homing_dir_mask,bit(idx))) {
} else {
#else
#endif
if (soft_limit_error) {
// Force feed hold if cycle is active. All buffered blocks are guaranteed to be within
// workspace volume so just come to a controlled stop so position is not lost. When
complete
bit_true_atomic(sys.rt_exec_state, EXEC_FEED_HOLD);
do {
protocol_execute_realtime();
if (sys.abort) { return; }
mc_reset(); // Issue system reset and ensure spindle and coolant are shutdown.
bit_true_atomic(sys.rt_exec_alarm, (EXEC_ALARM_SOFT_LIMIT|EXEC_CRITICAL_EVENT));
// Indicate soft limit critical event
return;
set co $mom_sys_control_out
set ci $mom_sys_control_in
MOM_output_literal ";Operación: $mom_operation_name "
MOM_set_seq_on
// PB_CMD_machine_time
MOM_set_seq_off
void settings_init() {
if(!read_global_settings()) {
report_status_message(STATUS_SETTING_READ_FAIL);
report_grbl_settings();
// a system abort and ensuring any active interrupts are cleanly reset.
spindle_init();
coolant_init();
limits_init();
probe_init();
plan_sync_position();
gc_sync_position();
sys.abort = false;
sys.rt_exec_state = 0;
sys.rt_exec_alarm = 0;
sys.suspend = false;
// Start Grbl main loop. Processes program inputs and executes them.
protocol_main_loop();
// NOTE: Checking paramater data, startup lines, and build info string should be done here,
// but it seems fairly redundant. Each of these can be manually checked and reset or
restored.
// Check all parameter data into a dummy variable. If error, reset to zero, otherwise do
nothing.
// float coord_data[N_AXIS];
// uint8_t i;
// if (!settings_read_coord_data(i, coord_data)) {
// report_status_message(STATUS_SETTING_READ_FAIL);
// }
// }
// NOTE: Startup lines are checked and executed by protocol_main_loop at the end of
initialization.
}
// Returns step pin mask according to Grbl internal axis indexing.
return((1<<Z_STEP_BIT));
return((1<<Z_DIRECTION_BIT));
return((1<<Z_LIMIT_BIT));
}
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
You should have received a copy of the GNU General Public License
*/
#ifndef limits_h
#define limits_h
// Initialize the limits module
void limits_init();
void limits_disable();
uint8_t limits_get_state();
// Perform one portion of the homing cycle based on the input settings.
#endif