586,358 active members*
3,547 visitors online*
Register for free
Login
Results 1 to 16 of 16
  1. #1
    Join Date
    Apr 2011
    Posts
    720

    Gcode/Mach questions

    All,

    I'm struggling with something that is pretty basic and I think, simple, but I'm not getting anywhere.

    There are lots of examples of free g code on the web, but unless the poster tells me the X0Y0 point to start from, I usually can't tell. Sometimes when I load the file and look at the table display in Mach it's easy to see, but most of the time it's not obvious.

    Another related question is, some times when I load a file, such as firstpart.nc that came with the 1100, it shows up on the dashed outline of the table, but other times, such as roadrunner.tap, which also came with the mill, it shows up outside the table area. Roadrunner shows up just above and at the left edge of the outline. All these examples are with the system freshly referenced. One suggestion I recieved was to move the spindle to roughly the center of the table and zero X & Y and I would have the red line to the start point of the work. That seems to happen when the work shows up on the table (firstpart.nc), but doesn't with the other files (roadrunner.tap, etc.)

    Any insight into my errors would be greatly appreciated.

    Terry

  2. #2
    Join Date
    Sep 2006
    Posts
    340
    Your part is located on the mcs it was designed on? Another words you make a square and it starts at x1y1z-.5 then it goes to x3y1z-.5 then x3y3z-.5 then x1y3z-.5 finally returning to x1y1z-.5

    This part is not starting at any zero, and is located 1 inch off both X&Y. If you do the same thing and start with a 5, and make a respective square you will start at 5.

    Design location.
    Hey check out my website...www.cravenoriginal.com
    Thanks Marc

  3. #3
    Join Date
    Apr 2011
    Posts
    720
    Pointcloud,

    First, thanks for taking the time to reply and help.

    I understand what you are saying, but my question in more about where the spindle is when you give that first x1y1 command. There must be a reference point to start the cut from. Most of the time it's the back left corner or the center, but not always.

    Terry

  4. #4
    Join Date
    Jun 2008
    Posts
    128
    Mach does not know where the the part is located so you have to tell it.
    If you load a gcode file such as roadrunner.tap
    Goto tab "Tool Path(alt-4)" you will see that x range is 0 to 7.7 and y is 0 to 0 to 6.4 and z is -.1 to + .2
    This tells you that you need a block 7.7 X 6.4 and cut depth will be -.1
    Then you go back to Program run tab.
    You then position center of your cutter at the lower left corner level with the top of the part
    Then click on "Zero X" "Zero Y" and "Zero Z" this tells mach where the part is.
    Regen toolpath will move the cursor to lower left on the screen.

    If Gcode is for example milling a circular pocket then code may be set up to center rather than lower left corner. If X range is - 2 to + 2 an y is -1 to +1 then you would set cutter to center of part and zero axis.

    By the way if you zero Z on top of part be sure to move up after in case first move does not move to safe level

    George

  5. #5
    Join Date
    Apr 2011
    Posts
    720
    George,

    Thanks very much, your explaination helped me a lot. I never really look on the tool path tab to notice the max XYZ displays.

    I still have not figured out how you know to start at the lower left corner though? The screenshot I've attached shows my tool path display when roadrunner is loaded. I still don't know why it displays above the dashed outline of the table, but it cuts correctly when I zero X&Y as you said to do.

    There is a red line from approximatley the center of the table to the lower left corner of the roadrunner display, is that telling me the starting point, or is it coincidence? When I load another file, the small roadrunner someone posted at the Mach3 forum, it doesn't show the line going there, but toward the upper left of the image?

    appreciate your patience and help.

    Terry
    Attached Thumbnails Attached Thumbnails roadrunner.jpg   small roadrunner.jpg  

  6. #6
    Join Date
    Jun 2008
    Posts
    128
    Go to Mach support documentation page:
    ArtSoft USA - Documentation

    Download "Using Mach3 Mill" and look at chapter 7
    This will explain coordinate system in Mach.
    I don't have home or limit switches so I never use machine coordinates and offsets I just tell mach where 0,0,0 is.

    George

  7. #7
    Join Date
    Apr 2011
    Posts
    720
    George, thanks for the link, I will spend some time reading, and hopefully get some more understanding.

    Thanks again
    Terry

  8. #8
    Join Date
    May 2005
    Posts
    2502
    Terry, here is a free g-code tutorial:

    CNC G-Code Programming Tutorial, Course, Examples, and Programs

    You can either use Mach3 or a g-code editor/simulator to play with the g-codes and see what they do. Try some simple "etch-a-sketch" experiments with g-code to get a feel for things. It's easier than it looks, just takes a little knowledge and practice.

    Cheers,

    BW
    Try G-Wizard Machinist's Calculator for free:
    http://www.cnccookbook.com/CCGWizard.html

  9. #9
    Join Date
    Mar 2003
    Posts
    35538
    You also might want to watch the Homing, Limits and Offsets video here.
    ArtSoft USA - Video Tutorials
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  10. #10
    Join Date
    Apr 2011
    Posts
    720
    Gerry, Thanks for the link, that video helps a lot.

    Terry

  11. #11
    Join Date
    Dec 2003
    Posts
    673
    Quote Originally Posted by george4657 View Post
    Mach does not know where the the part is located so you have to tell it.
    If you load a gcode file such as roadrunner.tap
    Goto tab "Tool Path(alt-4)" you will see that x range is 0 to 7.7 and y is 0 to 0 to 6.4 and z is -.1 to + .2
    This tells you that you need a block 7.7 X 6.4 and cut depth will be -.1
    Then you go back to Program run tab.
    You then position center of your cutter at the lower left corner level with the top of the part
    Then click on "Zero X" "Zero Y" and "Zero Z" this tells mach where the part is.
    Regen toolpath will move the cursor to lower left on the screen.

    If Gcode is for example milling a circular pocket then code may be set up to center rather than lower left corner. If X range is - 2 to + 2 an y is -1 to +1 then you would set cutter to center of part and zero axis.

    By the way if you zero Z on top of part be sure to move up after in case first move does not move to safe level

    George
    Good tips George! - Been using Mach for years and didn't know that one!

    MF Chief, lots of good free resources on the web for G-code... I printed out and laminated on and have it right on the wall next to my mill for those more obscure codes I can't remember.

    On my own parts, I always do a z clearance move before I do anything in code, and finish with a z clear move, and if I manually stop for any reason, I always move z clear before doing anything else... will save you some heart stoppers!

  12. #12
    Join Date
    Apr 2011
    Posts
    720
    Spinnette,

    Great minds think alike - LOL, Just today while I was working thru the G code Tutorial, I was googling around looking for a nice wall chart for codes! I didn't find one I liked, but I know it's out there somewhere.......

    Terry

  13. #13
    Join Date
    Dec 2003
    Posts
    673
    Quote Originally Posted by MFchief View Post
    Spinnette,

    Great minds think alike - LOL, Just today while I was working thru the G code Tutorial, I was googling around looking for a nice wall chart for codes! I didn't find one I liked, but I know it's out there somewhere.......

    Terry
    Terry, I pieced one together that fits nicely on 11x17. Not sure if any use to you, but its attached below. I have this side by side with a drill and tap chart. Very handy.

    One thing that can get confusing is the difference between machine coordinates and "work offsets"... On the Tormach, it will show the table as the red dotted lines. Make sure to "Ref All" periodically, but from there, just don't worry about the machine coordinates for the most part. in Mach, set your zeros on the DRO's as was explained earlier and run your parts. When using other peoples code, you gotta figure out where they put the zero point, but for simplicity, I tend to always set my zero on the top, back left corner of the stock in CAM, and every move is relative to that point... then I don't have to remember anything when running the part. Are you using CAM? That lets you set where you want the zero to be. As suggested, take some simple code, run it in mach without cutting parts and see what does what. add lines, take some out.... once it "clicks", all the basic stuff is easy. It can get plenty complicated, but doesn't have to be for most parts. Typically I run a part through CAM and then hand tune to minimize machine moves and whatnot.
    Attached Files Attached Files

  14. #14
    Join Date
    Apr 2011
    Posts
    720
    Spinnette,

    Your chart is exactly what I was looking for, thank you very much!

    And also thank you for all your advise and encouragement. The toughest part so far is trying to figure out where folks set their zero's as you said. If I write it myself, then I know of course.

    One other thing that makes it tough, is everything I read and watch in video's is just a little different than what I see. You mentioned the red dotted box and the art soft video shows a red solid box, but on my machine it is white dashes, as you can see in my earlier posted images. I still don't understand why some files show up inside the box and others, like roadrunner don't? When I asked the Tormach folks, I was told it was because of the soft limits, which Tormach doesn't implement in their mach versions. I guess that may be the reason, but why just some files, not all?

    Anyway, thank you again for your help and the excellent chart.

    Terry

  15. #15
    Join Date
    Dec 2003
    Posts
    673
    Quote Originally Posted by MFchief View Post
    Spinnette,

    Your chart is exactly what I was looking for, thank you very much!

    And also thank you for all your advise and encouragement. The toughest part so far is trying to figure out where folks set their zero's as you said. If I write it myself, then I know of course.

    One other thing that makes it tough, is everything I read and watch in video's is just a little different than what I see. You mentioned the red dotted box and the art soft video shows a red solid box, but on my machine it is white dashes, as you can see in my earlier posted images. I still don't understand why some files show up inside the box and others, like roadrunner don't? When I asked the Tormach folks, I was told it was because of the soft limits, which Tormach doesn't implement in their mach versions. I guess that may be the reason, but why just some files, not all?

    Anyway, thank you again for your help and the excellent chart.

    Terry
    Glad that chart works for you ... as to what shows up in the box and not, try setting your zeros on the mach screen, then hit the regenerate button. Depending on how your zeros were when you loaded the program, it might center it right. It will default to the code zero, and show on screen relative to whatever the dro's say. Take two pieces of simple code, one that shows right and one that doesn't, and deconstruct them line for line.... you'll find the codes that are messing you up.. probably one sets the relative mode and one doesnt....

  16. #16
    Join Date
    Apr 2011
    Posts
    720
    Spinnette,

    Thanks again for your help, you last suggestion for a line by line comparison is excellant, I haven't had a chance to get to the shop today, but I intend to follow up on that. If I find the magic line, I will let you know.

    Terry

Similar Threads

  1. Mach 3 DRO/Gcode doesn't match
    By gbward4 in forum Mach Software (ArtSoft software)
    Replies: 4
    Last Post: 01-17-2011, 06:54 AM
  2. Mach 3 GCode Error
    By stabbs in forum Mach Software (ArtSoft software)
    Replies: 2
    Last Post: 08-21-2009, 07:02 PM
  3. Mach 3 reacting to my GCode crazy!
    By WarrenW in forum Mach Software (ArtSoft software)
    Replies: 3
    Last Post: 02-19-2006, 10:44 PM
  4. Mach 3 GCode Question
    By WarrenW in forum Mach Software (ArtSoft software)
    Replies: 3
    Last Post: 01-10-2006, 07:43 PM
  5. Mach / GCode question
    By WarrenW in forum Mach Software (ArtSoft software)
    Replies: 11
    Last Post: 11-19-2005, 08:21 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
  •