Hello Guest it is June 27, 2025, 09:24:02 AM

Author Topic: Distinguish between pause caused by stop button and actual stop in mach3 macro  (Read 6234 times)

0 Members and 1 Guest are viewing this topic.

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.

Offline ZASto

*
  •  428 428
Well, red stop button has the same function as E-stop switch, if you have one.
Machine stops immediatelly and possibly with loss of position. Buffer is flushed and all caned cycles are erset, and some more.

If you want to "pause" the motion you shoul use Feed Hold and after pressing Cucle Start program will continue from where it was paused. Motion will not stop imediatelly, lookahead buffer will first be emptied, so a couple of lines of code could be executed.

So the process of "pausing" the program is Feed Hold followed by Stop and to resume Cycle Start
Make no mistake between my personality and my attitude.
My personality is who I am.
My attitude depends on who you are.
Hello again!

I found that the actual executed line of code dro is 240, but it is not documented. So now i have a safety macro on "cycle start" button.
Hello all,
Experienced almost the same situation on a old colleague program in one machine with mach3..
He had a start cycle, pause and stop icon button.
Pushing stop button, the cycle stop (spindler, coolant stops) but remains in the current Gcode line...if we push start button, the program resume but there is no Gcode to start spindler and coolant.. This one was easy to solve with V-script button and then code OEMbutton (1003) followed by OEMbutton (1002)

For pause button is defined by System Function Pause... it Pauses the program except while is running G73 code (cycle)..
How i can pause it using Feed Hold ? Usually the Feed Hold button on other standard working screens is System Function Pause.