584,800 active members*
4,468 visitors online*
Register for free
Login
Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2011
    Posts
    40

    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
    Join Date
    Mar 2003
    Posts
    35538
    You can use

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

    in your script.
    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)

  3. #3
    Join Date
    Sep 2011
    Posts
    40
    Wow, thanks.

    So I just needed g0 before the g53 command?

  4. #4
    Join Date
    Sep 2011
    Posts
    40
    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. #5
    Join Date
    Mar 2003
    Posts
    35538
    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

    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)

  6. #6
    Join Date
    Jun 2007
    Posts
    394
    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. #7
    Join Date
    Mar 2003
    Posts
    35538
    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

    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)

  8. #8
    Join Date
    Sep 2011
    Posts
    40
    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, 09:15 PM
  2. VB6,VB.net,VB script,What one???
    By hydrospin01 in forum Visual Basic
    Replies: 11
    Last Post: 05-25-2008, 02:09 AM
  3. Convert Fanuc Macro to Fadal Macro
    By bfoster59 in forum Fadal
    Replies: 1
    Last Post: 11-09-2007, 06:41 AM
  4. Lookahead Script
    By Rikard L in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 09-10-2007, 08:06 PM
  5. Macro/script-can this be done?
    By Splint in forum Rhino 3D
    Replies: 3
    Last Post: 02-13-2006, 04:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •