Need Help! G-Code error


Results 1 to 12 of 12

Thread: G-Code error

  1. #1
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default G-Code error

    good day Tom,
    after a long pause I finally finished my lathe, mechanically and electrically.
    Everything works smoothly: external buttons, handweels, rotary tool changer, spindle and so on.
    Problems come when I try to launch a job and that is:

    I open path file (TR_PROFILO_1.txt), it's all right.

    I flag "Simulate", "run" and the path is executed and displayed in the graphics window without errors (Simulation.png)

    I press Run button and I get G-Code error (run error.png)

    The strangest thing is that if I run the same path with the "Single step" button most of the time I can get
    to the end without errors, while sometimes I get the G-Code error as in automatic.
    I'm sure I'm doing something wrong but I can't figure out what.
    Some advice?

    Beppe

    Similar Threads:
    Attached Thumbnails Attached Thumbnails G-Code error-simulation-jpg   G-Code error-run-error-jpg  
    Attached Files Attached Files


  2. #2
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: G-Code error

    Quote Originally Posted by geppo_it View Post
    good day Tom,
    after a long pause I finally finished my lathe, mechanically and electrically.
    Everything works smoothly: external buttons, handweels, rotary tool changer, spindle and so on.
    Problems come when I try to launch a job and that is:

    I open path file (TR_PROFILO_1.txt), it's all right.

    I flag "Simulate", "run" and the path is executed and displayed in the graphics window without errors (Simulation.png)

    I press Run button and I get G-Code error (run error.png)

    The strangest thing is that if I run the same path with the "Single step" button most of the time I can get
    to the end without errors, while sometimes I get the G-Code error as in automatic.
    I'm sure I'm doing something wrong but I can't figure out what.
    Some advice?

    Beppe
    Why is N50 N55and N60 like that remove it and see if it runs

    Also, what is G97 being used for it is not needed unless you are to cancel a G96 so this should be also removed

    Mactec54


  3. #3
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default Re: G-Code error

    Hi Beppe,

    It's indicating an axis is disabled. Do you have another Axis besides X and Z defined in your coordinate system? Such as Y? Use KMotion.exe Axis Screen to check which axes are enabled.

    Post your INIT C Program so we can see how your are defining your Coordinate System. Also any M6 or M8 Programs you have and how they are configured.

    Regards
    TK http://dynomotion.com


  4. #4
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default Re: G-Code error

    Lines 50-55-60 are a simple comment, the error occurs first: on the first G0. As for the G97 I will try to remove it but the interpreter will have to know that we are at constant revolutions and not at constant advancement.
    Also I do not explain why the simulation doesn't detect errors since, presumably, the interpreter is the same.

    Beppe



  5. #5
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default Re: G-Code error

    Hi Tom,
    I'm at home right now, 9:15 pm here. In the morning I will copy everything you asked for and publish it.
    However, I have a screenshot, captured after the error, of the status of the axes; find it attached

    Beppe

    Attached Thumbnails Attached Thumbnails G-Code error-axis-status-error-png  


  6. #6
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default Re: G-Code error

    Hi Beppe,

    That shows 0, 1, 2 enabled. What is Axis 1?

    Maybe you are including Axis 3 (S?) as an A Axis?

    Regards
    TK http://dynomotion.com


  7. #7
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: G-Code error

    Quote Originally Posted by geppo_it View Post
    Lines 50-55-60 are a simple comment, the error occurs first: on the first G0. As for the G97 I will try to remove it but the interpreter will have to know that we are at constant revolutions and not at constant advancement.
    Also I do not explain why the simulation doesn't detect errors since, presumably, the interpreter is the same.

    Beppe
    Comments like that in a program are not needed

    A G97 cancels a G96 you don't have any G96 in the program, so it would not be needed unless the control defaults to G96 then you would need the G97 to cancel it

    You have a G99 per revolution feed

    It seems you have other problems though

    Mactec54


  8. #8
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default Re: G-Code error

    good day Tom and Mactec54,

    thanks for your interest.
    The problem comes because, after finishing the tool change operation, I disable the turret motor driver. This is because, having a mechanical lock on the turret, I did not consider it necessary to keep the motor active. However, this has the consequence that, over time, a small position error becomes a large following error and the axis is disabled. Obviously, corrected this, everything works fine.

    Tom, yes u right: I configured Axis 2 as Spindle and Axis 3 as A Axis. Is that wrong?
    (Axis 0 as X and Axis 1 as Z)

    Beppe



  9. #9
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default Re: G-Code error

    well guys,

    just enough time to launch another path and another type of error appeared.
    I generated the path with HSMWorks: with IK declarations the simulation practically stops on the first G2 it encounters; with the R statement the simulation goes a little further but still stops.
    Since I have tried different post processors always getting the same type of error, I think there is something to fix in the Kflop setting ...
    Or am I wrong??

    Beppe

    Attached Thumbnails Attached Thumbnails G-Code error-radius-g2-error-jpg   G-Code error-arc-g2-error-jpg  
    Attached Files Attached Files


  10. #10
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default Re: G-Code error

    no one has any idea where the error might come from?



  11. #11
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default Re: G-Code error

    HI Beppe,

    Regarding Radius Post:If you do the math the distance between the start and end points of the arc is > 3mm. So a circle with radius 1.35 can't possibly fit on both the begin and end. If you configure Diameter Mode (where all the X distances are cut in half) then it works for me.

    Regarding IK Post:In Diameter mode if I double the I values such that it is real distance to center rather than half distance units then it works.

    Do you want KMotionCNC to operate in Diameter or Radius mode for X?

    Is your CAD system set to output Diameters or Radii?

    Regards
    TK http://dynomotion.com


  12. #12
    Member geppo_it's Avatar
    Join Date
    Apr 2019
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default Re: G-Code error

    hi Tom,

    I configured Diameter mode and now everything is working fine. I just have to check if the CAD system gives me the right displacements to obtain the desired diameters.

    Thanks, Beppe



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

G-Code error

G-Code error