Page 1 of 2 12 LastLast
  1. #1
    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

  2. #2
    Hi Kevin
    I'm no expert with g code, but could you not just set up a "work offset" in mach3 for your required position, ref all, then goto zero position in the required offset.

  3. #3
    I have an 'Auto Tool Zero' macro which sets the Z position using a touch plate to a height above the plate. This is 10mm above the gage block height specified on the offsets screen. The touch plate is just a brass block bonded to some acrylic sheet and machined flat. I then measured the thickness and this is the gage block height. The brass part is connected to the touch probe input and the tool is earthed (mine earths through the machine). So you put the block under the tool, click auto tool zero and it sets the tool height. The 'Ref All Home' has a macro which moves X and Y to the home switches.

    If I can find out how to attach the files I will do. Otherwise you can PM me. I only live up the road from you (In Nottinghamshire)

  4. #4
    Here are the two files (converted to txt)
    Attached Files Attached Files

  5. The Following User Says Thank You to cropwell For This Useful Post:


  6. #5
    Kevin,
    What are you calling Ref all home button ?
    Can't see this on the standard screen
    John S -

  7. #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.

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


  9. #7
    On my machine the Z axis homes and zeroes at the top of travel. Zeroing to the bottom means the home switch compensates for tool length, otherwise CRUNCH. With the tool height set you can go to a known zero position (relative to machine bed or workpiece).

    I did not write the button scripts, but may have modified them slightly. There is help on this on the Artsoft website.

    I would advise that before homing the X and Y, that you get the Z axis up and out of the way.

  10. The Following User Says Thank You to cropwell For This Useful Post:


  11. #8
    Hello,

    Can somehow add a key from keyboard to "reference all home" in MACH 3?

    Thanks in advance

  12. #9
    I find most useful these to be 2 separate commands. The way i work i mean.

    XY0 and Z0 to be on separate buttons.
    project 1 , 2, Dust Shoe ...

  13. #10
    Can you tell me how is done?

    Thanks

Page 1 of 2 12 LastLast

Similar Threads

  1. Home Switches & Slave Axis in Mach 3
    By Tenson in forum Artsoft Mach
    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
    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
    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
  •