![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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
| ||||
| ||||
| 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 |
|
#4
| |||
| |||
| 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 |
|
#6
| |||
| |||
| 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
| |||
| |||
| 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 |
|
#9
| |||
| |||
| 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
| ||||
| ||||
|
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 |
| Sponsored Links |
|
#11
| |||
| |||
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
| ||||
| ||||
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 |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What difference? | civilseal | Stepper Motors and Drives | 2 | 06-12-2008 07:34 PM |
| Difference between 320 and 340? | amasters | Gecko Drives | 5 | 05-24-2006 05:46 PM |
| What's the difference? | saturnnights | Knee Vertical Mills | 10 | 05-04-2006 10:31 AM |
| What's the difference? | ignatz | Stepper Motors and Drives | 4 | 03-07-2006 10:39 PM |
| What is the difference? | Hack | General CNC (Mill and Lathe) Control Software (NC) | 5 | 10-09-2005 09:46 AM |