yes I would love to see what you have. The problem with your cuve end may be in the motion control setting in the sysvars file of the robot. The program I would like to see is the one that turns 2d g code patterns into tp programs
I don't know if anyone would be interested but I just completed (well it works anyway) a G-Code to Fanuc Teach Pendant Program converter. It basically does exactly what it sounds like. You input a gcode program (currently only for flat cutting AKA using your 6 axis robot as a flatbed blank cutter) and the program spits out a TP program that can be directly compiled and run on the robot. This is a different sort of CNC program but still CAM nonetheless. It supports all sort of goodies like static offsets, position register offsets, different tools and work frames, and setting the head orientation. Graphical viewing of the path is there too. Currently I'm a little iffy on whether the arc correction is working right... What I mean by that is - Fanuc robots follow arcs based on start, end, and a third point that lies on the curve. GCode has a start, end, and arc centerpoint. You need to calculate the third point for the robot for each curve. It seems to work but some cases get improperly figured and I'm not sure if it's surfcam's fault or mine... Might be a tough thing because when I ran these sort of paths out of surfcam to my old gantry flatbed cutter it would screw up the arc corners sometimes too. I think it has to do with having very small radii on corners. The flatbed controller messed up the same way my software is doing. ;(
Is there any interest in a program that can generate Fanuc robot programs? I might even write a compiler to turn the ascii output into binary TP programs if anyone has a need for that (like, say, if you can't get your hands on the maketp program from Fanuc.)
Similar Threads:
yes I would love to see what you have. The problem with your cuve end may be in the motion control setting in the sysvars file of the robot. The program I would like to see is the one that turns 2d g code patterns into tp programs
Well, since I wrote that I fixed the arc problems. But now I'm rewriting it in C# (.NET2005). It sort of works but there are some weird problems. I don't use the SysVars file right now. I'm not sure if I'd need to. So long as it outputs 2D paths with the head axes locked things should be OK. I've used it like that on my setup.
Anyway, someday hopefully there will be something useable. I hope to fix up the C# version and get OpenGL visualization of paths working fairly soon.
Here's some interest...Is there any interest in a program that can generate Fanuc robot programs? I might even write a compiler to turn the ascii output into binary TP programs if anyone has a need for that (like, say, if you can't get your hands on the maketp program from Fanuc.)
After 10 years of programming CNC machines I've been asked to program our Fanuc Robots (P-145 + R-J3) but I'm unable to do this off-line on my PC.
The only method we're using today is with the teach pendant.
Maybe you can explain how to convert the binary files to ASCII so I could try to make a conversion program in Visual Basic...
I'm also interested in the development of the G-code to TP program.
The robot's control software is capable of converting a binary robot file into an ascii file. You use the teach pendant to go into the program selection screen and move over to SAVE. It will send the ascii file to a connected PC through the serial port. That's with an RJ1 robot. You might be able to hook it up via ethernet with an RJ3 but I've no experience with anything other than an RJ1.
The correct software to interface a PC with the robot hopefully came with your robot or you purchased it seperately... Otherwise there's trouble. I do indeed have a GCode -> TP program but it still needs the maketp utility from Fanuc to convert the resulting ascii file (which is in the same format that the robot will send to a PC) into a binary TP file. Unfortunately there is no free or open source alternative to maketp. You really have to get it from Fanuc or find someone who will be willing to send it to you.
I use maketp to compile my programs and then use KFloppy to make a connected PC appear to be a fanuc floppy drive to the robot. This allows for sending and receiving programs. Without KFloppy and MakeTP you will be severely limited in what you can do.
I'm going to try to clean up my C# version of the GCode to TP program and upload it somewhere. Hopefully, even though I haven't had much time to commit to this, it will help someone else. And maybe, if I'm lucky, somebody will help fix it up and send the changes to me. ;-)
I would also like to see Your work
I'm searching for alternative ways to control a robot, basing on CAD models and I need some kind of software to convert.
I presume there is no such software from FANUC...
I would also like to see this. I was considering writing something like this last night. I've been using the Fanuc software to create paths. It is very tedious and time consuming to use. This could be the answer
Seems like that file never saw the light of day in the downloads section... Bum deal! I'm attaching it to this post instead.
Dear Death Adder,
I have just read you program Robot Translator, it's very interested for me because now I'm doing a small project, in which I would like to convert G_code of CNC machine to robot program for KUKA robor (not Fanuc). A big problem here is I 'm not familarly with VB, i just do with VC++, so I would like ask you that if ou have the source code written by VC++ please give me, or show me how to do it. any way I want to say thank very much for your post.
Dear Mr Death adder,
I had to test run your program RoboTranslator and the result is OK but accept function for 6 axis Rhino to robot path, I think there is a problem with the code here. Could you please check them again. The error when I debug is shown as below:
Open "c:\debug.txt" For Input As #5
That's because the 6 axis rhino to robot code is really, really experimental and probably doesn't really work at all. The actual working code is the one for 2D shape cutting. The full 6 axis stuff doesn't work right as far as I remember. I was toying with getting it to work but I ended up just manually teaching the robot for the project we were doing. I haven't had time to fix it up.
In order for you to even test the 6 axis rhino code you'd have to have the RhinoScript files that I wrote and have a copy of Rhinosaurus 3D.
I think that my biggest trouble in getting it working was getting good data out of rhino. There's some magic that must be done to make sure that all normals are pointing the right way. That and I was trying to get fake surface normals out of rhino just off of curves. That's not really so correct because curves don't have surface normals, surfaces do. So, eventually I'll have to use the curves but project them to surfaces and take the normals off of the surface. Even then, surfaces can be facing the wrong way and have to be flipped.
Needless to say, there's some work yet to do on the 6 axis stuff.
Dear Mr Death Adder,
There is one problem in your program Robot Translator, I test run with G_code file for 2D contouring but it can not convert CIRCLE or Arc motion if that is defined by G02 X _ Y _ R _. Could you please show me how to convert this code to CIRCLE motion in robot. Please see the code as below. Thank for your help.
%
O0000
(PROGRAM NAME - 2DCONTOUR_MILLING PROJECT1)
(DATE=DD-MM-YY - 12-03-07 TIME=HH:MM - 10:00)
N100G21
N102G0G17G40G49G80G90
( 5. FLAT ENDMILL TOOL - 2 DIA. OFF. - 2 LEN. - 2 DIA. - 5.)
N104T2M6
N106G0G90G54X-14.9Y57.2A0.S2000M3
N108G43H2Z20.
N110Z2.
N112G1Z-5.F50.
N114X-9.9F100.
N116G3X-4.9Y62.2R5.
N118G1Y71.2
N120G2X11.2Y87.3R16.1
N122G1X81.845
N124X115.736Y78.219
N126X129.465Y64.49
N128G2X130.9Y61.026R4.9
N130G1Y41.2
N132Y21.374
N134G2X129.465Y17.91R4.9
N136G1X115.736Y4.181
N138X81.845Y-4.9
N140X11.2
N142G2X-4.9Y11.2R16.1
N144G1Y29.2
N146G2X0.Y34.1R4.9
N148G1X31.434
N150G2X34.934Y32.63R4.9
N152G3X60.Y22.1R35.1
N154X63.1Y25.2R3.1
N156G2X68.Y30.1R4.9
N158G1X102.2
N160G3X102.3Y30.2R.1
N162G1Y41.2
N164Y52.2
N166G3X102.2Y52.3R.1
N168G1X68.
N170G2X63.1Y57.2R4.9
N172G3X60.Y60.3R3.1
N174X34.934Y49.77R35.1
N176G2X31.434Y48.3R4.9
N178G1X0.
N180G2X-4.9Y53.2R4.9
N182G1Y62.2
N184G3X-9.9Y67.2R5.
N186G1X-14.9
N188Z-3.
N190G0Z20.
N192X-12.9Y57.2
N194Z2.
N196G1Z-5.F50.
N198X-7.9F100.
N200G3X-2.9Y62.2R5.
N202G1Y71.2
N204G2X11.2Y85.3R14.1
N206G1X81.582
N208X114.701Y76.426
N210X128.051Y63.076
N212G2X128.9Y61.026R2.9
N214G1Y41.2
N216Y21.374
N218G2X128.051Y19.324R2.9
N220G1X114.701Y5.974
N222X81.582Y-2.9
N224X11.2
N226G2X-2.9Y11.2R14.1
N228G1Y29.2
N230G2X0.Y32.1R2.9
N232G1X31.434
N234G2X33.505Y31.23R2.9
N236G3X60.Y20.1R37.1
N238X65.1Y25.2R5.1
N240G2X68.Y28.1R2.9
N242G1X102.2
N244G3X104.3Y30.2R2.1
N246G1Y41.2
N248Y52.2
N250G3X102.2Y54.3R2.1
N252G1X68.
N254G2X65.1Y57.2R2.9
N256G3X60.Y62.3R5.1
N258X33.505Y51.17R37.1
N260G2X31.434Y50.3R2.9
N262G1X0.
N264G2X-2.9Y53.2R2.9
N266G1Y62.2
N268G3X-7.9Y67.2R5.
N270G1X-12.9
N272Z-3.
N274G0Z20.
N276X-12.5Y57.2
N278Z2.
N280G1Z-5.F50.
N282X-7.5F100.
N284G3X-2.5Y62.2R5.
N286G1Y71.2
N288G2X11.2Y84.9R13.7
N290G1X81.529
N292X114.494Y76.067
N294X127.768Y62.793
N296G2X128.5Y61.026R2.5
N298G1Y41.2
N300Y21.374
N302G2X127.768Y19.607R2.5
N304G1X114.494Y6.333
N306X81.529Y-2.5
N308X11.2
N310G2X-2.5Y11.2R13.7
N312G1Y29.2
N314G2X0.Y31.7R2.5
N316G1X31.434
N318G2X33.22Y30.95R2.5
N320G3X60.Y19.7R37.5
N322X65.5Y25.2R5.5
N324G2X68.Y27.7R2.5
N326G1X102.2
N328G3X104.7Y30.2R2.5
N330G1Y41.2
N332Y52.2
N334G3X102.2Y54.7R2.5
N336G1X68.
N338G2X65.5Y57.2R2.5
N340G3X60.Y62.7R5.5
N342X33.22Y51.45R37.5
N344G2X31.434Y50.7R2.5
N346G1X0.
N348G2X-2.5Y53.2R2.5
N350G1Y62.2
N352G3X-7.5Y67.2R5.
N354G1X-12.5
N356Z-3.
N358G0Z20.
N360X-14.9Y57.2
N362Z-3.
N364G1Z-10.F50.
N366X-9.9F100.
N368G3X-4.9Y62.2R5.
N370G1Y71.2
N372G2X11.2Y87.3R16.1
N374G1X81.845
N376X115.736Y78.219
N378X129.465Y64.49
N380G2X130.9Y61.026R4.9
N382G1Y41.2
N384Y21.374
N386G2X129.465Y17.91R4.9
N388G1X115.736Y4.181
N390X81.845Y-4.9
N392X11.2
N394G2X-4.9Y11.2R16.1
N396G1Y29.2
N398G2X0.Y34.1R4.9
N400G1X31.434
N402G2X34.934Y32.63R4.9
N404G3X60.Y22.1R35.1
N406X63.1Y25.2R3.1
N408G2X68.Y30.1R4.9
N410G1X102.2
N412G3X102.3Y30.2R.1
N414G1Y41.2
N416Y52.2
N418G3X102.2Y52.3R.1
N420G1X68.
N422G2X63.1Y57.2R4.9
N424G3X60.Y60.3R3.1
N426X34.934Y49.77R35.1
N428G2X31.434Y48.3R4.9
N430G1X0.
N432G2X-4.9Y53.2R4.9
N434G1Y62.2
N436G3X-9.9Y67.2R5.
N438G1X-14.9
N440Z-8.
N442G0Z20.
N444X-12.9Y57.2
N446Z-3.
N448G1Z-10.F50.
N450X-7.9F100.
N452G3X-2.9Y62.2R5.
N454G1Y71.2
N456G2X11.2Y85.3R14.1
N458G1X81.582
N460X114.701Y76.426
N462X128.051Y63.076
N464G2X128.9Y61.026R2.9
N466G1Y41.2
N468Y21.374
N470G2X128.051Y19.324R2.9
N472G1X114.701Y5.974
N474X81.582Y-2.9
N476X11.2
N478G2X-2.9Y11.2R14.1
N480G1Y29.2
N482G2X0.Y32.1R2.9
N484G1X31.434
N486G2X33.505Y31.23R2.9
N488G3X60.Y20.1R37.1
N490X65.1Y25.2R5.1
N492G2X68.Y28.1R2.9
N494G1X102.2
N496G3X104.3Y30.2R2.1
N498G1Y41.2
N500Y52.2
N502G3X102.2Y54.3R2.1
N504G1X68.
N506G2X65.1Y57.2R2.9
N508G3X60.Y62.3R5.1
N510X33.505Y51.17R37.1
N512G2X31.434Y50.3R2.9
N514G1X0.
N516G2X-2.9Y53.2R2.9
N518G1Y62.2
N520G3X-7.9Y67.2R5.
N522G1X-12.9
N524Z-8.
N526G0Z20.
N528X-12.5Y57.2
N530Z-3.
N532G1Z-10.F50.
N534X-7.5F100.
N536G3X-2.5Y62.2R5.
N538G1Y71.2
N540G2X11.2Y84.9R13.7
N542G1X81.529
N544X114.494Y76.067
N546X127.768Y62.793
N548G2X128.5Y61.026R2.5
N550G1Y41.2
N552Y21.374
N554G2X127.768Y19.607R2.5
N556G1X114.494Y6.333
N558X81.529Y-2.5
N560X11.2
N562G2X-2.5Y11.2R13.7
N564G1Y29.2
N566G2X0.Y31.7R2.5
N568G1X31.434
N570G2X33.22Y30.95R2.5
N572G3X60.Y19.7R37.5
N574X65.5Y25.2R5.5
N576G2X68.Y27.7R2.5
N578G1X102.2
N580G3X104.7Y30.2R2.5
N582G1Y41.2
N584Y52.2
N586G3X102.2Y54.7R2.5
N588G1X68.
N590G2X65.5Y57.2R2.5
N592G3X60.Y62.7R5.5
N594X33.22Y51.45R37.5
N596G2X31.434Y50.7R2.5
N598G1X0.
N600G2X-2.5Y53.2R2.5
N602G1Y62.2
N604G3X-7.5Y67.2R5.
N606G1X-12.5
N608Z-8.
N610G0Z20.
N612M5
N614G91G28Z0.
N616G28X0.Y0.A0.
N618M30
%
Sorry, I should have clarified: Your GCode needs to be somewhat special for the program to understand it. The C# code has comments that indicate what to do. I think the arc moves are G20 and G30. There is no circle move currently programmed but it wouldn't be hard. It also wouldn't be hard to make it understand standard GCODE. I don't remember why I didn't use the standard gcodes for arc moves... maybe I was just being lazy. I think that the program works best when arcs are split to quadrants so programming a circle move would be easy enough. Just make four arc moves, one for each quad.
I'll try to actually get around to working on the code again someday but I uploaded it partly because I haven't had a lot of time to work on it and it's been just sitting here in the same shape for quite a while. Maybe this renewed interest will finally get me to work on it again.
Dear Mr Death Adder,
I think you confused what I mean, acctually this code I shown as above which just for Arc motion, but in standard G_code we can declared by two way:
1. G02 X--Y--I--J-- in which I and J is incremental distance from start point (previous point) to X,Y coordinate of center point.
2. G02 X--Y--R-- R value is here radius of arc from center point.
In fact, your program just translate ARC motion with I--J-- value so I would ask you that if the arc motion is declared by radius R what could I do? Can you explain mor detail about your algorithm when translate arc motion with I--J--
Anyway I would like to say thank a lot for your cooperating. I hope you will come back with this project soon because It is really hot for industrial robot now.
Oh, I think I see what you mean. I didn't have any experience with using R moves. All I've ever used was IJK moves. But, it seems like the general idea is as so:
Starting at:
X0Y1
Then the arc move is
X1Y0I0J0
So that the circle is centered at 0,0 and we're drawing a quarter circle from 0,1 to 1,0
Now the R equivalent would be
X0Y1
X1Y0R1 because the circle is radius one.
In that simple case it's easy to see how both forms relate to one another. But I'll have to do some digging to try to figure out the generic way of converting. It'll be a bit trickier. Though, it's not necessary to convert from R to IJK. Really, all we need to do is figure out how to come up with a center point given XYR. It shouldn't be too hard but I'll have to think it out and do some research.
Dear Death Adder,
I think we don't need to think more about CIR motion with radius R because we can convert them to I, J, K by changing some parameter in POST file.pst. One more problem I would like to conform with you again: is the code for 3D arc running OK? Can you give me the algorithm to translate 2D contour and 3D arc document?. I really want to read them again before I continue this research. Many thank for your help.