Zeroing machine coordinates on 1 axis?


Results 1 to 14 of 14

Thread: Zeroing machine coordinates on 1 axis?

  1. #1
    Member QuinnSjoblom's Avatar
    Join Date
    Nov 2017
    Location
    bigfork
    Posts
    591
    Downloads
    0
    Uploads
    0

    Default Zeroing machine coordinates on 1 axis?

    Im doing some work on my 4th axis that requires many turns, basically like a lathe would but with an endmill. Here's the issue, after running code like this, my A axis has made many rotations, sometimes 30 or more. Afterwards I want to get my A axis back to machine zero and this takes forever. My machine doesn't use home switches, it just has a stored location that machine moves to for home. If I send the machine home, it moves very slowly since the A axis has to unturn all those rotations. The other thing I can do is move the machine to x,y,z home position and then ref all home to zero everything including A without having to unturn all those rotations.
    Is there a better way to handle this? Like simply enter a code to zero A axis machine coordinates where it sits? If I can't do that, is there anything else I can do to make this easier? Typically I'm hand writing this type of code and use multiples of 360, so having it first move to a consistent angle isn't a concern since it's already there, just need it to zero in place

    Similar Threads:


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

    Default Re: Zeroing machine coordinates on 1 axis?

    Ref A

    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
    Member QuinnSjoblom's Avatar
    Join Date
    Nov 2017
    Location
    bigfork
    Posts
    591
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ger21 View Post
    Ref A
    I can put in a line of code "ref A"? Or there's a button somewhere? If it's a button, I haven't seen it, only ref all



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

    Default Re: Zeroing machine coordinates on 1 axis?

    There's a button on the Diagnostics page.

    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 QuinnSjoblom's Avatar
    Join Date
    Nov 2017
    Location
    bigfork
    Posts
    591
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ger21 View Post
    There's a button on the Diagnostics page.
    Ah, perfect. Thanks!

    If I wanted this to happen automatically in a program, how would I go about that? Could i do it with a simple macro?



  6. #6
    Member QuinnSjoblom's Avatar
    Join Date
    Nov 2017
    Location
    bigfork
    Posts
    591
    Downloads
    0
    Uploads
    0

    Default Re: Zeroing machine coordinates on 1 axis?

    I found the oem code, 1025. How do I activate this code in a macro? Still very new to scripting



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

    Default Re: Zeroing machine coordinates on 1 axis?

    DoOemButton(1025)

    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
    Member QuinnSjoblom's Avatar
    Join Date
    Nov 2017
    Location
    bigfork
    Posts
    591
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ger21 View Post
    DoOemButton(1025)
    Excellent! Thank you



  9. #9
    Member QuinnSjoblom's Avatar
    Join Date
    Nov 2017
    Location
    bigfork
    Posts
    591
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ger21 View Post
    DoOemButton(1025)
    Ok, wrote the macro, named it m100 (tried as m100 and m100.m1s). When running it in vb editor, it works as expected. When using it in gcode or by itself in mdi, does nothing.

    Ok, renamed it m3, works now. How do i know what m codes are useable? Originally picked m100 because it wasn't in the m code list and was easy to remember. Any specific reason why it didn't like m100?

    Last edited by QuinnSjoblom; 03-10-2019 at 09:56 PM.


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

    Default Re: Zeroing machine coordinates on 1 axis?

    Try values over 300. I don't recall which are reserved. Over 1200 might be safer.
    If you use M3, then your spindle probably won't start any more.

    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)


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

    Default Re: Zeroing machine coordinates on 1 axis?

    Not sure what kind of results you'll get running it from g code, but add this after it.

    While IsMoving()
    Wend

    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)


  12. #12
    Member QuinnSjoblom's Avatar
    Join Date
    Nov 2017
    Location
    bigfork
    Posts
    591
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ger21 View Post
    Not sure what kind of results you'll get running it from g code, but add this after it.

    While IsMoving()
    Wend
    Crap, not sure why I didn't remember m3 was spindle on. Indeed the spindle will not start. How do I get it back? What does the m3 macro look like? Odd thing is, I saw the m3 on list of my macros, I opened it and it was blank, so figured it was for nothing so used it for the ref A. What should be in there?

    Ok, figured it out. Looked at m4, same but cw instead of ccw

    Saved the ref A as m1200. Seems to work fine without the while wend and I don't think I overwrote anything this time. I think I should probably start saving xml before messing around in the future



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

    Default Re: Zeroing machine coordinates on 1 axis?

    I believe it's DoSpin(CW)

    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)


  14. #14
    Member QuinnSjoblom's Avatar
    Join Date
    Nov 2017
    Location
    bigfork
    Posts
    591
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ger21 View Post
    I believe it's DoSpin(CW)
    Yep, it is. Figured it out by looking at the m4



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

Zeroing machine coordinates on 1 axis?

Zeroing machine coordinates on 1 axis?