I am curious. Why on earth would you take the time to do this?
I am writing a program that parses and processes the languages used by various CNC controls. I would like to add the Okuma (and TOSNUC) controls to the program. Does anybody have a PDF of a programming/gcode/mcode manual for the Okuma (OSP5000?) and/or Tosnuc (888?) machines? Or know of a place they can be downloaded from?
The program is mainly for mills. I have an Okuma lathe manual.
I am curious. Why on earth would you take the time to do this?
Long story... Once upon I type I bought a desktop mill. I use Eagle/PCB-Gcode to generate PCB milling routines. The output of PCB-GCODE just plain sucks when it comes to the efficiency of the output code. The available gcode optimizers were not much help. So I wrote a little 500 line program to read in the gcode, optimize it, and write it back out. All was well and good...
Then I came across an older pcb-gcode output that used G81 to drill holes. So I tweaked my code to recognize those. All was well and good...
Then I came across an EMC2 program to cut something that I needed, but my mill runs on Mach3. So things started to get a little out of hand... and I added a complete EMC parser/converter to the program. I could now run any EMC2 code on my Mach3 mill. All was well and good...
Then I came across a Fanuc program that I could use. So I added Fanuc support to the code. All was well and good...
Then things really started to get out of hand... Acracmatic, Anilam, Bridgeport, Centroid, Denford, Fadal, Fagor, Haas, Mazak, MillMaster, Mitsubisihi, Okuma, TurboCNC, WinCNC, Yasnac, and a few others found their way in... My little program is now 27,000 lines of code. It handles the Okuma User Task2 and TOSNUC macro languages but I don't have a lot of info on their gcodes and mcodes. Also, I am probably missing some of the finer details of their high-level languages.
But it does do some rather neat stuff... it parses and interprets the input program (including all parametric/high level programming/subroutines/etc), and converts everything to basic inline gcode and mcode. The output has all offsets applied, incremental addresses are converted to absolute, metric/inch conversion etc. Rotations/mirroring/translations/scaling etc are applied. It can convert the gcode syntax used by any of the input languages to any of the output languages (OK, there's a lot more to be done there). It can optimize the cutting sequence of 2D/router type operations (one of my PC boards went from 42 minutes to under 7 minutes). It can convert the gcode input to DXF files, etc. It slices, it dices, it makes Julienne fries...
Know any other CNC controls/languages that would be worth handling? I'd need a copy of the programming manual...
Interesting. Thanks for the information and background. I can see where this might come in handy for a shop that has existing programs and adds new machines and wants to convert those programs. As far as optimizing, I guess the proof is in the pudding. With MasterCAM, I can change the parameters and tweak the post-processor to get pretty darned efficient G-code for milling. Lathe is another story. I have not found any software yet that can properly apply the canned cycles available for most lathes.
If I run across any e-manuals I think you can use, I will post them.
Yes, it also lets you do things like macro programming/rotations/scaling/extended workpiece offsets/etc on a machine without having to send gigabucks to the manufacturer for those options.
Another use is being able to send the output to a backplotter program that can't handle the macro programming language for your machine... but that assumes my program converts things properly... yeah, like that's gonna happen... Without a doubt, CNC manuals are some of the absolute WORST examples of technical writing that I have ever seen. It seems that the manufacturers are trying to out-do each other in the quality of their crapitude.
Very interesting not to mention ambitious.
What language are you writing this in?
Control the process, not the product!
Machining is more science than art, master the science and the artistry will be evident.
It's all written in straight C (none of that plus-plus crap here). Command line interface (no GUI). One big happy 28,500 line (and growing) file.
I can tell you that if you write such a thing, you'll have a tough time finding anybody that knows more about g-code ... or that has a noggin that throbs more ... or that has a greater appreciation of the crapitude that passes itself off as CNC programming manuals.
Quite the project!
Out of curiosity, what are some of the better manuals and worst ones you have come across? I have only dealt with Fanuc (also Hitachi-Seiki, Excel, Lablond-Makino variants) and a Mazak.
Most read a reference manuals only. Know what you need, you can look it up, otherwise... Hitachi actually had a bit of tutorial and usage samples included, but badly translated Japanese sometimes.
I think Haas has the best manuals...
I can usually work my way around a lot of Jinglish.
One big problem with most manuals is their examples. Either they have blatant/subtile errors or their data points fail to answer important questions about what they are describing). Typically they have examples with the data origin at 0,0 and/or data points that lie on axis at 0. Not very useful if you are demonstrating workpiece offsets or mirroring/rotations around a scaling/rotation center.
Also they use way too much meaningless/undefined/contradictory jargon.
It is utterly amazing that just about every time I have a question about an issue/implementation, the manuals manage to raise more questions than answers or totally avoid the issue.
As far as the worst manual... my vote currently goes to Mill Master Pro. There is almost no example code (i.e. not a single example of how to define a subroutine). The description of their implementation of G92 is useless (in one place it says something like it lets you reset the tool position without causing movement, but then they mention it is useful for step and repeat operations), and no where do they tell you that their trig functions work in radians (they are the only ones that do that).
Oh yeah, the Mach3 manual is soooo full of errors and omissions. Like they give several pages of examples on how their canned drill cycles work complete with step by step, point by point locations. But their implementation does something totally different (i.e. the Z and R values are always in absolute coordinates, but their examples clearly show it working with incremental coordinates)
This program you are developing sounds like a neat idea, what are your plans for it? share? sell? I would be interested in testing my Tosnuc macro programs with it, can it do that graphically?
The plan is to make it available for free... It is a rather useful Swiss arm knife for gcode programs.
It has quite a bit left to do (like properly implementing all the drill cycle formats for all the different machines, so it can translate between them).
It has the ability to output the results of the program as a DXF file so you can use a DXF viewer to get an idea of what the program is doing (or recover a lost DXF source file from a gcode file).
My TOSNUC implementation is VERY preliminary since I don't have a TOSNUC manual to work from. It understands the gist of the language, but probably not any of the subtle details. It also does not know for sure what the G and M codes do.
If anybody can supply me with a TOSNUC or OKUMA programming manual PDF, I would greatly appreciate it....
BTW, at last count the program was over 37,000 lines long...
I can't seam to be able to upload to this site so get it here:
2shared - download Tosnuc 777-3.pdf