587,840 active members*
3,455 visitors online*
Register for free
Login

Thread: M codes

Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2006
    Posts
    340

    Arrow M codes

    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

  2. #2
    Join Date
    Mar 2003
    Posts
    2932
    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).

  3. #3
    Join Date
    Dec 2008
    Posts
    226
    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.

  4. #4
    Join Date
    Sep 2006
    Posts
    340
    Thanks I'll try it and see how it goes.
    Hey check out my website...www.cravenoriginal.com
    Thanks Marc

  5. #5
    Join Date
    Mar 2005
    Posts
    988
    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....

  6. #6
    Join Date
    Dec 2003
    Posts
    24220
    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.

Similar Threads

  1. MDI Codes Anyone know about them?
    By manyhobies in forum Coding
    Replies: 7
    Last Post: 08-18-2014, 04:23 PM
  2. Need full list of G CODES AND M CODES FOR FANUC 21I
    By SonnyTees.com in forum G-Code Programing
    Replies: 3
    Last Post: 02-23-2010, 05:27 PM
  3. G02 G03 Codes
    By cordillera1 in forum Fanuc
    Replies: 4
    Last Post: 11-21-2008, 04:26 PM
  4. 417 & 427 codes
    By chetohead in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 04-30-2008, 08:40 PM
  5. M-codes and G-codes 4 Matsuura ES-1000V
    By maximusek in forum G-Code Programing
    Replies: 2
    Last Post: 11-27-2007, 01:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •