Fanuc M Code

2 views
Skip to first unread message

Blanchefle Strycker

unread,
Aug 4, 2024, 6:24:41 PM8/4/24
to recurete
TheRobotG-code feature allows CNC operators to control a FANUC robotthrough the CNC. Even operators with little to no experiencewith FANUC robotic systems can create a robot program fromthe CNC using G-code. The Robot G-code feature is availableon FANUC CNC Series Oi-F, Oi-F Plus,30i-B and30i-B Plus.Adding automation to your FANUC CNC has never been easier ormore cost-effective!

Below you will find a list of common codes many builders use. Please remember, all machines may be configured differently and the list below may not match your machine perfectly. If fact, virtually all M-Codes above M79 will vary from builder to builder. Please make sure to contact your machine tool builder to be sure.


I have a robot with a DCS code that is no longer 1111, but no one remembers what it is now. Ive looked through most of the DCS variables and have found nothing. I found an older thread on here that mentions syspass.sv, but when I look in syspass.va(cant view .sv files) there in nothing there that looks different from the syspass.va on a robot that I know is still using 1111. Is there something saved within .sv files that is not shown in .va files? Appreciate any help.


Learned the hard way it works in controlled start. Technically it looks like you might be able to do it in a cold start, but only if you also know the current code. When I did it in cold start I had to first type in the current DCS code, then it would allow me to use the new code that I loaded in. At least that is how it worked on Fanuc's robots at their training facility when I was there this week. They used a code other than 1111 on their training robots. I loaded in syspass on cold start, it even said something at the bottom of the screen about new code loaded, or code changed or something, after loading syspass. When I made a DCS change it still first needed the old code punched in first, then I could use 1111. Instructor said something about they use a master code, and a DCS code, I didn't really understand what he meant by that, so maybe that is why it needed the old code typed in first. Later he talked to another instructor and confirmed that had I loaded syspass in at a controlled start it would have outright changed the code back to 1111.


Old topic, but I just figured this out and figured I would share it in case someone needs it in future. The DCS master code can actually be read in hexadecimal from the syspass.sv file as shown below. The top file the password is 1111, the highlighted hex is "04 57", the bottom file the password is 9713 and highlighted hex is "25 F1". Just use a hexadecimal to decimal converter to get the password from the hex values.


I noticed DCS code written in plain text in file, then I knew the password was 1111 on the one robot so I converted that to hex, and noticed it came after the words DCS code. So any other code would be stored in hex in the exact same position after DCS code.


After they open your file you will end up with the screen like Kalagaraz has above. Then you locate the values and convert them. Then just search for a hexadecimal to decimal converter to get the DCS code. I started with a robot that I knew still had the 1111 code. I wish it had been explained a little better, it took me awhile to figure out how he got the screen in his post.


Ran into this issue once before. Loaded the syspass file in a controlled. When entering the DCS password after file load, was prompted with with "Password change by file load, enter previous password". Didn't know about finding the DCS password in the file, so we loaded and image from a similar robot and restored a fullback up.




Ran into this issue once before. Loaded the syspass file in a controlled. When entering the DCS password after file load, was prompted with with "Password change by file load, enter previous password". Didn't know about finding the DCS password in the file, so we loaded and image from a similar robot and restored a fullback up.


Hi I am using the doosan mill turn for fanuc post. There is a "use Spindle P codes" property that controls the code for turning on the main, sub or live tooling spindle. When set to true it will out put M3(M4) P11 for main spindle and M3(M4) P12. When set to False it will out put M3(M4) for main spindle and M33(M34) for live tool. Witch is fine the problem is with the M34/M35 to say C axis select off/on useing non P codes. now when not using the P code method the M34/M35 to say C axis select off/on is still being used. This is a conflict in the non P code method. How can I get it to stop the out put of the m34/m35 code in none P code? The machine also does not like the G0 G28 H0


Thanks this seams to have worked for me. I have a a problem with the out put of a canned cycle. Are you able to help? my problem is on approach it will do a X0Y0Z0. This Rapid move only shows up with canned cycle turned on. These rapid moves will crash a machine. how can i get ride of them. Also the how can I change back the G97 rpm a the start and end of each cycle to the G96. I found that the old way the post was was nicer for my machines.


