586,113 active members*
3,248 visitors online*
Register for free
Login
Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2011
    Posts
    0

    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

  2. #2
    Join Date
    Sep 2010
    Posts
    1230
    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:	76 
Size:	48.8 KB 
ID:	147002

    Regards,

    Bill

  3. #3
    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

  4. #4
    Join Date
    Sep 2011
    Posts
    68
    Quote 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...

  5. #5
    Join Date
    Sep 2010
    Posts
    1230
    Quote 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:	40 
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

  6. #6
    Join Date
    Jul 2011
    Posts
    0
    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

  7. #7
    Join Date
    Sep 2022
    Posts
    1

    Re: Question Using G02 in G7.1 mode

    Good day All

    I have a Doosan Puma 280 LM Fanuc I Series gang tool lathe with full C-axis capability and I'm running into a problem coding up some circular interpolation codes (G02) after the G7.1 cylindrical interpolation mode. G18 is the default plane of operation for this machine.

    The issue I have is, I do the interpolation to mill a slot with G7.1, I then mill flats on my part and part it off and the program ends, when I restart

    1) I face the part
    2) I drill a hole

    Here comes the issue:

    When I rough with a boring bar, the minute it wants to do the G02 it throws the error "21 Illegal Plane Axis Commanded"

    Sample Below:

    O0001 (5R-6518-2-2-5 TEST)
    (DATE - 22-01-24 TIME - 12:29)
    (MCX FILE - W:\CNC - PROGRAMMING\MASTERCAM\F\FIVE RINGS\5R-6518-2-2-5 LATHE.MCAM)
    (POST REV - 08)
    G0 G40 G80 G99
    G21
    M24
    (OD FINISH RIGHT - 35 DEG. INSERT - VNMG 16 04 08)
    G0 G54 X250. Z300.
    T0202
    G99
    M24
    G97 S682 M03
    G0 X70. Z.65 M8
    G50 S3200
    G96 S150
    G1 X-1.8 F.15
    G0 Z2.65
    X70.
    Z.4
    G1 X-1.8
    G0 Z2.4
    X70.
    Z.15
    G1 X-1.8
    G0 Z2.15
    M9
    G97 S191
    G0 X250. Z300.
    M01
    (TOOL - 11 OFFSET - 11)
    (18MM TAEGUTEC FLAT BOTTOM DRILL)
    G0 G54 X250. Z300.
    T1111
    G98
    G97 S1750 M03
    G0 X400. Z20. M8
    X0.
    Z5.
    G83 Z-38.1 R-3. F180.
    G80
    Z20.
    X400.
    M9
    G0 X250. Z300.
    M01
    (TOOL - 10 OFFSET - 10)
    (1412 BORING BAR INSERT - NONE)
    G0 G54 X250. Z300.
    T1010
    G99
    G97 S3200 M03
    G0 X18.338 Z4.85 M8
    G50 S3200
    G96 S300
    G1 Z2.85 F.3
    Z-37.9
    X15.51 Z-36.486
    G0 Z4.85
    X22.006
    G1 Z2.85
    Z-.151
    X21.957 Z-.176 ( ** Gets stuck here ** )
    G2 X21.606 Z-.6 R.6
    G1 Z-37.9
    X18.338
    X15.51 Z-36.486
    G96 S200
    G0 Z1.883
    X23.24
    G1 Z-.117 F.15
    X22.84 Z-.317
    G2 X22.606 Z-.6 R.4
    G1 Z-38.1
    X4.
    Z-36.1
    G0 Z1.4
    M9
    G97 S255
    G0 X250. Z300.
    M01

    When I switch off and restart machine , programs runs all the way through with no issues

    Any assistance is appreciated.

    Cheers

  8. #8
    Join Date
    Feb 2024
    Posts
    0

    Re: Question Using G02 in G7.1 mode

    In your case:

    X = 1 (X axis of basic three)
    Z = 3 (Y axis of basic three)
    C = 5 (Axis parallel to X axis)
    Given that your C-axis is parallel to the X-axis, it seems correct that C = 5. However, the issue you're facing with circular interpolation commands (G02/G03) suggests that the control might be interpreting the C-axis differently in this mode.

    Your suggestion to try setting C = 7 (Axis parallel to Z axis) makes sense, especially if the C-axis is parallel to the Z-axis in the context of circular interpolation.

    Here's the proposed change:

    X = 1 (X axis of basic three)
    Z = 3 (Y axis of basic three)
    C = 7 (Axis parallel to Z axis- penalty shooters 2)
    Changing parameters, as you noted, should be done cautiously. It might be a good idea to back up your current parameter settings before making any changes. Additionally, consult the machine's documentation or contact the machine manufacturer or distributor for guidance on parameter adjustments specific to your machine model.

Similar Threads

  1. What is - Torque Mode? Position Mode? Speed/Velocity Mode?
    By sunmix in forum Servo Motors / Drives
    Replies: 48
    Last Post: 01-20-2024, 10:34 AM
  2. Question about 'fast decay' mode while designing bipolar stepper drivers
    By lxwservo in forum Open Source Controller Boards
    Replies: 2
    Last Post: 08-20-2011, 01:33 PM
  3. License question - Virtual PC XP mode
    By MBX5 in forum Solidworks
    Replies: 1
    Last Post: 02-28-2011, 10:02 PM
  4. Driver question about CW/CCW mode available (optional)
    By Glidergider in forum Automation Technology Products
    Replies: 12
    Last Post: 11-28-2009, 02:15 AM
  5. G63 Tapping Mode question
    By Al_The_Man in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 05-11-2007, 05:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •