Posted 14 Nov 2016 i have a question about M codes. what is it? using QD75D4 motion control Share this post Link to post Share on other sites
Posted 14 Nov 2016 M Code is a standard instruction set for CNC machines. Share this post Link to post Share on other sites
Posted 15 Nov 2016 dforsythe, you are thinking of G code. M code is a numeric code which is stored when the control reaches that step in the program. For example it can be a step number. It's use is optional, so it's really up to you how/if you use it. Share this post Link to post Share on other sites
Posted 15 Nov 2016 Crossbow, that is not the way I understand it. I was taught that G codes typically deal with the motion control aspect of a CNC and M codes deal with the canned functions like turning the coolant on and off or turning a spindle on and off. I am not a CNC expert, but the motion controllers I have used operated this way. A quick Google search confirmed this. Maybe it is device specific? Share this post Link to post Share on other sites
Posted 16 Nov 2016 M code is entirely up to the end user. It's just a number written to a register. Sometimes it's written at the start of a motion step and sometimes at the end. Share this post Link to post Share on other sites