Thanks for the info. I will give it a try when i get back from vacation. One more thing. the reason i ask is the control / machine is choking on code when finishing. i just did a large Lam tool about 72" x 8" and mastercam said the cycle time for the finish tool was about 11 hrs. they let it go all night long and it was only half way done the next day it ended up being 23 hrs total. The tool path was Hybrid step over set to .012 with toll set to .0004, create arcs and smooth random. the program feed was 130 ipm but the fastest i saw the it hit was about 45 imp with a lot of 20-30 ipm.


6061 with a .750 ball em we usually prog upwards of 300 ipm on the haas while finishing. the 90's Model Awea's have a hard time with the code so we prog them at 50% of normal. It has to be a perfectly staigh cut of over 5" to get up to 130 IPM.


I word of caution to anybody following the directions on that pdf: BE CAREFUL OF THE G49! The pdf example is showing the G49 being called before the zero return. On a lot of machines, this will try to ram your spindle nose to your work offset Z0. in the blink of an eye. Never a good situation.


Because it's deviating from exactly following your instructions. Some people may not want the machine to think for itself. Also notice the R1 - R10 in the PDF, which adjusts from more smooth to more accurate.


The profiles are as accurate as before but the machine is constantly moving, where before (in std mode) the tool would look like it paused/dwelled when profiling (albeit it didn't stop because finishes were always good).


In my tests, cycle times were quicker as well with High Speed active but that depended on what R level was active. It started tipping slower around R6 IIRC. It's been a few years since I've run the tests. It's probably time to run them again.


I have roboguide but what I'm looking for is a text document like program that I can write code in. It would be nice if it color coded commands, Registers, Frames and the like. I don't know if there is anything like that available. I'm having recollections of older programs that did that for C+ coding.


Kidding aside, once you get over the initial learning hurdle, you may find yourself being much more productive. The constant movement from keyboard to mouse (or trackpad), etc. while coding wastes a lot of time.


Going completely off topic now, but I've been using vi and vi clones for the best part of 25 years now.

I'm at the point that I actually can't stand using any other text editors, but have you ever watched anybody trying to learn vi(m) from scratch?


I haven't had the pleasure, but I remember getting pretty frustrated at first. It wasn't until I unmapped my arrow keys that I started really getting comfortable navigating around with h, j, k, l, w, e, $, ^, etc.


Another thing to look for is having an app treat your collection of files as a project or treat a folder as a project, etc, so that everything can be opened at once. Then, either as a project-wide feature, or as a search-all-open-files feature, be able to search for a given item across your whole project. Critical for learning someone-else's code, or just figuring out if a Register was already used somewhere, or a named Register is no longer being used anywhere.


In the factory automation space, nobody likes downtime and receiving error codes. While using CNCs (view FANUC CNC parts here), many professionals are faced with G Codes. By definition, a G Code is a computer code language that is used to guide CNC machine devices to perform specific motions.


G-Code is the most popular programming language used for programming CNC machinery. Some G words alter the state of the machine so that it changes from cutting straight lines to cutting arcs. Other G words cause the interpretation of numbers as millimeters rather than inches. Some G words set or remove tool length or diameter offsets. Be sure to check out our article covering FANUC CNC Codes, including FANUC M Codes, here.


MRO Electric and Supply has new and refurbished FANUC CNC parts available. We also offer repair pricing. For more information, please call 800-691-8511 or email sa...@mroelectric.com.


In conclusion, becoming well-versed on CNC G-Codes, along with other codes associated with CNCs is imperative in this day and age. By having up-to-speed knowledge of CNC codes, you could most definitely set yourself apart from the average Joe.


Hi there I have been searching all morning and can't seem to find what I'm looking for. I am looking for an explanation on how TCP works and how it is formatted for simultaneous 4th axis work. I just switch to a new shop with all Fanuc controls and they don't have G93. it is an option apparently. I am used to Haas controls and G93. now I am trying to do some 4th axis surfacing and if I program with inverse time feed I get alarm and if I use regular feed it just run real slow.

3a8082e126
Reply all
Reply to author
Forward
0 new messages