Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

set co $mom_sys_control_out

set ci $mom_sys_control_in

MOM_output_literal ";Operación: $mom_operation_name "

MOM_output_literal ";Herramienta: $mom_tool_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);

settings_restore(SETTINGS_RESTORE_ALL); // Force restore all EEPROM data.

report_grbl_settings();

// 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;

// for (i=0; i<=SETTING_INDEX_NCOORD; 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.

uint8_t get_step_pin_mask(uint8_t axis_idx)

if ( axis_idx == X_AXIS ) { return((1<<X_STEP_BIT)); }

if ( axis_idx == Y_AXIS ) { return((1<<Y_STEP_BIT)); }

return((1<<Z_STEP_BIT));

}
// Returns direction pin mask according to Grbl internal axis indexing.

uint8_t get_direction_pin_mask(uint8_t axis_idx)

if ( axis_idx == X_AXIS ) { return((1<<X_DIRECTION_BIT)); }

if ( axis_idx == Y_AXIS ) { return((1<<Y_DIRECTION_BIT)); }

return((1<<Z_DIRECTION_BIT));

// Returns limit pin mask according to Grbl internal axis indexing.

uint8_t get_limit_pin_mask(uint8_t axis_idx)

if ( axis_idx == X_AXIS ) { return((1<<X_LIMIT_BIT)); }

if ( axis_idx == Y_AXIS ) { return((1<<Y_LIMIT_BIT)); }

return((1<<Z_LIMIT_BIT));

}
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/>.

*/

#ifndef limits_h

#define limits_h

// Initialize the limits module

void limits_init();

// Disables hard limits.

void limits_disable();

// Returns limit state as a bit-wise uint8 variable.

uint8_t limits_get_state();

// Perform one portion of the homing cycle based on the input settings.

void limits_go_home(uint8_t cycle_mask);


// Check for soft limit violations

void limits_soft_check(float *target);

#endif

You might also like