![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General CNC (Mill and Lathe) Control Software (NC) General Discussion of CNC (Mill and Lathe) control software here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
I am not an expert yet on cnc, but isnt g-coding a little outdated by now? As a programmer I fully recognize the elagence of g-code for slow old processors that have minimal memory and program space. G-code standard has been updated as recently as 2000 but still no for/while loops, functions, and limited variable support. I will probably get a lot of flak for this post....but.... g-codes seems somewhat close to assembler language with opcodes and operands. I have made a few compilers and it wouldnt seem to hard to build a high level language grammer/syntax that outputs g-code. The compiler would handle the tracking of g-code variables, making macros, calling macros, unrolling loops, etc. I think such a language is possible and still be compatible with other machines as it creates gcode. You may say, well you use a software package to create your models, then that makes your gcode...so you dont have to write gcode...but wouldnt something as simple as: #include <drilling.h> // drill a 100 hole grid! for(i=0; i<10; i++) { for(j=0; j<10; j++) { drill_at(i*.5, j*.5); // hole at x,y } } wouldnt this be easier then opening up a cad package? (Not saying c code would be an ideal choice of grammer by any means.! but I illustrate prewritten functions, libraries, variables and loops.) Colin end of message...begin flames! |
|
#2
| ||||
| ||||
| There has been 'Conversational Programming' for some time by Mitsubishi/Mazak, Fanuc Fagor etc. The Fagor especially offer some advanced interactive programming methods. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#3
| ||||
| ||||
| At the risk of getting A-bombed (not just flamed), I like g-code! I sit in my chair and cad something up and then run it though my cam (sheetcam) and then look at it in simulator. MANY times, I go back and change it to suit some indisputable whim to make it more friendly to me. My parts are generally one off and have some sort of special needs to me. I rarely go to the machine to "make a part" and have need of conversational type of stuff. If I do, MDI is completley satisfactory for my needs. There have been many times that I caded up a part and camed it only to go back and completely redo it to make more sense in the operations (processes) to make the complete part. I would much rather sit in my easy chair and figure it out rather than "hunch" over the machine in the shop trying to figure out how I am going to "complete" this part. Besides, as a last resort, G-code is simplistic and most other programing languages I have delt with have very constrictive syntax rules. I would hate to have a part screwed up because I forgot a : or some other requirement that is easy to forget or fatfinger (and I am real good at that!)
__________________ Art AKA Country Bubba (Older Than Dirt) |
|
#4
| |||
| |||
| Not sure what control/software you are using. Most machines over the past couple decades support the hole patterns like you "programmed". Except the machine needs only two lines of code to your five lines above. For example, my 1988 model Mitsubishi controls can drill the 100 holes using: G81 G98 Xx Yy Z-z Rr Ff G37.1 X Y I P J K X & Y are the first hole, I & J are the spacing in X & Y, and P & K are the numbers of columns and rows. I can also use G34 for a bolt hole circle, G35 for holes on an angled line, and G36 for holes on an arc. Additionally, I can perform DO/WHILE loops (even several nested ones) based on mathematical and/or logical arguments. I can write my own macros and save them in the machine's memory and call them up with a single G-code. I have written for a customer a program that contained no lines of motion code at all. The application was to engrave incrementing serial numbers on parts. The main program called up one of the ten subprograms for each digit and then incremented the serial number for the next part to be engraved. |
|
#6
| |||
| |||
| G code best way to get things done , worked with Mazatrol , fapt and others. It's seams a lot of of people get a rash with G code. It is realy very simple and efficient. And an most controls there are maths functions (trig etc. ) goto , if - when commands Variables etc. What more do you want to turn or mill a part? |
|
#7
| ||||
| ||||
| As I said, I am still new to g-code. Tho it's easy enough to understand. I've done a lot of opcode/operand type coding before. I have written a few sample gcode programs, but not sofisticated yet. My current interpreter kcam does not even support variables. I am trying out emc2 (linux cnc) now, hopefully that will have the extra functionality. Caprirs, I like your simple create 100 holes code. This grasshopper has more to learn, but you can garentee I will get there so long as gcode remains standard. Anyone have a link to the advanced gcode grammer? All I can find is the simple codes so far. It's a matter of opinion for sure. Some like the relaxed syntax of VisualBasic...for me, it drives me crazy debugging. I rather like getting compile errors for mistakes rather than runtime, so I like the strict syntax rules. |
|
#8
| ||||
| ||||
| Maybe you should look for something on G code Macro programming, this is what makes G code much more powerfull. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#9
| |||
| |||
| I think most model Mitsubishi & Fanuc controls support these standard canned cycles. There are numerous drilling and boring cycles as well (G81-G89). Some machine builders add in their own cycles in addition. For example, the PC-controlled Dynamechtronics VMCs have G22-G26 which are pocketing canned cycles where one line of code will create a complete pocket. On the Mits machines, I often had to break in new spindles after installation. I'd use the below program to start at 500rpm and bump the spindle in 500rpm increments every 30 minutes. #100=500 DO1 [WHILE #100 LE 10000] S#100 M3 G4 X1800. #100 = #100 + 500 END1 M30 As far as I know, that little bit of code will work on any Mits control made in the past 20 years. |
|
#10
| |||
| |||
![]() I'll challenge anyone, to program this with conversational programming! ![]() There are some things you just have to have cam for, and to my knowledge, Gcode is the language of cam systems....period. Mike
__________________ No greater love can a man have than this, that he give his life for a friend. |
| Sponsored Links |
|
#11
| ||||
| ||||
| That could be done with conversational programming. Here is why I say could. The 5-axis cnc I run at work runs Siemens 840D, now on this machine I sharpen endmills, drills, form tools (carbide & HSS). Siemens 840D allows 3rd party software, so I'm also running a custom Schutte program inside the control (840D). When I sharpen endmills, drills I use the Schutte program, I would never want to start from scratch programming an endmill or drill point by hand. All the conversational programming creates is standard g-code, no big deal, just a lot of math. Now when I sharpen form tools, I run another program (inside the control) this was wrote by hand (standard g-code again). I also write a bunch of other programs (g-code) for odd jobs, & do edits to any conversational program that I want in the text editor inside the control. My point is, that image you posted could be done on a cnc running a conversational program, think of it as a custom cad/cam program for a specific family of parts. You never have to leave the control to design any of your parts, it works, I do it 5-days a week. Been running over 6 years, & most of that was 2-12 hour shifts, 7days a week, (we just recently switched back to 3 shifts a day). ![]() Here is the machine I run, Here is the Schutte conversational program we run. So If I had a real business, of building gun stocks, I would look into a custom cnc machine running a custom conversational program, design to create the programs I need inside the control. Sure the custom program would cost money, so would any cad/cam program running outside the control. Our machine was paid for in 2.5 years, the whole setup machine/programs/fixtures/collets cost $250,000.00 New. Approx. 2 weeks training, also our plant has no person to pay every day/year to create programs, the machine op. does it all at the machine. .
__________________ Free DXF Files - Vectorink.com - myDXF.blogspot.com |
|
#12
| ||||
| ||||
Just download the pdf to your desktop, open the pdf in Adobe Reader, then use the "Find" Tool. Edit|Find I tried a random Programming manual (worked good).
.
__________________ Free DXF Files - Vectorink.com - myDXF.blogspot.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 |
| Higher Spindle RPM? | keen | Tormach PCNC | 10 | 08-07-2007 09:59 AM |
| Proxxon spindle for higher speed on my X2 | LongRat | Benchtop Machines | 1 | 12-28-2006 11:31 AM |
| Mach 2 or 3 with higher end toolpath software? | Corvus corax | Mach Software (ArtSoft software) | 2 | 12-10-2005 11:03 PM |
| I have a problem with my gcode or my conversion to gcode , everything is tiny? | NickLatech | G-Code Programing | 0 | 03-10-2005 12:46 PM |
| Capacitor at higher voltage? | DAB_Design | Gecko Drives | 5 | 12-18-2004 04:46 PM |