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 > G-Code Programing


G-Code Programing Discuss G-code programing and problems here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 01-23-2006, 10:27 PM
 
Join Date: Oct 2005
Location: USA
Posts: 5
paelscrit is on a distinguished road
benefits of incremental?

Hi, I just started a new job today programming trning style lathes and they use incremental mode on fanuc controls. We only used absolute at my old job and I understand the difference but I just can't grasp the benefits of using incremental over absolute and/or vice versa. My boss said its so they can easily edit the program to change just one move without having to change the whole program. Wouldn't absolute be better for that? If anyone can help with the pros and cons or whatever it would be appreciated. thanks
Reply With Quote

  #2   Ban this user!
Old 01-23-2006, 10:47 PM
 
Join Date: Sep 2005
Location: USA
Age: 60
Posts: 755
Dan Fritz is on a distinguished road
Uses for Incremental

There are lots of good uses for incremental programming, and you should keep an open mind about these things.

In the olden days, all motions were incremental because the primitive NC "tape" machines would just read an incremental XYZ command from the paper tape, load the number in a register, and count up or down the number of pulses to make the move (probably with pulse motors). When microprocessors and mini-computers were introduced in what we now call "CNC" machines, the controls could keep track of the absolute position of each axis with no problem. Absolute or incremental moves could be made at any time.

I've seen incremental motions used in all kinds of situations, but here's one that few people know about: It involves using G91 (incremental) combined with the old method of uing non-decimal formatted numbers.

Suppose you're cutting a 3D mold with a ballnose endmill, and you're making a zillion little tiny moves in XYZ. The size of the program becomes a problem because these programs need to be fed to the CNC in "drip-feed" DNC mode. If you're running a DNC link at 9600 baud (960 characters/second), which program do you think will run faster:

This one (absolute) ?
G90 G01
X1.2345 Y2.3456 Z3.4567
X1.2347 Y2.3459 Z3.4571
X1.2350 Y2.3462 Z3.4577
X1.2355 Y2.3469 Z3.4579

.. or this one (incremental) ?
G91 G01
X2Y3Z4
X3Y3Z6
X5Y3Z2

A lot smaller, isn't it?
Reply With Quote

  #3   Ban this user!
Old 01-26-2006, 01:28 AM
 
Join Date: Jan 2006
Location: United States
Posts: 7
arfonce is on a distinguished road

We often use incremental programming to cut the same shape in 2 or more locations.The main program is used to locate with absolute and then we call-up the sub-program which incrementally cuts the shape.

Dan,
Good idea-does this actually reduce the jerkiness you get when the machine can't process the code fast enough? One problem with this though is that if there's a move that's bad then everything after it in that axis will be bad also.
Reply With Quote

  #4   Ban this user!
Old 01-26-2006, 05:43 AM
 
Join Date: Sep 2005
Location: USA
Age: 60
Posts: 755
Dan Fritz is on a distinguished road
Jerkines in DNC

arfonce: No, this won't necessarilly stop the jerkiness that happens when you're trying to cut very small increments at a higher feedrate.

Every CNC has a maximum number of blocks that it can process per second. This internal block processing speed is not improved by reducing the number of characters in the program. It will, however, greatly improve things if the problem is due to "Data starvation" due to a slow DNC link.

Other things that might improve things are:

1) Programming in metric if your machine has metric ballscrews. The CNC has to do an inch/metric conversion on every number your program in inch with metric ballscrews or in metric on a machine with inch ballscrews. Programming in the machine's "native" increments system saves the processor this time.

2) Increasing the parameter for the "In position" zone for each axis. When you make a G01 move, the servos must get to within this tollerance of the exact position before it can execute the next block. Increasing this parameter lets the CNC go to the next block a bit quicker.

3) Using software that generates a series of G02/G03 moves with arcs that fit your 3D surface (rather than many G01 straight moves). This reduces the number of BLOCKS in the program, which increases the point-to-point distance. A series of arcs can sometimes cut a more accurate surface, but your CAM system needs to have the feature.
Reply With Quote

  #5  
Old 01-26-2006, 07:35 AM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,660
Switcher is on a distinguished road

I think the reason "G91" was introduced, was, so that you can program the CNC while working from a print. It is far easier to program from point to point using "G91", than to write a program from an axis zero (Home) point.

Most times when I write programs I use both "G90" & "G91", I use "G90" when I want to send all my axis home, and for Rapid Feed (Around the Part).

