Results 1 to 8 of 8

Thread: g53 in macro/script?

  1. #1
    Registered
    Join Date
    Sep 2011
    Location
    USA
    Posts
    6
    Downloads
    0
    Uploads
    0

    g53 in macro/script?

    Running a syil x4 with mach3

    I set up the auto tool function to work with a touch off plate. But I want the auto-tool button to send the tool up and then over to the plate location.

    It is located at -9.798,-.577, -7.502 in machine coordinates. I tired using g53 but got an error that machine coordinates are not allowed in the script. So now I have to remember to find the m6 call out each time and enter g53 x-9.798 y-.577 before the m6 line. It's not really a pain to do since we run short programs, I just don't want to ruin anything as I am not the only one who uses the machine.

    How can I go about doing this?

    Thanks,


  2. #2
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,283
    Downloads
    0
    Uploads
    0
    You can use

    Code "G0 G53 X-9.798 Y-0.577 Z-7.502"

    in your script.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (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
    Sep 2011
    Location
    USA
    Posts
    6
    Downloads
    0
    Uploads
    0
    Wow, thanks.

    So I just needed g0 before the g53 command?


  4. #4
    Registered
    Join Date
    Sep 2011
    Location
    USA
    Posts
    6
    Downloads
    0
    Uploads
    0
    also, since I have your attention, what do I use to make mach3 wait before going to the next line? I want it to finish moving before displaying a msgbox advising to change tool now or that the job is finished.


  • #5
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,283
    Downloads
    0
    Uploads
    0
    I don't know, as I've never seen the error you got, or what you were trying to do. But what I posted will do what you want.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

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


  • #6
    Registered
    Join Date
    Jun 2007
    Location
    ireland
    Posts
    264
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by travisn View Post
    also, since I have your attention, what do I use to make mach3 wait before going to the next line? I want it to finish moving before displaying a msgbox advising to change tool now or that the job is finished.
    A dwell could be used, G4PX where X = num of seconds


  • #7
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,283
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by travisn View Post
    also, since I have your attention, what do I use to make mach3 wait before going to the next line? I want it to finish moving before displaying a msgbox advising to change tool now or that the job is finished.
    Anytime you have movement occurring in a script, it should be followed by:

    While IsMoving
    Wend

    To make sure the move is completed before further code is run.

    If you want to pause, use:

    Sleep(1000)

    for 1 second. (# is milliseconds)

    It's good practice that anytime DRO's need to be updated, that a minimum of 1/10 second delay ( Sleep(100) )be used to allow the DRO's to update before moving on. Failure to do so may cause problems.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

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


  • #8
    Registered
    Join Date
    Sep 2011
    Location
    USA
    Posts
    6
    Downloads
    0
    Uploads
    0
    got it, thanks. I'll update my script tomorrow.

    next task is making a pnp....


  • Similar Threads

    1. Replies: 2
      Last Post: 03-27-2009, 04:15 PM
    2. Newbie- VB6,VB.net,VB script,What one???
      By hydrospin01 in forum Visual Basic
      Replies: 11
      Last Post: 05-24-2008, 09:09 PM
    3. Convert Fanuc Macro to Fadal Macro
      By bfoster59 in forum Fadal
      Replies: 1
      Last Post: 11-09-2007, 12:41 AM
    4. Lookahead Script
      By Rikard L in forum General CNC (Mill and Lathe) Control Software (NC)
      Replies: 0
      Last Post: 09-10-2007, 03:06 PM
    5. Macro/script-can this be done?
      By Splint in forum Rhino 3D
      Replies: 3
      Last Post: 02-12-2006, 10:50 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.