586,080 active members*
3,704 visitors online*
Register for free
Login
Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2019
    Posts
    48

    G28.1 vs. REF ALL HOME button

    I'm new to g-code, so apologies in advance if this is a dumb question:

    I'm trying to improve my machine warmup program. Currently it just ramps up & down the spindle a few times. I'd like to give the lube system a pump & run the axises across their extents a few times as a part of the warmup routine. My machine (AlphaCNC AMN-6040-M) has home sensors, and it works just how I want to when I hit the REF ALL HOME button in Mach-3. I'd like to automate the same thing in g-code. When I execute G28.1 X0 Y0 Z0 a few strange unexpected & potentially bad things happen:

    1. The machine appears to G00 move to the relative (work) home 0 0 0 position. Then moves to absolute-0 0 0, touching the limit switches like I want. But then it G00's back to relative-home & absolute-home, over and over stuck in a loop. I watched it go thru this cycle four times before I aborted it. The g-code execution never moves past that G28.1 line while doing this.

    2. After this, if I unload the g-code file, edit it & re-open it, Mach-3 throws up a dialog box that it's calculating the move (don't recall exact wording) and never finishes. I need to click the cancel button to get it to close. At this point I usually have to exit & restart Mach-3 to get things working normally again.

    Am I doing something wrong?

    I'd like to index the Z-axis up to it's absolute-0 / limit switch (to clear anything on the table) then absolute-x0 y0. My machine is a 6040 set in metric, so I'd like to G00 to absolute x600 y600 (or close to 600) then z300-ish (enough to clear any tool installed). Do this a few times while ramping up spindle speed to max.

    Can anyone suggest how to accomplish this? I'm skimming posts on startup routines but haven't seen what I'm looking for. Am I missing something good?

    FYI the PC running Mach-3 is connected to a WiXHC MKX-V controller via USB. Motors are servos not steppers. Setup is mostly as-configured from the factory.

  2. #2
    Join Date
    Aug 2009
    Posts
    1573

    Re: G28.1 vs. REF ALL HOME button

    ...use G28

    looks like linux uses the same 5161-5169 for storage. these links may help ya
    G Codes

    https://machmotion.com/documentation...-Reference.pdf

    DJ

  3. #3
    Join Date
    Mar 2003
    Posts
    35538

    Re: G28.1 vs. REF ALL HOME button

    FYI the PC running Mach-3 is connected to a WiXHC MKX-V controller via USB.
    Sounds like this controller may not be handling the G28.1 correctly.
    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)

  4. #4
    Join Date
    Jan 2018
    Posts
    1516

    Re: G28.1 vs. REF ALL HOME button

    I would write a simple Gcode for a maintenence run at a gentle feedrate then a home at the end.
    Something like:
    Move x left, y back.
    Move x right, y forward.
    Move z down, move z up.
    Maybe a couple of times doing this.
    Then end with:
    M9
    G28
    M30

    The G28 will then send axis to machine reference ready for use.

  5. #5
    Join Date
    Dec 2019
    Posts
    48

    Re: G28.1 vs. REF ALL HOME button

    Thanks for the feedback guys.

    Just wondering, does anyone know what Mach-3 internally does on REF ALL HOME? Since that works correctly, if I understood what it's doing maybe I could figure out how to emulate it? Does it monitor the 'input pins' (whatever that means thru the USB interface) directly or issue a g-code command to this cheap chinese controller I'm running? Is there any documentation on the USB interface available or is it some proprietary mach-3 plugin -> USB -> controller protocol?

  6. #6
    Join Date
    Mar 2003
    Posts
    35538

    Re: G28.1 vs. REF ALL HOME button

    When you use a motion controller, I believe that the controller handles the homing, and passes the info to Mach3 when finished.

    You'd need the source code for the plugin for your device to know exactly what it's doing.
    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)

  7. #7
    Join Date
    Aug 2020
    Posts
    6

    Re: G28.1 vs. REF ALL HOME button

    I have same problem.
    I can not solve this.
    I think the mkx board dont have any support.

  8. #8
    Join Date
    Aug 2020
    Posts
    6

    Re: G28.1 vs. REF ALL HOME button

    finaly i use mcode to solve mkx problem. after use g28.1 ... the gcode go to first line. you must use mcode to set line and start again.


    code "g28.1 A0"
    while (ismoving())
    sleep 1000
    wend
    setdro(16, xx) ' xx is line number
    dooembutton(156)' set next line
    dobutton(0)'start

Similar Threads

  1. Ref All Home Button Not Working Right
    By BDGray in forum Mach Mill
    Replies: 4
    Last Post: 02-22-2019, 05:38 AM
  2. Can not go to home after pressing RESET button? ????
    By Apples in forum Mach Software (ArtSoft software)
    Replies: 4
    Last Post: 03-12-2016, 03:00 AM
  3. cnc router home button forcing x axis limit
    By maleklaribi in forum Tree
    Replies: 0
    Last Post: 06-06-2015, 08:58 PM
  4. Replies: 5
    Last Post: 09-26-2013, 08:49 AM
  5. Home button doesn't Zero DRO's
    By Fozzie55 in forum Machines running Mach Software
    Replies: 5
    Last Post: 02-15-2011, 11:51 AM

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
  •