Do all M-codes require there own line?
Or can I write
G1X12Y6Z.25F23M7
G1X13Y8Z.25F23M9
or does it have to be
G1X12Y6Z.25F23
M7
G1X13Y8Z.25F23
M9
I want to mist relativly often... Stratigically through out the program with out a STOP or PAUSE...
Do all M-codes require there own line?
Or can I write
G1X12Y6Z.25F23M7
G1X13Y8Z.25F23M9
or does it have to be
G1X12Y6Z.25F23
M7
G1X13Y8Z.25F23
M9
I want to mist relativly often... Stratigically through out the program with out a STOP or PAUSE...
Hey check out my website...www.cravenoriginal.com
Thanks Marc
No, not all M-codes need to be in a block by themselves... in fact, it's pretty rare. Most can be in a block with axis movement, and some controls allow multiple M-codes in the same block.
One consideration is when they're in a block with axis motion, some M-codes are BOS (beginning of span, which are executed at the start of the move) and some are EOS (end of span, which are executed at the end of the move).
It can also depend on your controller, Mach3 for example allows you to configure delays for M3,M4,M7,M8. So if you are using a flood pump that takes 10 seconds to fill the lines before coolant reaches the cutter the machine will pause on the M8 command. I also recall reading issues where Mach3 still has a minute pause even when the delay is set to zero, not sure if that's just for the spindle though... I suppose just the fact that It is checking a parameter for the delay time could cause a delay??? Some plasma posts I have seen use of the M7,M9 to turn torch on/off as there is less or no spin up delay on those outputs so check your configuration.
How about adding a timer circuit to an output that allows the mist to Pulse when enabled. You still get to turn it on and off as needed, but would cause less disruptions to your milling code. Or, you could add another "axis" and use the direction and or step pin to turn the mist on and off.
Thanks I'll try it and see how it goes.
Hey check out my website...www.cravenoriginal.com
Thanks Marc
Some machines also have a maximum number of M codes per line. Many are 3 codes per line but there are as many that will only fire 1 on a line...
It's just a part..... cutter still goes round and round....
In many systems whether they allow more than one M code on a line or not, all require a FIN(ish) or completion signal, if the M code requires no confirmation from an external source then the FIN signal is normally sent immediately, e.g. turn on a coolant pump.
If more than one on a line, then each will send its own FIN signal in turn, if one does not get the FIN signal it expects, the line will 'hang'.
Then you have to figure out which one caused the hold up.
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.