Can I change X,Y,Z zero mid program? - Page 2


Page 2 of 2 FirstFirst 12
Results 13 to 20 of 20

Thread: Can I change X,Y,Z zero mid program?

  1. #13
    Member
    Join Date
    Sep 2005
    Location
    United States
    Posts
    1636
    Downloads
    0
    Uploads
    0

    Default Re: Can I change X,Y,Z zero mid program?

    Thats why I went to Mach4, too many little unexplained glitches.

    Retired Master Electrician, HVAC/R Commercial. FLA Saturn 2 4x4 CNC Router Mach4 Kimber 1911 45ACP


  2. #14
    Member
    Join Date
    Jan 2005
    Location
    USA
    Posts
    10305
    Downloads
    0
    Uploads
    0

    Default Re: Can I change X,Y,Z zero mid program?

    Quote Originally Posted by luremaker View Post
    Well had a go today with a small program.

    Set G54 to datum of first part and G55 to datum of the second and it ran OK.

    BUT I then set G54 and G55 to 0,0,0 loaded a workpiece and set the datum and ran my program and at about line 19,000 the machine decides to go to machine 0,0,0 then back to the workpiece and carried on cutting. There were no lines in the gcode calling for this move so it beats me.
    If you just cut and pasted the first program then called it G55 then yes it will have a start position at the first part in it, and will go back to the first part, you have to be careful when you cut and paste in programs as this will happen nothing to do with the control it's doing what you are telling it to do

    Mactec54


  3. #15
    Member
    Join Date
    Jun 2010
    Location
    Australia
    Posts
    3879
    Downloads
    4
    Uploads
    0

    Default Re: Can I change X,Y,Z zero mid program?

    Mactec is right. Doing a cut&paste without checking the guts of the file is going to fail 99.99% of the time.

    How many CAM programs can handle anything beyond G0-G3 and simple drilling? Rather few I think.

    Cheers
    Roger



  4. #16
    Member
    Join Date
    Dec 2003
    Location
    East Anglia,England
    Posts
    388
    Downloads
    0
    Uploads
    0

    Default Re: Can I change X,Y,Z zero mid program?

    Quote Originally Posted by RCaffin View Post
    Mactec is right. Doing a cut&paste without checking the guts of the file is going to fail 99.99% of the time.

    How many CAM programs can handle anything beyond G0-G3 and simple drilling? Rather few I think.

    Cheers
    Roger

    Here's one that handles a few LinuxCNC "G-Code" Quick Reference . Not heavily promoted and not from Artsoft,so maybe out of place here.Its also free so you can try it for absolutely nothing.



  5. #17
    Member luremaker's Avatar
    Join Date
    Dec 2018
    Location
    UK
    Posts
    8
    Downloads
    0
    Uploads
    0

    Default Re: Can I change X,Y,Z zero mid program?

    Thanks for all the help folks it is really appreciated.

    Am I correct that G54 is the default datum in mach3 and if this is the datum for the first part, would I be correct that if I add a G54 line to my code after the last cut then when load anther program it should start with the correct datum for the first part?

    I do modify my code for several reasons and to ensure the correct datum is used I add the following lines at the start of each program after the tool change

    G00 X0.0000Y0.0000
    (Check X and Y datum, press Cycle Start to continue)
    M00
    G01 Z10.000 F500
    (Z is at +10mm , press Cycle Start to continue)

    Also mactec54 why "never use a Z axes move when Doing a X Y move, a Z move should always be on a line before a X Y Axes move for obvious reasons"? Most of my work is 3D surfaces so a lot of the code has x,y,z moves on the same line. If anything I would expect it to be safer to move in X and Y then plunge in Z unless cutting flat bottomed pockets.



  6. #18
    Member
    Join Date
    Jan 2005
    Location
    USA
    Posts
    10305
    Downloads
    0
    Uploads
    0

    Default Re: Can I change X,Y,Z zero mid program?

    Quote Originally Posted by luremaker View Post
    Thanks for all the help folks it is really appreciated.

    Am I correct that G54 is the default datum in mach3 and if this is the datum for the first part, would I be correct that if I add a G54 line to my code after the last cut then when load anther program it should start with the correct datum for the first part?

    I do modify my code for several reasons and to ensure the correct datum is used I add the following lines at the start of each program after the tool change

    G00 X0.0000Y0.0000
    (Check X and Y datum, press Cycle Start to continue)
    M00
    G01 Z10.000 F500
    (Z is at +10mm , press Cycle Start to continue)

    Also mactec54 why "never use a Z axes move when Doing a X Y move, a Z move should always be on a line before a X Y Axes move for obvious reasons"? Most of my work is 3D surfaces so a lot of the code has x,y,z moves on the same line. If anything I would expect it to be safer to move in X and Y then plunge in Z unless cutting flat bottomed pockets.
    3D surfaces have nothing to do with X Y Z rapid moves to the start of a part, or a new position move, the Z axes is always moved first then a X Y move the reason you move the Z first is so you don't crash into your work piece as X and Y will move first then Z axes which In most cases is to late the crash has happened

    G54 is the default in all machines controls until you change it in your program

    Only your first part would be at G54 X0.0 Y0.0 you next part work offset would be the distance to the start of the next part G55 X----Y0.0 one or both of the axes X and Y will have a different start point than the first part the Z axes does not change unless the work height changes

    Mactec54


  7. #19
    Member luremaker's Avatar
    Join Date
    Dec 2018
    Location
    UK
    Posts
    8
    Downloads
    0
    Uploads
    0

    Default Re: Can I change X,Y,Z zero mid program?

    Well all is going well using G55 and as RCaffin says the run time display sometimes forgets that G55 has been used and displays the cuts s though G54 was used.
    I am now machining up to 4 parts all with different Z datums. I load all the parts and probe their X,Y datums (G54,G5 etc) with a 4mm dowel in the collet, the correct tool is loaded and usng a macro Z is probed on all parts and the program run.
    In order to save time I would like to ust load the next tool and have Mach3 automatically probe Z on all the parts. I have found out (or led to believe) Mach3 cant call macros so does anyone know of a solution?



  8. #20
    Member
    Join Date
    Jun 2010
    Location
    Australia
    Posts
    3879
    Downloads
    4
    Uploads
    0

    Default Re: Can I change X,Y,Z zero mid program?

    I have found out (or led to believe) Mach3 cant call macros
    That is totally and utterly FALSE.

    In fact, the G73 instruction is actually executed by a called macro.
    Probing is always done with a rather large Macro call: there are many versions.

    In essence, Mach3 using Crystal Basic, which is someone's implementation of Basic as an linkable library.
    If you can do it in Basic, you can do it in Mach3.
    Mach4 uses LUA instead - I don't know why Artsoft changed. But basically (sorry!) it's the same thing.

    For a start, you want the Mach3 V3 Programmers Reference manual, for Mach3-specific calls. Two flavours: V3 and V3.x
    Next, you want the VBScript_Commands.pdf file by Crystal Basic for some deeper info.
    Mach_VB_Parameteres.doc is an essential guide to accessing Mach3 variables in Basic.
    Cypress Basic.pdf is obviously going to be useful.
    All these are to be found on the Artsoft web site somewhere. They do have a lot of doco support for you.
    There is a doc called Coordinate Spaces: a Guide, at Coordinate Spaces - a Guide (I wrote it).
    You can also search the CNCZone web site for other docos. There is a lot around the web.

    If you are coming from a Fanuc world, please note that Mach3 allows you to call g-code subroutines anywhere: I believe they are the same thing as Fanuc's Macros.

    For all that some people pooh-pooh Mach3 in favour of Mach4, it is still an extremely powerful tool for running a CNC. It has a few bugs, sadly, but many people make a living from Mach3.

    Cheers



Page 2 of 2 FirstFirst 12

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

Can I change X,Y,Z zero mid program?

Can I change X,Y,Z zero mid program?

Can I change X,Y,Z zero mid program?