Coordinate System Rotation And Planes problem!


Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: Coordinate System Rotation And Planes problem!

  1. #1
    Registered
    Join Date
    Aug 2016
    Location
    Iran, Islamic Republic Of
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default 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;

    Similar Threads:


  2. #2
    Member
    Join Date
    Jun 2010
    Location
    Australia
    Posts
    4256
    Downloads
    4
    Uploads
    0

    Default Re: Coordinate System Rotation And Planes problem!

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



  3. #3
    Registered
    Join Date
    Aug 2016
    Location
    Iran, Islamic Republic Of
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default Re: Coordinate System Rotation And Planes problem!



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

    Attached Thumbnails Attached Thumbnails Coordinate System Rotation And Planes problem!-untitled-jpg  


  4. #4
    Member
    Join Date
    Jun 2010
    Location
    Australia
    Posts
    4256
    Downloads
    4
    Uploads
    0

    Default 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
    Registered
    Join Date
    Aug 2016
    Location
    Iran, Islamic Republic Of
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default 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
    Registered
    Join Date
    May 2016
    Location
    United States
    Posts
    36
    Downloads
    0
    Uploads
    0

    Default Re: Coordinate System Rotation And Planes problem!

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



  7. #7
    Member christinandavid's Avatar
    Join Date
    Aug 2009
    Location
    New Zealand
    Posts
    684
    Downloads
    0
    Uploads
    0

    Default 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
    Registered
    Join Date
    Aug 2016
    Location
    Iran, Islamic Republic Of
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default 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
    Registered
    Join Date
    Aug 2016
    Location
    Iran, Islamic Republic Of
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default 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
    Member
    Join Date
    Jun 2010
    Location
    Australia
    Posts
    4256
    Downloads
    4
    Uploads
    0

    Default 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

    Last edited by RCaffin; 08-11-2016 at 07:41 PM.


  11. #11
    Member christinandavid's Avatar
    Join Date
    Aug 2009
    Location
    New Zealand
    Posts
    684
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Aug 2016
    Location
    Iran, Islamic Republic Of
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default 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
    Member
    Join Date
    Jun 2010
    Location
    Australia
    Posts
    4256
    Downloads
    4
    Uploads
    0

    Default Re: Coordinate System Rotation And Planes problem!

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



  14. #14
    Registered
    Join Date
    Aug 2016
    Location
    Iran, Islamic Republic Of
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default 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?
    Coordinate System Rotation And Planes problem!-img_1047-jpg



  15. #15
    Registered
    Join Date
    Aug 2016
    Location
    Iran, Islamic Republic Of
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default 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
    Member
    Join Date
    Jun 2010
    Location
    Australia
    Posts
    4256
    Downloads
    4
    Uploads
    0

    Default 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
    Member dharmic's Avatar
    Join Date
    May 2015
    Location
    Australia
    Posts
    1422
    Downloads
    0
    Uploads
    0

    Default 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
    Member vmax549's Avatar
    Join Date
    Oct 2005
    Location
    Lady Lake
    Posts
    1145
    Downloads
    3
    Uploads
    0

    Default 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
    Member
    Join Date
    Jun 2010
    Location
    Australia
    Posts
    4256
    Downloads
    4
    Uploads
    0

    Default 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
    Registered
    Join Date
    Aug 2016
    Location
    Iran, Islamic Republic Of
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default Re: Coordinate System Rotation And Planes problem!

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



Page 1 of 2 12 LastLast

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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Coordinate System Rotation And Planes problem!

Coordinate System Rotation And Planes problem!