Newbie Reading the end of my post processing G Code


Results 1 to 13 of 13

Thread: Reading the end of my post processing G Code

  1. #1

    Default Reading the end of my post processing G Code

    Hello. I'm trying to find out how to read my post processing text to identify where my machine will come to a stop after milling. How can I read it and identify that? I've only had a cnc for about 6 months and I have very limited time reading G code. Hoping to learn more but need to know this. Thanks for your help.

    Similar Threads:


  2. #2
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: Reading the end of my post processing G Code

    Why don't you post the last few lines of your G code file and maybe we can help you.

    Jim Dawson
    Sandy, Oregon, USA


  3. #3
    Member
    Join Date
    Feb 2006
    Location
    india
    Posts
    1792
    Downloads
    0
    Uploads
    0

    Default Re: Reading the end of my post processing G Code

    Search for M02 and M30 which terminate the program.



  4. #4

    Default Re: Reading the end of my post processing G Code

    Thanks for the replies. This is the last lines of the post. I see M30, but...? Not sure what M30 is saying. I thought that I read that maybe G28 says to go to home? Not sure if I'm reading that right, but if so, can I replace that to read G54, which is my part zero and where I'd like it to end? Sorry I'm not very familiar yet.

    X13.2064 Y9.3904 Z-0.6407
    X13.2034 Y9.3876 Z-0.6426
    X13.2002 Y9.3846 Z-0.6439
    X13.1969 Y9.3816 Z-0.6447
    X13.1936 Y9.3785 Z-0.645
    G3 X13.1875 Y9.3651 I0.0131 J-0.0141
    G1 Y8.1715 F100.
    G3 X13.1909 Y8.1572 I0.0375 J0.0013 F39.4
    G1 X13.1927 Y8.1531 Z-0.6447
    X13.1946 Y8.1491 Z-0.6439
    X13.1964 Y8.1451 Z-0.6426
    X13.1981 Y8.1414 Z-0.6407
    X13.1997 Y8.1379 Z-0.6384
    X13.2012 Y8.1346 Z-0.6356
    X13.2025 Y8.1317 Z-0.6324
    X13.2037 Y8.1292 Z-0.6288
    X13.2046 Y8.127 Z-0.6249
    X13.2054 Y8.1253 Z-0.6208
    X13.206 Y8.1241 Z-0.6165
    X13.2063 Y8.1234 Z-0.612
    X13.2064 Y8.1231 Z-0.6075
    G0 Z0.6


    M9
    G28 G91 Z0.
    G28 X0. Y0.
    M30



  5. #5
    Member
    Join Date
    Feb 2006
    Location
    india
    Posts
    1792
    Downloads
    0
    Uploads
    0

    Default Re: Reading the end of my post processing G Code

    You would need to read a text book.

    M30 terminates the program and resets the control.



  6. #6

    Default Re: Reading the end of my post processing G Code

    You're right about that. I do need to learn to read this stuff better. Am I right about G28 though? When you read the end of the post that I included, what do you see M30 telling you? Sorry I don't have time to read a text book right now but I work too much and have a 7 month old that I have to pay attention to, so my time is somewhat limited. Any help understanding this will be appreciated.



  7. #7
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: Reading the end of my post processing G Code

    G0 Z0.6 (moves Z to a safe location)


    M9 (turns coolant off)
    G28 G91 Z0. (G28 - go home) (G91 - set incremental moves) (move Z to home 0)
    G28 X0. Y0.
    M30 (program end and rewind) (rewind is from the old tape drive days) (M2 also means program end, with no rewind)

    https://www.cnccookbook.com/g28-g-code-cnc-return-reference-position/

    By adding any G code you want after the cutting moves, you can park your machine anywhere you want.

    Example:

    G0 Z0.6


    M9
    G0 Z1.0 (rapid Z to 1.0 unit)
    G0 X10.0 Y10.0 (rapid X and Y to 10.0 units)
    M30

    Jim Dawson
    Sandy, Oregon, USA


  8. #8

    Default Re: Reading the end of my post processing G Code

    Thanks for the info Jim. So can I just remove this entire section:

    M9
    G28 G91 Z0.
    G28 X0. Y0.
    M30

    Replaced with:

    G55

    This is where I have my part zero setup and where I would like to have the machine come to rest and turn off.



  9. #9
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: Reading the end of my post processing G Code

    I have never used work offsets so I can't really answer that question. But don't forget the M30 at the end.

    Jim Dawson
    Sandy, Oregon, USA


  10. #10

    Default Re: Reading the end of my post processing G Code

    Sorry if I'm being dense, but just to make sure I'm thinking about this properly, M9 turns off the coolant, from what I can understand G28 sends the machine HOME, and M30 basically turns the power off or something along those lines? What does G91 do?

    M9
    G28 G91 Z0.
    G28 X0. Y0.
    M30



  11. #11
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: Reading the end of my post processing G Code

    More correctly M30 tells the controller that it's at the end of the program.

    G91 sets the coordinate system to incremental moves. Seems like an odd place to have a G91, but Fusion is a little weird sometimes. I know you can turn off the G28 in Fusion, I think it's a checkbox in the setup. Or you can edit the post processor and set Use G28 to False if I remember correctly.

    This might be helpful to you

    https://en.wikipedia.org/wiki/G-code

    Jim Dawson
    Sandy, Oregon, USA


  12. #12

    Default Re: Reading the end of my post processing G Code

    Thanks for the link. I have been checking that out a bit. I think I have a small grasp on this now. I really appreciate you taking the time. Had my machine crash into the end in the Y direction wednesday night, I'm thinking from those command lines, and it's been running inaccurately since. Trying to get it squared up and running smoothly again and also trying to eliminate the chances of it happening again with the command lines.



  13. #13
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: Reading the end of my post processing G Code

    My pleasure to help where I can

    You proabaly need to loosen what ever bolts attach the Y axis, square it up and retighten. I've had to do that with a couple customer machines when they had problems. Hopefully that will fix that problem then you can make adjustments to the G code so that it behaves.

    Jim Dawson
    Sandy, Oregon, USA


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

Reading the end of my post processing G Code

Reading the end of my post processing G Code