My favorite thing about using both "G90" & "G91", Is to combine a bunch of sub-programs, into my main program. My subs mostly use "G91", while my main will use "G90" to give me a starting point to use my "G91". (I hope that didn't sound like a tax form!)

Example:

% ; Start program

G90 ; Absolute

G00 X0.0 Y0.0 Z0.0 F50 ; Send all axis home

Sub_Program_1

G90 ; Absolute

G00 X0.0 Y0.0 Z0.0 F50 ; Send all axis home

Sub_Program_2

G90 ; Absolute

G00 X0.0 Y0.0 Z0.0 F50 ; Send all axis home

Sub_Program_3

G90 ; Absolute

G00 X0.0 Y0.0 Z0.0 F50 ; Send all axis home

M30 ; End of program


Really you should learn to use both, combined together they can make things easier on you.



.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 01-26-2006, 09:43 AM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,563
Geof will become famous soon enough

Originally Posted by paelscrit
... My boss said its so they can easily edit the program to change just one move without having to change the whole program. Wouldn't absolute be better for that? .....
So far the responses seem to have been referring to VMCs not lathes. I have thought about your boss' claim quoted above because in general a program in incremental is more difficult to edit than absolute because one change affects the position of everything following it. One situation I can imagine though is if the job is a family of different length shafts with the same features at each end separated by a straight section. One change to the Z coordinate for the straight section in incremental changes the overall length and leaves everything else the same. In absolute it would be necessary to change all the Z coordinates at one end or the other of the straight section.
Reply With Quote

  #7  
Old 01-26-2006, 12:08 PM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,660
Switcher is on a distinguished road

Actually, I run a Schutte 5-axis cnc toolgrinder, It would be closer to a lathe, than a VMC.

I have to disagree, that "G91" is more difficult to edit than "G90". Whats so difficult with either one?

Really you should learn to use both, combined together they can make things easier on you.
With my example above I can use a mixture of both, saving me steps in my program, like for my subs (Most) I can use "G91" , and when I need to move around the part without cutting/grinding I can use "G90" this way It doesn't matter where my tool is at, I can Rapid around, without doing it in incremental steps, I say go to home, it goes, I start another sub, and so on.

They are both their to be used, mix them up!


------------------------------------------------------------------
This one (absolute) ?
G90 G01
X1.2345 Y2.3456 Z3.4567
X1.2347 Y2.3459 Z3.4571
X1.2350 Y2.3462 Z3.4577
X1.2355 Y2.3469 Z3.4579

.. or this one (incremental) ?
G91 G01
X2Y3Z4
X3Y3Z6
X5Y3Z2

A lot smaller, isn't it?
I'm not sure I follow this, If I need to move "X1.2345", how would "X2" be the same, rounding the numbers wouldn't benifit you If you still needed to move "X1.2345".

------------------------------------------------------------------




.

Last edited by Switcher; 01-26-2006 at 12:35 PM.
Reply With Quote

  #8   Ban this user!
Old 01-26-2006, 12:44 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,563
Geof will become famous soon enough

Maybe using the word "difficult" was a mistake. Editing in either incremental or absolute is easy but often in incremental you have to make changes as it were downstream; for instance if you make a positive change in the first of two diameters along a shaft but don't want to change the second you have to do a negative change for that one. I was trying to think of an example where a single change in incremental did not require any other changes in the program.

Regarding the example and question:

This one (absolute) ?
G90 G01
X1.2345 Y2.3456 Z3.4567
X1.2347 Y2.3459 Z3.4571
X1.2350 Y2.3462 Z3.4577
X1.2355 Y2.3469 Z3.4579

.. or this one (incremental) ?
G91 G01
X2Y3Z4
X3Y3Z6
X5Y3Z2

I'm not sure I follow this, If I need to move "X1.2345", how would "X2" be the same, rounding the numbers wouldn't benifit you If you still needed to move "X1.2345".

The X2 in the incremental is the difference between X1.2345 and X1.2347; notice the absence of the decimal and remember that absolute means 'move to these coordinates' while incremental means 'move this distance from where you are'.
Reply With Quote

  #9  
Old 01-26-2006, 12:56 PM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,660
Switcher is on a distinguished road

How is "X2" & "0.0002" the same?

If I say "X2" isn't that the same as "X2.0"?




.
Reply With Quote

  #10   Ban this user!
Old 01-26-2006, 01:17 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,563
Geof will become famous soon enough

Originally Posted by Switcher
How is "X2" & "0.0002" the same?

If I say "X2" isn't that the same as "X2.0"?
.
Okay; on your machine it may. On VMCs often there is a setting or parameter that controls the interpretation of entries without a decimal so X2 is 0.0002 and X20000 is 2.0000.

This sort of thing dates back to the days of paper tapes and (almost) no memory.
Reply With Quote

Sponsored Links
  #11  
Old 01-26-2006, 01:31 PM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,660
Switcher is on a distinguished road

Geof, I run "Siemens 840D" on a tool grinder. I've never found anything like that before.

Yeah, If I said "X20000" in a program I wrote at work, two things could happen:

(1) I would crash.

(2) I would max out my software limit switch.

I would prefer (2), if it had to happen.

Thanks for the info.


.
Reply With Quote

  #12   Ban this user!
Old 01-26-2006, 01:48 PM
 
Join Date: Dec 2004
Location: USA
Posts: 167
TR MFG is on a distinguished road

Most older Fanuc controls are like this X2 (no ".") would be read as X0.0002, X2. would be X2.0000. It's all about trailing zeros. I think Fadal's in format 2 are like this also.
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





All times are GMT -5. The time now is 08:07 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