Mach3 Coordinate systems; setting X0/Y0; Z-height; re-running jobs; etc.


Results 1 to 9 of 9

Thread: Mach3 Coordinate systems; setting X0/Y0; Z-height; re-running jobs; etc.

  1. #1
    Registered
    Join Date
    Mar 2013
    Location
    USA
    Posts
    21
    Downloads
    0
    Uploads
    0

    Default Mach3 Coordinate systems; setting X0/Y0; Z-height; re-running jobs; etc.

    Hi again!

    I'm in the process of learning CNC, having just retrofitted my Taig mill that I've had now for several years.

    So far, I've got the machine and Mach3 operating with the correct axis orientations and scales to move correctly in both metric and imperial units. I've also designed my first part in CamBam, generated G-code from it, run the code in Mach3 on my machine, and thus cut the first part. Everything seems basically to be working fine!

    Right now, I'm trying to build my overall understanding of the coordinate systems in play in my setup, if that's the best way to describe it. Can anyone suggest some good "introduction to CNC" type resources on the Internet, that might speed my ascent of the learning curve? I'm having questions like these:

    -- I first set my X0, Y0, and Z0 in Mach3, to the top corner of my stock. Then I ran my program and the mill cut my part, exactly as I had expected. Then I jogged the Z axis up, and inserted a new piece of stock material to make another part. I did _not_ re-zero Z; I just pushed "Page Up" to raise the endmill out of the way, and swapped in a new blank piece of material. Then when I ran the program again, the mill happily cut the new part, up in the air above the actual stock, without returning to Z0 to start. So the program seems to be running in some sort of relative coordinate system, rather than in machine coordinates. Well I would like to learn the proper and normal way of working in this kind of typical situation.

    -- What are the relationships between, and the proper ways to be using, Machine Coordinates, Work Offsets, and Tool Offsets?

    -- What exactly are the normal and correct ways to be using all the mysterious buttons in Mach3, like for example "REF ALL HOME", "To Go", "Machine Coord's", "De-Ref All Axes"?

    -- I'm dimly understanding that there are differences between incremental / absolute / machine coordinates in the ways the different G-codes work, but I don't have a useful working understanding right now, of how these interrelate, or how programs like CamBam use them in practice.

    So I am off now to start searching around and reading; if anyone can suggest some good introductory resources, I'd love to have a look!

    Many thanks--

    --dave

    Similar Threads:


  2. #2
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: Mach3 Coordinate systems; setting X0/Y0; Z-height; re-running jobs; etc.

    -- I first set my X0, Y0, and Z0 in Mach3, to the top corner of my stock. Then I ran my program and the mill cut my part, exactly as I had expected. Then I jogged the Z axis up, and inserted a new piece of stock material to make another part. I did _not_ re-zero Z; I just pushed "Page Up" to raise the endmill out of the way, and swapped in a new blank piece of material. Then when I ran the program again, the mill happily cut the new part, up in the air above the actual stock, without returning to Z0 to start.

    That should not have happened, but without seeing your g-code, it's hard to tell.


    -- What are the relationships between, and the proper ways to be using, Machine Coordinates, Work Offsets, and Tool Offsets?
    Watch the Homing, Limits and Offsets video here: ArtSoft USA - Video Tutorials
    It should answer a lot of your questions.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

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

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


  3. #3
    Registered
    Join Date
    Mar 2013
    Location
    USA
    Posts
    21
    Downloads
    0
    Uploads
    0

    Default Re: Mach3 Coordinate systems; setting X0/Y0; Z-height; re-running jobs; etc.

    Quote Originally Posted by ger21 View Post
    That should not have happened, but without seeing your g-code, it's hard to tell.
    I just ran through my workflow again. Seems to have something to do with switching over between inch and metric units. Things went roughly like this just now:

    -- start mach3;

    -- NOTE - mach3 starts up in english / inch units, since after all my machine has english leadscrews

    -- jog the mill in x,y,z to the home position of my part;

    -- click "Zero X", "Zero Y", and "Zero Z", on the "Program Run (Alt-1)" screen

    -- raise the z axis up away from the part;

    -- at this point, on the "Program Run (Alt-1)" screen, X and Y show 0.0000; Z shows some positive height over part, maybe around one inch.

    -- load my G code. The G code is all metric, so somewhere very early in it, it says G21.

    -- loading the program, makes Mach3 switch into metric units. There is no notification that this happens, and no code has been "run" so far.

    -- whereupon, I observe, non-zero coordinates in X and Y, and some not-quite-right coordinate in Z. (NOTE - non-zero coordinates in X and Y, even though X and Y have not moved. So this seems wrong to me - or else my understanding of the coordinate systems is wrong...)

    -- If I re-zero X Y and Z again on the part's home position, then everything seems to work okay, even with swapping stock to make repeated parts with jogs in between to get the tool out of the way.

    SO, I observe:

    1) I think if I am making metric parts, I should first switch Mach3 into metric units, before doing anything else.

    And a question:

    2) Is there some way to have Mach3 start up in metric units, even though the machine's native units are inch / imperial?

    Thanks again--

    --dave



  4. #4
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: Mach3 Coordinate systems; setting X0/Y0; Z-height; re-running jobs; etc.

    If you'll be running parts in both inch and metric units, then you should set up two profiles. One with the machine set up in mm's, and one with the machine set up in inches. There are lots of little things that can cause issues when trying to do both with one setup.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

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

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


  5. #5
    Member 1875's Avatar
    Join Date
    Mar 2012
    Location
    USA
    Posts
    192
    Downloads
    0
    Uploads
    0

    Default Re: Mach3 Coordinate systems; setting X0/Y0; Z-height; re-running jobs; etc.

    Mach will read the code when you load the file. If there is an error, Mach will tell you that and which line. When the code is read on loading, that is when G21 was read and switched to metric.

    I am not sure, but maybe Mach is remembering the last coordinates used in metric. It does seem odd that the units would switch from 0,0.

    You can set up Mach native units, look in the upper left drop-down menus.

    Rebuilding my Bridgeport Boss3...


  6. #6
    Registered
    Join Date
    Mar 2013
    Location
    USA
    Posts
    21
    Downloads
    0
    Uploads
    0

    Default Re: Mach3 Coordinate systems; setting X0/Y0; Z-height; re-running jobs; etc.

    Quote Originally Posted by 1875 View Post
    You can set up Mach native units, look in the upper left drop-down menus.
    Please tell me if I am wrong, however: I believe that, since my machine has english (20 thread per inch) leadscrews, I need to have the native units set to inches, and then let Mach3 do the necessary math to convert metric coordinates as necessary for the machine?

    Quote Originally Posted by ger21 View Post
    If you'll be running parts in both inch and metric units, then you should set up two profiles. One with the machine set up in mm's, and one with the machine set up in inches. There are lots of little things that can cause issues when trying to do both with one setup.
    If I have my native units set to inches, and I start Mach3, and then set Mach3 into metric (either with G21 via MDI, or by ticking the "MM's" box on the settings page), and then close Mach3, then Mach3 starts back up again in inch units. The metric/english setting doesn't seem to persist as part of the profile. Am I wrong about this?

    How could I make a "metric profile" for an english machine?

    --dave



  7. #7
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: Mach3 Coordinate systems; setting X0/Y0; Z-height; re-running jobs; etc.

    Please tell me if I am wrong, however: I believe that, since my machine has english (20 thread per inch) leadscrews, I need to have the native units set to inches, and then let Mach3 do the necessary math to convert metric coordinates as necessary for the machine?
    You are wrong. 20 turns per inch = 1.27 turns/mm Mach3 doesn't care what pitch your screws are. You just tell it how many steps to take to move a given unit, regardless if that unit is inches or mm's.

    The metric/english setting doesn't seem to persist as part of the profile. Am I wrong about this?

    Mach3 will always start in it's Native Units.

    Clone your existing profile, and create a separate shortcut for the metric profile. If you don't know how to use the /p switch in the shortcut, see the Mach3 manual.

    Set your native units to metric, and divide your steps/unit by 25.4. You'll need to convert your velocity and acceleration values to metric as well.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

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

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


  8. #8
    Registered
    Join Date
    Mar 2013
    Location
    USA
    Posts
    21
    Downloads
    0
    Uploads
    0

    Default Re: Mach3 Coordinate systems; setting X0/Y0; Z-height; re-running jobs; etc.

    Quote Originally Posted by ger21 View Post
    Set your native units to metric, and divide your steps/unit by 25.4. You'll need to convert your velocity and acceleration values to metric as well.
    Hi Gerry, first of all thanks for the replies.

    The thing I don't like about changing the native units, is that then the correct "number of steps per unit" isn't an integer. With my motors and leadscrews, at 40,000 steps per inch, this works out to 1574.80314..... steps per millimeter. Well okay, so I could use 1575, and the difference between 1574.8 and 1575 is small enough that nobody is ever going to know the difference. Or even be able to measure it; it works out to about a thousandth of an inch difference over eight inches, so probably more accurate than almost any machine being run by Mach3.

    But, here's something I learned just yesterday on another forum: There's actually a trick by which you can get Mach3 to start up in metric, even with imperial native units. Under Config --> General Config", there's the "Initialization String", with just G80 as the default. If you add in G21 after the G80, then the machine switches over to metric as soon as you start it up and reset it. So this works out to pretty much the behavior I had wanted.



  9. #9
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: Mach3 Coordinate systems; setting X0/Y0; Z-height; re-running jobs; etc.

    The thing I don't like about changing the native units, is that then the correct "number of steps per unit" isn't an integer.
    It doesn't have to be, and in 99% of cases, it probably shouldn't be. Screws have a ± pitch accuracy, and unless you have an absolutely perfect screw, then your steps/unit will not be an integer.


    But, here's something I learned just yesterday on another forum: There's actually a trick by which you can get Mach3 to start up in metric, even with imperial native units. Under Config --> General Config", there's the "Initialization String", with just G80 as the default. If you add in G21 after the G80, then the machine switches over to metric as soon as you start it up and reset it. So this works out to pretty much the behavior I had wanted.
    The issue with this, is that sooner or later you'll find that not everything will convert when you switch from inches to mm's, and you'll have issues. The author of mach3 has always recommended using separate profiles for imperial and metric.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

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

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


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

Mach3 Coordinate systems; setting X0/Y0; Z-height; re-running jobs; etc.

Mach3 Coordinate systems; setting X0/Y0; Z-height; re-running jobs; etc.