585,700 active members*
3,938 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 25
  1. #1
    Join Date
    Aug 2016
    Posts
    11

    Coordinate System Rotation And Planes problem!

    Hi guys!
    I wrote a macro using coordinate system rotation (g68) and planes (g17,18,19) but I get this error:
    Illegal Plane Selected!

    Can anyone help me?

    #1=0;

    G01 X16 Y0;
    Z-10;
    WHILE[#1 LE 90] DO1;
    G18;
    G03 X36 Z-10 R10;
    G02 X16 R10;
    G17;
    G01 Z1;
    #1 = #1+1;
    G68 X0 Y0 R#1;
    G01 X16 Y0;
    Z-10;
    END1;

  2. #2
    Join Date
    Jun 2010
    Posts
    4256

    Re: Coordinate System Rotation And Planes problem!

    Exactly what are you trying to do here??????
    A pic might help.
    Cheers
    Roger

  3. #3
    Join Date
    Aug 2016
    Posts
    11

    Re: Coordinate System Rotation And Planes problem!



    1/4 of this shape. (0 to 90 degrees)

  4. #4
    Join Date
    Jun 2010
    Posts
    4256

    Re: Coordinate System Rotation And Planes problem!

    Blimey!
    OK, guessing (because I do not know your controller): the rotation command g68 usually only works in the XY plane. Having issued a g68 command, trying to change the plane away from the XY one is illegal. You will have to program it a different way.

    Cheers
    Roger

  5. #5
    Join Date
    Aug 2016
    Posts
    11

    Re: Coordinate System Rotation And Planes problem!

    the control is Fanuc Oi-MB, and i'm changing plane then use g68 on XY.
    Step 1: G02/03 on XZ plane
    Step 2: Change Plane to XY
    Step 3: Rotate coordinate system

    Does this mean that i am rotating XZ plane!??

  6. #6
    Join Date
    May 2016
    Posts
    36

    Re: Coordinate System Rotation And Planes problem!

    Where you from Amir? What country do you live in?

  7. #7
    Join Date
    Aug 2009
    Posts
    684

    Re: Coordinate System Rotation And Planes problem!

    Does your machine have the option to arc in three axes? If it does, you may need to add another argument to the G2/G3 to define the midpoint.

    If not, the best way may be to produce the shape in G1 line segments instead of arcs. Just use two more while/do loops inside the existing loop, to travel back and forth.

    Removing the arcs also means you won't have to change the working plane.

    DP

  8. #8
    Join Date
    Aug 2016
    Posts
    11

    Re: Coordinate System Rotation And Planes problem!

    Quote Originally Posted by postwrtr View Post
    Where you from Amir? What country do you live in?
    Iran, Why?

  9. #9
    Join Date
    Aug 2016
    Posts
    11

    Re: Coordinate System Rotation And Planes problem!

    Quote Originally Posted by christinandavid View Post
    Does your machine have the option to arc in three axes? If it does, you may need to add another argument to the G2/G3 to define the midpoint.

    If not, the best way may be to produce the shape in G1 line segments instead of arcs. Just use two more while/do loops inside the existing loop, to travel back and forth.

    Removing the arcs also means you won't have to change the working plane.

    DP
    Thank you for your answer, but i have a few questions,
    How do I know that my machine has the option to arc in three axes?
    and logically my code doesn't use three axes unless the machine conclude itself that our main purpose is moving around three axes.
    look, I move into XZ plane, then change plane, move on the XY plane, not three axes in a same time. right?

    and about dividing arcs to straight lines yes I could do that but not a good idea, I need clean code. that is what satsfies me

  10. #10
    Join Date
    Jun 2010
    Posts
    4256

    Re: Coordinate System Rotation And Planes problem!

    How do I know that my machine has the option to arc in three axes?
    You don't. I suggest you assume it can NOT unless you find an explicit statement that it can. I don't think NIST g-code allows it, and it would be hell for the older controllers to implement. Read the manual.

    look, I move into XZ plane, then change plane, move on the XY plane, not three axes in a same time. right?
    But the controlled point WILL be moving on all 3 axes. Anyhow, I am not going to continue arguing the point.

    Once the machine has executed a single g68 command (without a matching g69), then the machine knows it has entered into coordinate rotation. Once it has entered into coordinate rotation, a change of work plane is not permitted. That is what the error message is trying to tell you.

    Do any controllers permit a change of work plane once you have entered into coordinate rotation? I don't know, but I don't know all controllers. I do know the maths would be fairly complex, and I tghink that you would need a PC-based controller for this, not an older hardware-based unit.

    Cheers
    Roger

  11. #11
    Join Date
    Aug 2009
    Posts
    684
    Quote Originally Posted by amir_nop View Post
    Thank you for your answer, but i have a few questions,
    How do I know that my machine has the option to arc in three axes?
    and logically my code doesn't use three axes unless the machine conclude itself that our main purpose is moving around three axes.
    look, I move into XZ plane, then change plane, move on the XY plane, not three axes in a same time. right?

    and about dividing arcs to straight lines yes I could do that but not a good idea, I need clean code. that is what satsfies me
    I assume program will run without error if the G68 is removed?

    DP

  12. #12
    Join Date
    Aug 2016
    Posts
    11

    Re: Coordinate System Rotation And Planes problem!

    Quote Originally Posted by christinandavid View Post
    I assume program will run without error if the G68 is removed?

    DP
    Yes it works well without G68.
    Also works by removing G18.

  13. #13
    Join Date
    Jun 2010
    Posts
    4256

    Re: Coordinate System Rotation And Planes problem!

    Well, there you go. You can NOT mix G68 and G18.
    Cheers
    Roger

  14. #14
    Join Date
    Aug 2016
    Posts
    11

    Re: Coordinate System Rotation And Planes problem!

    Quote Originally Posted by RCaffin View Post
    How do I know that my machine has the option to arc in three axes?
    look, I move into XZ plane, then change plane, move on the XY plane, not three axes in a same time. right?
    But the controlled point WILL be moving on all 3 axes. Anyhow, I am not going to continue arguing the point.
    Isn't this moving on all 3 axes????
    The machine does it easily!
    What's the difference?
    Attachment 330474

  15. #15
    Join Date
    Aug 2016
    Posts
    11

    Re: Coordinate System Rotation And Planes problem!

    Quote Originally Posted by RCaffin View Post
    Well, there you go. You can NOT mix G68 and G18.
    Cheers
    Roger
    ARE YOU SURE??
    or you are just guessing?

  16. #16
    Join Date
    Jun 2010
    Posts
    4256

    Re: Coordinate System Rotation And Planes problem!

    Yes, the hardware can do it. So can mine.
    But the controlling SW (Fanuc, Mach3 or whatever) can NOT do it via G68 and G18. It was too hard for the SW writers.
    In effect, you can imagine more than they could write.

    Cheers
    Roger

  17. #17
    Join Date
    May 2015
    Posts
    1422

    Re: Coordinate System Rotation And Planes problem!

    Be interesting to know if kmotion, uccnc or one of the others out there could cope...

  18. #18
    Join Date
    Oct 2005
    Posts
    1145

    Re: Coordinate System Rotation And Planes problem!

    Mach3 cannot do it Mach4 cannot do it UCCNC cannot do it. The problem is tha the controllers cannot do the G18 arc in rotated space. M3 and M4 TRY to do it but starts teh arc in Rotated space BUT it always ends teh Arc in NON rotated space and teh second arc will be totally in NON rotated space.

    Could it be made to work SURE it can IF they wanted it to BUT I dought you will ever see it done (;-).

    Now that said I believe that Fanuc can do it as it should support a midpoint Value BUT you would have to rewrite teh code and use Arc with IJK not radius values.

    (;-) TP

  19. #19
    Join Date
    Jun 2010
    Posts
    4256

    Re: Coordinate System Rotation And Planes problem!

    Interestingly, the g68 command is not even in the latest NIST standard (RS274/NGC) for g-code. Why - I do not know. It may have existed in a previous version.

    Part of the problem is that g-code was being defined starting in the 60s, and the problems of implementing coordinate rotation in the electronics we had back then were beyond imagination. So the mathematical facilities were very limited. Getting that into the latest versrion of the NIST Standard could be a long battle.

    There is an alternative to g-code - well, actually, there are quite a few alternatives, mostly unique to a single vendor. In additin, a group of slightly mad enthusiasts are developing STEP-NC as a 'modern equivalent', but the code is mind-bendingly complex, consumes MBytes of space where g-code uses a few kBytes, and cannot be hand-written. Nut cases, definitely, way out of touch from the real world.

    Dead end idea. Face reality and use the tools you do have.

    Cheers
    Roger

  20. #20
    Join Date
    Aug 2016
    Posts
    11

    Re: Coordinate System Rotation And Planes problem!

    I tried mid point value ( I J K ), didn't work either.

Page 1 of 2 12

Similar Threads

  1. Coordinate rotation problem on MORI SEIKI TV40 MSC-802m
    By kpandy in forum MetalWork Discussion
    Replies: 2
    Last Post: 08-28-2014, 04:25 PM
  2. G68 Coordinate system rotation.
    By Ashish B in forum CNC Machining Centers
    Replies: 5
    Last Post: 01-07-2013, 11:14 PM
  3. Coordinate System Rotation G & L NumeriPath 8000B
    By western pa papp in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 04-05-2011, 01:03 PM
  4. G68.1 Coordinate System Rotation Help
    By SwissPR0 in forum CNC Swiss Screw Machines
    Replies: 3
    Last Post: 02-03-2011, 08:29 PM
  5. G68 Coordinate Rotation System
    By ebigfoot2 in forum Fanuc
    Replies: 2
    Last Post: 08-13-2007, 01:33 PM

Tags for this Thread

Posting Permissions

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