. .

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Quote Originally Posted by Kevin1970 View Post
    Hello all
    I am after a macro for the Ref All Home button on Mach3.
    When i press the button, i want all the three axis to go the home positions (X,0 Y,0 and Z,25)
    Can anyone help me with this.
    Thanks
    Kevin
    You don't need macro this can be done very easy direct in Mach. Here's how.

    Goto to operator menu across top and choose "Edit Button Script" Some of the buttons on screen will flash. These are the buttons that can be edited direct in Mach.
    The Ref-All-Home should be flashing so click on it and VB script editor will open. You will see something displayed like

    DoButton( 24 )
    DoButton( 23 )
    DoButton( 22 )
    DoButton( 25 )

    DoOEMButton(133)
    DoOEMButton(134)
    DoOEMButton(135)

    Just add these lines after DoButton( 24 ) and before DoButton( 23 ) on separate lines like shown.
    Also note I put Z-25 (Minus) you may want to change this depending if your Z doesn't travel in the negative which most folks do.

    Code "G53 G0 z-25"
    While IsMoving()
    Wend

    Remember to save the script.!! . . . .That's it Done.!!

    This setup presumes you have Home switches the Z will first move to switch and set machine Zero then back off to -25mm using the G53 machine coordinate command.
    You can use the same code for the other Axis and change the values to suit. These are the button numbers for each Axis
    DoButton( 24 ) = Z
    DoButton( 23 ) = Y
    DoButton( 22 ) = X
    DoButton( 25 ) = A

    You can also change the homing order by moving the line position of it's button command.
    IE Z, A, X, Y would be.

    DoButton( 24 )
    DoButton( 25 )
    DoButton( 22 )
    DoButton( 23 )

    Hope this helps.
    Last edited by JAZZCNC; 28-05-2013 at 11:39 PM.

  2. The Following User Says Thank You to JAZZCNC For This Useful Post:


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Home Switches & Slave Axis in Mach 3
    By Tenson in forum Artsoft Mach (3 & 4)
    Replies: 14
    Last Post: 03-03-2014, 11:43 PM
  2. Mach3 Using a physical button to repeat current gcode
    By RLKS Rob in forum Artsoft Mach (3 & 4)
    Replies: 2
    Last Post: 12-08-2012, 01:30 PM
  3. wiring e-stop button
    By deannos in forum General Electronics
    Replies: 10
    Last Post: 14-01-2012, 11:03 AM
  4. Donate Button
    By Ricardoco in forum General Discussion
    Replies: 8
    Last Post: 08-09-2011, 10:32 PM
  5. Machine co-ordinates button in Mach 3
    By alan2525 in forum Artsoft Mach (3 & 4)
    Replies: 1
    Last Post: 14-04-2010, 10:57 PM

Bookmarks

Posting Permissions

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