587,708 active members*
3,516 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Mach Software (ArtSoft software) > Mach Wizards, Macros, & Addons > Distinguish between pause caused by stop button and actual stop in mach3 macro
Results 1 to 7 of 7
  1. #1
    Join Date
    May 2024
    Posts
    3

    Distinguish between pause caused by stop button and actual stop in mach3 macro

    Hello!

    As you may know, if you stop mach3 by pushing the red stop button on the screen, if you push the green cycle start button again, it will continue the program right where you stopped it without notice, and moreover, without starting the spindle. And if you forget about that, it can conclude in breaking the tool or something else, right as i did recently.

    So i want to write some safety macro to prevent this kind of situations. In the elder scroll i have read the following wisdoms:

    OEM LED Start 804
    OEM LED Pause Feed Hold 805
    OEM LED Pause 80
    OEM DRO G-code Line Number (current) 816

    These allowed me to distinguish between actual running state, yellow feed hold button and stop, but not allowed me to distinguish between two aforementioned kinds of stop.

    The 816 dro merely indicates what line of code is scrolled to on the screen, but it can be deceptive cos there is no guarantee it is the actual current execution line. And if it is not, it may lead to some unwanted catastrophes.

    Is there any way to distinguish between pause and full stop? Or get the actual line on which the execution is paused?

    Thanks in advance.

  2. #2
    Join Date
    Dec 2008
    Posts
    3134

    Re: Distinguish between pause caused by stop button and actual stop in mach3 macro

    The big red button is the Emergency stop, it should force all axes to halt, force spindle to quickly stop, & cancel any canned cycle. Cycle start should NEVER be used unless the RESET of program has occurred.

    Feedhold is a pause in the running program, (actions depend on the machine ie tool lift/spindle stop etc), pressing cycle start is a resumption of of the paused program (returns to position & state when Feedhold button was pressed & continues)

  3. #3
    Join Date
    May 2024
    Posts
    3

    Re: Distinguish between pause caused by stop button and actual stop in mach3 macro

    > Cycle start should NEVER be used unless the RESET of program has occurred.

    But why this button works in this case, and in such a destructive way? Or maybe i am the only person on the planet who had broken my tools this way?

    > Feedhold is a pause in the running program, (actions depend on the machine ie tool lift/spindle stop etc), pressing cycle start is a resumption of of the paused program (returns to position & state when Feedhold button was pressed & continues)

    This is fine, but mach3 does not indicate whether i pressed one button or another, and whether it is going to resume the program or start from the beginning. I think it is a shame (or deliberate decision to help tool makers sell more tools).

  4. #4
    Join Date
    Nov 2013
    Posts
    4549

    Re: Distinguish between pause caused by stop button and actual stop in mach3 macro

    Hi,

    But why this button works in this case, and in such a destructive way? Or maybe i am the only person on the planet who had broken my tools this way?
    As has been explained, this button is an EMERGENCY STOP.......it is not in anyway concerned with what might happen if you restart the machine incorrectly.

    This is fine, but mach3 does not indicate whether i pressed one button or another, and whether it is going to resume the program or start from the beginning.
    There is a procedure called Run-From-Here (RFH) which allows you to start, or rather re-start a program part way through. If you think you've had problems breaking tools then you are going to
    hate RFH....its caused more crashes than all other procedures combined. Once you understand how the procedure works and FOLLOW IT RELIGOUSLY then you'll be fine, deviate from
    the procedure and you'll wreck yet another tool.

    I think it is a shame (or deliberate decision to help tool makers sell more tools)
    BS!

    Craig

  5. #5
    Join Date
    Nov 2013
    Posts
    4549

    Re: Distinguish between pause caused by stop button and actual stop in mach3 macro

    Hi,
    if a Gcode program is running and you hit <FeedHold> the machine will stop, and depending on how you set up the defaults the spindle will stop. If you hit <CylcleStart> the machine will resume
    from exactly where the <FeedHold> took effect.

    The problem with <FeedHold> is it does not allow you to jog or do other things, the Gcode program is still 'in charge', it is just paused. If you wish to jog to put in another tool then you have to <Stop> the machine.
    This means that the Gcode program has relinquished control of Mach, and now you can command Mach, say to jog or tool change or whatever. Now the issue is that you can no longer hit <Cycle Start> and expect Mach to start
    where your job left off, in fact if you do hit <CycleStart> its likely that it will start from the beginning whether you like it or not.

    Lets imagine that you don't want to start right back at the beginning but start part way through. The problem is that Gcode is modal, that is to say how a certain code acts now depends on instructions which preceded it.
    Given that Mach is starting this job anew, from scratch as it were, it does not 'know' what modes were in operation where you want to re-start the program.

    This is part of the RFH procedure. You scroll through the Gcode to near to the end of your previous session and press <RunFromHere>. Mach will run through the code, but without movement as a 'dummy run' and quite quickly so that it now
    'knows' what modes are applicable.

    The last thing you have to ensure is that the tool is in exactly the same place as when you stopped....but you have jogged around in the meantime. Mach will ask you to make a 'preparatory' move to the correct re-start
    position. BE F********KING careful....this is where all the S****T happens. Mach will drive to that location, and it does not matter whats in between...it'll get munched. The correct procedure is to let Mach drive to the correct X and Y location
    but well above the work....and THEN lower in Z until its at the right location. Now you can start the spindle and start the job using <CycleStart>. It is the preparatory moves that catch you out. You'd swear mach was making a mistake,
    but it is not, its just that you misunderstand what its trying to do and have not made allowances for that.

    Experiment a few times wit scrap and junk tools. You need to get the procedure really 'tight and repeatable' then you'll be fine. You might expect to have half a dozen cockups before you get it right. Good luck.

    Craig

  6. #6
    Join Date
    Jun 2010
    Posts
    4262

    Re: Distinguish between pause caused by stop button and actual stop in mach3 macro

    If I hit Feedhold, then I always follow that with Stop, and then I restart the entire program. Sure, it may cut air for a bit, but that damages nothing.

    If I wish to pause the program somewhere I use M6. This is often used to change the cutter. Once M6 is in effect I can move the controlled point (ie spindle) around, and when I hit CycleStart the machine will first return to where the M6 happened, before continuing. But care!

    Technically: M6 has 2 parts: M6Stop and M6Start (or something similar). M6Stop will save the current XYZ position so M6Start can return to it. This can be very useful for changing the cutter. BUT the state of the spindle is NOT saved, so the first thing after M6 must be M3! Otherwise it's shopping time (again). Similar comments for M7 and M8.

    I did try RFH once - a very long time ago. It made as much sense as Reverse Run. Very strange concepts, but useless imho.

    Cheers
    Roger

  7. #7
    Join Date
    May 2024
    Posts
    3

    Re: Distinguish between pause caused by stop button and actual stop in mach3 macro

    joeavaerage thank you for detailed explanation. I totally agree with you, but not quite.

    So you all are telling me that there is no meaningful use of green button after the red button. And i beg you the question - in this case what made the mach3 developers make the green button silently do its evil job in this case? I have no other answer than making the tool makers some profit.

    There is two kinds of tasks. One is easy for human and hard for machine. And another kind is hard for human and easy for machine. And the task we are talking about is clearly of the second kind.

    If i have to bear in mind 100 things while setting/running a cnc job, there is a good probability that i will forget about something. This is how our brains work. On the other hand, making mach3 show some warning while the green button is pushed after the red button, is a matter of exactly one if statement, which is teached at every beginner programming class on the second lesson. No category theory or machine learning required. No massive memory or processing power consumption is needed also. It is at most a day of work of one programmer, and it could allow the operator to remember only 99 things and therefore slightly decrease the probability of failure. It is the essence of automation which cnc is all about.

    But mach3 developers chose not to do so! Moreover! They took care that no user can do this either by not providing any clue - neither visual, nor programmatic. So millions of mach3 users are doomed to break the tools sometimes (at least until they become religious enough to follow some holy procedure). If you say it is totally an operator fault, i have no other word for it besides the stockholm syndrome.

Similar Threads

  1. How to configure a soft stop button - Not E-stop
    By Jmhx2 in forum UCCNC Control Software
    Replies: 1
    Last Post: 07-21-2019, 11:48 PM
  2. Replies: 3
    Last Post: 03-31-2017, 04:00 AM
  3. DeskCNC G2 Controller Limit, E-Stop, Pause issue
    By KCT in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 01-11-2013, 03:49 AM
  4. Machine doesnt pause for spindle to stop
    By Lomach in forum LinuxCNC (formerly EMC2)
    Replies: 21
    Last Post: 07-30-2012, 09:34 PM

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
  •