CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > General CNC (Mill and Lathe) Control Software (NC)


General CNC (Mill and Lathe) Control Software (NC) General Discussion of CNC (Mill and Lathe) control software here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 12-23-2007, 03:47 PM
guru_florida's Avatar  
Join Date: Nov 2007
Location: United States
Age: 36
Posts: 257
guru_florida is on a distinguished road
Isnt gcode a little outdated? higher-level cnc coding

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!
Reply With Quote

  #2  
Old 12-23-2007, 04:15 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,539
Al_The_Man is on a distinguished road
Buy me a Beer?

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.
Reply With Quote

  #3   Ban this user!
Old 12-23-2007, 07:27 PM
Bubba's Avatar  
Join Date: Mar 2004
Location: LaGrange, GA USA
Posts: 1,357
Bubba is on a distinguished road

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)
Reply With Quote

  #4  
Old 12-23-2007, 08:15 PM
Gold Member
 
Join Date: Oct 2005
Location: USA
Posts: 663
Caprirs is on a distinguished road

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.
Reply With Quote

  #5  
Old 12-24-2007, 06:37 AM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,660
Switcher is on a distinguished road

Siemens 840D sounds like what your looking for.

.
__________________
Free DXF Files - Vectorink.com - myDXF.blogspot.com
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 12-24-2007, 09:00 AM
 
Join Date: Apr 2006
Location: BELGIUM
Posts: 5
costast is on a distinguished road

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?
Reply With Quote

  #7   Ban this user!
Old 12-24-2007, 09:38 AM
guru_florida's Avatar  
Join Date: Nov 2007
Location: United States
Age: 36
Posts: 257
guru_florida is on a distinguished road

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.
Reply With Quote

  #8  
Old 12-24-2007, 01:26 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,539
Al_The_Man is on a distinguished road
Buy me a Beer?

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.
Reply With Quote

  #9  
Old 12-24-2007, 05:40 PM
Gold Member
 
Join Date: Oct 2005
Location: USA
Posts: 663
Caprirs is on a distinguished road

Originally Posted by guru_florida View Post
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.
As I said, my machines are sorta old. The manuals are available for download from Mitsubishi's web site but it's all just scanned pages in PDF. Nothing really searchable, you'd be stuck reading all of it which might cure any insomnia you may have.

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.
Reply With Quote

  #10   Ban this user!
Old 12-24-2007, 09:08 PM
 
Join Date: Jun 2003
Posts: 1,984
turmite is on a distinguished road



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.
Reply With Quote

Sponsored Links
  #11  
Old 12-25-2007, 05:30 AM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,660
Switcher is on a distinguished road

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
Reply With Quote

  #12  
Old 12-25-2007, 05:56 AM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,660
Switcher is on a distinguished road

Originally Posted by Caprirs View Post
As I said, my machines are sorta old. The manuals are available for download from Mitsubishi's web site but it's all just scanned pages in PDF. Nothing really searchable, you'd be stuck reading all of it which might cure any insomnia you may have.

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.



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).

Results for:
Document Type = Tech Manual
Division = Computerized Numerical Control
Family = CNC Controls
Series = M300L
Manual Type = Programming

.
__________________
Free DXF Files - Vectorink.com - myDXF.blogspot.com
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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




All times are GMT -5. The time now is 06:23 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361