Page 1 of 2 12 LastLast
Results 1 to 12 of 14

Thread: What is the difference between M30 and M02

  1. #1
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0

    What is the difference between M30 and M02

    On my 0i Mate TC both are apparently same, causing program end as well as RESET which clears all the local and common variables. I thought M02 will not clear the variables, but it does clear.
    Then what is the difference between M02 and M30?
    Is it MTB dependent?
    Thanks in advance for your kind help.


  2. #2
    Moderator tobyaxis's Avatar
    Join Date
    Jan 2006
    Location
    USA
    Posts
    4,394
    Downloads
    0
    Uploads
    0
    I know little about macro variables but M2 is a Program End where M30 is Program End and Rewind back to the beginning of the program.
    Toby D.
    "Imagination and Memory are but one thing, but for divers considerations have divers names"
    Schwarzwald

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

    www.refractotech.com


  3. #3
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    I also heard the same. But on my machine M02 also causes rewind. I am not able to figure out any difference between M02 and M30.


  4. #4
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    What kind of control are you using? There might be a parameter setting that will not allow rewind of the program when using M2. This could also be built into the ladder by the MTB that it sees the rewind when executing a M2.

    I am not 100% but I have never come across a Fanuc control that did not clear the local variables (#1-#33) when program end or reset was used. Now if your common variables (#100-#199) there should be a setting for so they do not clear at program end or reset, they will however clear to null at power down. Variables #500-#999 should never clear until they are programmed to clear or you change them via MDI.

    Stevo


  • #5
    Registered dcoupar's Avatar
    Join Date
    Mar 2003
    Location
    USA
    Posts
    2,500
    Downloads
    0
    Uploads
    0
    You might want to check #3404 bit 5. On the 0iTC, this parameter controls whether M02 searches for the head of the program.


  • #6
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    I referred to the parameter manual of 0i C.
    As per the given information (and as I have interpreted it), M30 and M02 can be made to behave differently or in the same manner. The difference is of REWIND.
    Parameter 3404#4 = 1 rewinds after M30.
    Parameter 3404#5 = 1 rewinds after M02.
    So, both cause system reset, but rewind depends on the respective parameter settings.

    Incidently, if you set 6001#7 = 1, local variables are not cleared by reset.
    Similarly, if you set 6001#6 = 1, common variables are not cleared by reset.

    This, however, may not be considered a safe programming practice, because everybody believes that local and common variables start with null values. This also means that a variable should preferably be made null, before using it. Otherwise, be prepared for surprises, at least occasionally.


  • #7
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    I have not worked on an Oi control before so this is the first that I have seen a parameter setting to allow or disallow the clearing of the local variables. I have seen the option for the common variables but only for power down not for program end or reset button. There is no setting for the permanent common variables (unless on newer controls). I have never assumed that local variables #100-#199 are cleared to null when starting. I only believed this if a power cycle was preformed.

    I agree that I would not want to leave data in the local variables. I would not care either way if the common variables #100-#199 cleared at program end. I use my locals for things like number or holes or bolt circles etc. Then use the common for calculations and cutting parameters. Onto the permanent common variables for clearance planes, crash protection, tool data etc. So the commons don’t make much difference to me.

    I am curious as to why there would be a parameter setting to allow M2 to act like M30. If you wanted the program to rewind then use M30 if not use M2. Does anyone have a scenario where you would want this setting? Is this something so postprocessors don’t need to be changed?

    Good info to know.

    Stevo


  • #8
    Registered
    Join Date
    Aug 2006
    Location
    Brazil
    Posts
    97
    Downloads
    0
    Uploads
    0
    Some MTB use M30 to "Auto POWER OFF". And they work with to M30 or M02 in ladder program to RESET (G8.6 and G8.7). Some MTB´s use the same to reset the program. (variables and rewind)

    Daniel


  • #9
    Registered
    Join Date
    Sep 2005
    Location
    USA
    Posts
    755
    Downloads
    0
    Uploads
    0
    The difference between M30 and M02 dates back to the old days of paper tape readers. M02 is a "Program end" and that output signal is usually wired to the remote reset input signal (ERS). An M02 reset is just going to stop the program. The M30 output was tied to the "reset-rewind" input signal (RRW) which not only resets the CNC, but also sends a "rewind" command to the paper tape reader. The tape reader is supposed to wind the tape backwards until it gets to the "rewind stop" or percent sign, and while the tape is rewinding, the control is inhibited from cycle starting again. On the older controls with tape readers that have reels, you will see that the tape reader will run in reverse after an M30 only if you are in TAPE mode. In MEMORY mode, the tape reader does nothing at all, but the memory resets to the begining. On the old controls with tape readers, we used to make two kinds of tapes. Very long tapes went on the reels, and ended in an M30. Shorter tapes we just spliced into a loop-tape. Those tapes ended with an M02 so that the tape reader would not try to rewind. We used loop tapes when possible because we could cycle start almost immediately after the program finished instead of waiting for the tape to rewinds.

    Since tape readers are passe nowadays, there is no practical difference between the ERS (reset) input and the RRW (Reset-rewind) input. They both stop the control, reset any variables, and set the program back to the beginning. There are parameters that determine whether or not many of the modal G-codes are set back to their power-up (Clear) states when a Reset is performed.

    I'm starting to feel like a CNC historian.


  • #10
    Moderator tobyaxis's Avatar
    Join Date
    Jan 2006
    Location
    USA
    Posts
    4,394
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Dan Fritz View Post
    I'm starting to feel like a CNC historian.
    I never used the Tape Readers but your detailed info clears up a lot of old questions. Very Informative.

    Thanks Dan
    Toby D.
    "Imagination and Memory are but one thing, but for divers considerations have divers names"
    Schwarzwald

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

    www.refractotech.com


  • #11
    Registered
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    11,960
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Dan Fritz View Post
    ..... On the old controls with tape readers, we used to make two kinds of tapes. Very long tapes went on the reels, and ended in an M30. Shorter tapes we just spliced into a loop-tape. Those tapes ended with an M02 so that the tape reader would not try to rewind...

    ....I'm starting to feel like a CNC historian.
    I find it fascinating how the archaic terminology is still active; M30 program stop and rewind.

    You make a good CNC historian and I find it very interesting. I almost got involved in CNC in 1979 but the company I was working for went bankrupt. My next exposure to CNC was in 1999 and there were lot of changes; your 'history' gives interesting background.
    An open mind is a virtue...so long as all the common sense has not leaked out.


  • #12
    Moderator tobyaxis's Avatar
    Join Date
    Jan 2006
    Location
    USA
    Posts
    4,394
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Geof View Post
    I find it fascinating how the archaic terminology is still active; M30 program stop and rewind.

    You make a good CNC historian and I find it very interesting. I almost got involved in CNC in 1979 but the company I was working for went bankrupt. My next exposure to CNC was in 1999 and there were lot of changes; your 'history' gives interesting background.
    The Historians of Machining, LOL.

    Geof, remember Machine Shops that were Overhead Belt Driven by Steam Engines???
    Toby D.
    "Imagination and Memory are but one thing, but for divers considerations have divers names"
    Schwarzwald

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

    www.refractotech.com


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. What difference?
      By civilseal in forum Stepper Motors and Drives
      Replies: 2
      Last Post: 06-12-2008, 08:34 PM
    2. Difference between 320 and 340?
      By amasters in forum Gecko Drives
      Replies: 5
      Last Post: 05-24-2006, 06:46 PM
    3. What's the difference?
      By saturnnights in forum Knee Vertical Mills
      Replies: 10
      Last Post: 05-04-2006, 11:31 AM
    4. What's the difference?
      By ignatz in forum Stepper Motors and Drives
      Replies: 4
      Last Post: 03-07-2006, 11:39 PM
    5. What is the difference?
      By Hack in forum General CNC (Mill and Lathe) Control Software (NC)
      Replies: 5
      Last Post: 10-09-2005, 10:46 AM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.