G-Codes for CNC

  • As a complement to my post in feature request for CNC G-Codes.
    Generally, the first operation before starting a cut is to make a zero on the corner of the plate/part to be cut. All CNC software have zero buttons but here we can use Macro buttons for that with a G92.

    M0/M1 stop/start - for tool change - or M6 for tool change (automatic ?)-
    Typically, a M0 command stop the spindle, move the head to a tool change/calibration area and rise the spindle near max Z, as you need a good access to the to change the bit, and then you have to do the zero of the tool after installing it.
    So, these G-code (M0 and M1) shall start macros.

    The zero is done either manually, moving the head till bit enter in contact with a plate, or with a contact switching when the bit touch it. Nothing really different from a Z-probe, except its is done DURING a cut session, so nothing else than the Z homing shall be done. A local command help a lot and often CNC are equipped with pendants.
    If you have no local command, an automatic tool calibration is simpler to operate.

    M3/M5 start/stop spindle
    Nothing special here, any Mosfet could be used to command a SSR or the stop/start of an inverter and also stop the chip aspiration, if this is not done when stopping the spindle. Often spindle and aspiration are just coupled.

    M8/M9 Coolant on/off
    Simple on/off of one available MosFet
    M10/M11 : Vacuum (for part maintaining) - lower priority
    Simple on/off of one available MosFet
    Sn : spindle speed

    • Frequently inverter speed is controlled with a 0-10V signal. So some circuitry is needed. A high frequency PWM with a capacitor may be ok. The 10V can be supplied by low cost buck converter.

Log in to reply