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 11-28-2011, 09:13 PM
 
Join Date: Jul 2011
Location: USA
Posts: 7
Rich L is on a distinguished road
Question Using G02 in G7.1 mode

Folks,

I have a Fanuc 0i Mate TB gang tool lathe with full C-axis capability and I'm running into a problem coding up some circular interpolation codes (G02) within the G7.1 cylindrical interpolation mode. G18 is the default plane of operation for this machine.

Here's the problem:

Once I get into the G7.1 mode I can execute G1 linear movement with no problem but the control throws an error "21 Illegal Plane Axis Commanded" as soon as it reads one of my G2 blocks. Just for background, trying to command G17 or G19 throws a "28 Illegal Plane Selected." So, G18 would seem to be the plane to stick with and most of the references I've seen indicate G18 is for "ZC" plane.

A segment of the code is as follows:


G98 (IPM required for G7.1)
G18 (this is the default)
M21 (get into C-axis mode)
...

G1 X.500 F200
G1 Z0.

G7.1 C.250
G28 H0.

G1 Z-.5 C90. F200 (works)
G1 Z0. C0. (works)

G2 Z-.25 C90. R.500 (alarm 21)
...

So, the linear ZC commands work but as soon as the control reads the G2 ZC command it throws an error. I don't think the control really cares about G18 when it's doing linear commands because I can execute a three dimensional XZC G1 command.

Here's my guess but I'd like considered opinion:
Parameter 1022 is set
X 1 (X axis of basic three)
Z 3 (Y axis of basic three)
C 5 (Axis parallel to X axis)

The C axis setting looks odd as maybe it should be set to 7 (Axis parallel to Z axis) so that the control isn't trying to translate a G2 ZC command into an X axis travel per that parameter. The C axis really is parallel to the Z axis so maybe changing this parameter would make all consistent.

Please let me know what y'all think as changing parameters is not my favorite thing - seems dangerous. Or is there something else I'm overlooking?

Thanks, folks.

Cheers,
Rich
Reply With Quote

  #2   Ban this user!
Old 11-28-2011, 09:30 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Hi Rich,
With Cylindrical Interpolation, you must set parameter #1022 to specify whether the rotation axis is the X–, Y–, or Z–axis, or an axis parallel to one of these axes. Then specify the G code to select a plane for which the rotation axis is the specified linear axis. For example, when the rotation axis is an axis parallel to the X–axis, G17 must specify an Xp–Yp plane, which is a plane defined by the rotation axis and the Y–axis or an axis parallel to the Y–axis. Only one rotation axis can be set for cylindrical interpolation.

See the attached picture to get an idea of how to determine which axis is the rotation axis or parallel to one of the axes. For example, if the machine were a typical 4 axes, vertical machining center, with the axis around which the 4th axis rotates being parallel with the X axis (typical A axis configuration), then either Y or Z could be set in parameter #1022, as both Y and Z are parallel to the rotating cylinder. The best way I find to determine this, is to look at the edge of the unwrapped cylinder and see which axis its parallel to. In the case of the attached sketch, the edge is parallel to both Y and Z. However, the axis set in #1022 will also have an effect of the plane setting G code (G17 - 19) and whether G02 or G03 is used (they may be reversed to what would be seen as conventional); see the attached sketch.

For Circular interpolation between the Z axis and C axis, the C axis of parameter #1022 could be set to 5 (axis parallel with the X axis). In this case, the command for circular interpolation is:
G18 Z... C...
G02 (G03) Z... C... R...

The C axis of parameter #1022, could also be set to 6 (axis parallel with the Y axis). In this case, however, the command for circular interpolation is:
G19 C... Z...
G02 (G03) Z... C... R...

Click image for larger version

Name:	Cylindrical1.JPG
Views:	36
Size:	48.8 KB
ID:	147002

Regards,

Bill
Reply With Quote

  #3   Ban this user!
Old 11-29-2011, 05:08 AM
CNC Data's Avatar  
Join Date: Feb 2011
Location: United Kingdom
Posts: 20
CNC Data is on a distinguished road

Have you tried specifying G18 on every line with a G02/G03?

G98 (IPM required for G7.1)
G18 (this is the default)
M21 (get into C-axis mode)
...

G1 X.500 F200
G1 Z0.

G7.1 C.250
G28 H0.

G1 Z-.5 C90. F200 (works)
G1 Z0. C0. (works)

G2 G18 Z-.25 C90. R.500 (alarm 21)

Try this.
__________________
CNC Data Ltd
www.cncdata.co.uk
Reply With Quote

  #4   Ban this user!
Old 11-29-2011, 12:48 PM
 
Join Date: Sep 2011
Location: USA
Posts: 56
texaspyro is on a distinguished road

Originally Posted by angelw View Post
See the attached picture to get an idea of how to determine which axis is the rotation axis or parallel to one of the axes.
Nice drawing Bill... it explains it well.

The G18 plane is a rather problematic little beastie. One should always be aware that the G18 plane is actually a Z-X plane and not an X-Z plane. The Z axis should properly be drawn as the "horizontal" axis, and the X axis as the "vertical" axis. Your drawing gets around this by reversing the direction of the G02/G03 arcs.

Many control manuals call G18 an XZ plane and do not properly document it (or even talk about it at all). A couple even mess it up entirely and treat it as XZ in some commands and ZX in others. Same goes for some backplotters that are out there...
Reply With Quote

  #5   Ban this user!
Old 11-29-2011, 03:00 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by texaspyro View Post
Nice drawing Bill... it explains it well.

The G18 plane is a rather problematic little beastie. One should always be aware that the G18 plane is actually a Z-X plane and not an X-Z plane. The Z axis should properly be drawn as the "horizontal" axis, and the X axis as the "vertical" axis. Your drawing gets around this by reversing the direction of the G02/G03 arcs.

Many control manuals call G18 an XZ plane and do not properly document it (or even talk about it at all). A couple even mess it up entirely and treat it as XZ in some commands and ZX in others. Same goes for some backplotters that are out there...

Texaspyro,
You're quite correct, getting the plane selection correct and selecting the correct axis in #1022 is invariably where Programmers/Operators go wrong when implementing Cylindrical Interpolation.

I'm probably not as critical of Fanuc Manuals as most seem to be, I actually think that they explain the various function quite well. However, the explanation of how to select the correct axis to set in #1022 and then the format that must be adhered to when initiating "the plane choice order", is rather lacking in my opinion. You may note in my Post #2 the occurrence of Z and C have been reversed when setting G17 - G19. This is important, as it relates to the axis set in #1022, and relying on the modal characteristic of plane selection G codes is where most go wrong.

Rich, the OP of this thread, needed a solution for a lathe having a "C" axis. In determining the axis to set in #1022, at first glance its understandable that the "C" axis may be deemed parallel to the "Z" axis. However, this is incorrect and I believe it can be rationalized, by looking at which axes could the cylinder be developed in. The attached drawing may better explain why the X axis is selected as being the parallel axis and not Z.

Because the Cylindrical Interpolation function effectively allows for the cylindrical surface to be unwrapped for the purpose of programming the tool path, the Pink arrow in the drawing represents the travel of the C axis in terms of linear movement when the cylindrical surface is unwrapped. From this you can see that the travel direction of the C axis is perpendicular to the Z axis and parallel to the X axis.

Click image for larger version

Name:	Cylindrical3.JPG
Views:	20
Size:	31.2 KB
ID:	147042

Following is an example program cut from a Fanuc manual. Note that G18 has been specified with incremental moves of 0.0 in both Z and C. This is to set "the plane choice order" without initiating any move.

Regards,

Bill


O0001 (CYLINDRICAL INTERPOLATION )
N1 G00 Z100.0 C0
G01 G18 W0 H0
G07.1 H57299
G01 G42 Z120.0 D01 F250
C30.0
G02 Z90.0 C60.0 R30.0
G01 Z70.0
G03 Z60.0 C70.0 R10.0
G01 C150.0
G03 Z70.0 C190.0 R75.0
G01 Z110.0 C230.0
G02 Z120.0 C270.0 R75.0
G01 C360.0
G40 Z100.0
G07.1 C0
M30
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 11-29-2011, 03:15 PM
 
Join Date: Jul 2011
Location: USA
Posts: 7
Rich L is on a distinguished road

Adding the incremental G18 block solved the problem and the parameter#1022 is set to "5" meaning "parallel to X"

G98 (IPM required for G7.1)

M21 (get into C-axis mode)
...

G1 X.500 F200
G1 Z0.

G7.1 C.250
G18 W0 H0
G28 H0.

G1 Z-.5 C90. F200 (works)
G1 Z0. C0. (works)

G2 Z-.25 C90. R.500 (works!)

Thanks for the assistance!

Cheers,
Rich
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
Need Help!- Question about 'fast decay' mode while designing bipolar stepper drivers lxwservo Open Source Controller Boards 2 08-20-2011 07:33 AM
License question - Virtual PC XP mode MBX5 Solidworks 1 02-28-2011 03:02 PM
Driver question about CW/CCW mode available (optional) Glidergider Automation Technology Products 12 11-27-2009 07:15 PM
What is - Torque Mode? Position Mode? Speed/Velocity Mode? sunmix Servo Motors and Drives 25 10-26-2008 03:53 AM
G63 Tapping Mode question Al_The_Man General CNC (Mill and Lathe) Control Software (NC) 0 05-11-2007 11:09 AM




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