add m-codes
Hi,
as i want to use repetier fw also for milling i think about adding m-codes like M3 , M5 for spindle on/off an a couple of other commands
is there something special i hav to take care of?
i want to add the on/off commands similar to the power on off.
just adding the m3 / m5 like this:
case 3: // M3 - Spindle On
#if SPINDLE_ON_PIN>-1
Commands::waitUntilEndOfAllMoves();
previousMillisCmd = HAL::timeInMilliseconds();
SET_OUTPUT(PS_ON_PIN); //GND
WRITE(SPINDLE_ON_PIN, (POWER_INVERTING ? HIGH : LOW));
#endif
break;
case 5: // M5 - Spindle Off
#if PS_ON_PIN>-1
Commands::waitUntilEndOfAllMoves();
SET_OUTPUT(PS_ON_PIN); //GND
WRITE(SPINDLE_ON_PIN,(POWER_INVERTING ? LOW : HIGH));
#endif
break;
has anybody some ideas how to realize other "mill-specific" codes like tool length measurement etc?
thanks for any thoughts
as i want to use repetier fw also for milling i think about adding m-codes like M3 , M5 for spindle on/off an a couple of other commands
is there something special i hav to take care of?
i want to add the on/off commands similar to the power on off.
just adding the m3 / m5 like this:
case 3: // M3 - Spindle On
#if SPINDLE_ON_PIN>-1
Commands::waitUntilEndOfAllMoves();
previousMillisCmd = HAL::timeInMilliseconds();
SET_OUTPUT(PS_ON_PIN); //GND
WRITE(SPINDLE_ON_PIN, (POWER_INVERTING ? HIGH : LOW));
#endif
break;
case 5: // M5 - Spindle Off
#if PS_ON_PIN>-1
Commands::waitUntilEndOfAllMoves();
SET_OUTPUT(PS_ON_PIN); //GND
WRITE(SPINDLE_ON_PIN,(POWER_INVERTING ? LOW : HIGH));
#endif
break;
has anybody some ideas how to realize other "mill-specific" codes like tool length measurement etc?
thanks for any thoughts
Comments
I´ll also implement the G0 as written in the "G0rapidmove" discussion