![]() | |
| 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
| |||
| |||
These days I am trying to figure out various things that can be done using macro programming. I came to know that it is possible to define 10 new G-codes, in the range 1-9999, on 0i Mate TC. And, by mistake or deliberately, if you select a number which already exisits, such as 1 (i.e., G01), it will redefine G01! This is something I never expected. At least the standard G-code should have been "locked" by Fanuc. If you want to verify what I said, just insert 1 as the value of parameter 6050 (or any parameter in the range 6050 - 6059, on 0i Mate TC) , and then run a program which has G01. You will get NUMBER NOT FOUND alarm (because you have not defined a corresponding macro in the range O9010 -O9019, which G01 is trying to call). Such a simple way to make a machine "misbehave"! |
|
#2
| |||
| |||
| Sinha, Interesting find!! I do agree with you; however where would Fanuc draw the line on which G-code is considered standard and should be locked and what is non standard? This brings the other point of if a MTB creates a custom code that runs via ladder you can block out there code by making a custom G-code call via parameters. Would there be any repercussions to this? This is why I will use higher G-code numbers when creating this function. Things like G150, G500, G123 etc. I have found MTB to use numbers in this range that is why I will research the MTB to determine which code I will use. I guess I would ass u me that if someone has the programming skills and ability to start creating custom G&M codes that they would know enough to check the current codes of the machine and use ones not pertaining to that specific machine. Stevo |
|
#3
| |||
| |||
It is indeed possible to redefine some G-codes, M-codes and the T-code. But the basic idea behind this is to provide some extra functions to these codes. We never change the basic function of these codes. Some examples are as follows: 1: There may be a requirement, due to whatever reason, that a feedrate of not more than 100 mm/min be used with tool number 7. The G01 code may be modified to clamp the feedrate to 100 mm/min whenever the specified feedrate for tool number 7 is more than 100 mm/min. 2: When the spindle is running at a very high rpm, reversing the direction abruptly may cause excessive load on the motor, due to inertia. A better way may be to first stop the spindle (M05), dwell for 5 seconds to allow it to stop completely, and then reverse the spindle. Both M03 and M04 can be modified to do this automatically. 3: It is dangerous to change the tool unless the turret is at a safe position, due to a possible interference between the rotating turret and headstock/workpiece/tailstock. The T-code may be modified to automatically send the turret to the reference position before changing the tool. There can be a number of such requirements. Macro programming can make the machine "intelligent", so that it automatically takes care of certain mistakes by the programmer. |
|
#5
| |||
| |||
| James, I agree with you on the macro call portion of using G65 vs a custom code. However there are many other reasons to create these codes. Sometimes a lot of codes are written into the ladder logic and have no programs that run them. Tool change, auto tool offset, pallet changing etc. For example I like to write a lot of custom code inside my tool change operation but on some of my machines there is no tool change program it is all done through the ladder, so I create a custom M6 to call a specific program and in that I have positioning, G43 instate, speed and feed calculation, and variable tracking of the tools. I also use a custom code for head rotation on my 5axis. This program has all the calculations to follow the tool tip based on tool length and angle of rotation so the machine always knows were to tool tip is when programming. Stevo |
| Sponsored Links |
|
#6
| |||
| |||
| This feature was very handy for me. I had been handed an overflow job from another shop that had a simular machine - except mine had a Fanuc 18m and the other shop had a Yaznaq Well the supplied programs were full of G13 calls... Instead of having the other shop repost everything I wrote a macro that would do the G13 Circle cutting/Circle pocket except it could not use an "L" word. The macro was complete with error checking and reading modal values like "D" and "F" It was rushed = Crude yet effective. |
![]() |
| 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 |
| SHEETCAM standard vs. TNG | WSS | CNC Plasma and Waterjet Machines | 12 | 07-03-2009 12:26 PM |
| pocket standard | Beaker | Mastercam | 1 | 11-29-2007 06:00 AM |
| M-codes and G-codes 4 Matsuura ES-1000V | maximusek | G-Code Programing | 2 | 11-27-2007 06:41 AM |
| Help with non-standard pac-sci stepper | Argofanatic | Stepper Motors and Drives | 11 | 08-21-2007 06:43 AM |
| Standard Ballscrews | rhino | Linear and Rotary Motion | 5 | 05-13-2006 06:24 PM |