Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: moorea21 on June 08, 2017, 12:41:07 PM

Title: Log whether file was terminated by user or not
Post by: moorea21 on June 08, 2017, 12:41:07 PM
I'm writing a series of macros that will 'log' the execution of files; start/end time, line number at termination, method of termination etc.

There are a number of ways in which a file could be terminated; the ones I need to loook out for are
a) when the user terminates the run with Estop, Stop, or Reset buttons (all are acceptable on my machine,) and
b) when a particular switch is tripped to an input on the BOB

When either of these things happen, I want to be able to note which method of termination was used, and then call the macro that records this.
I'm unsure whether/how to look out for these conditions; macropump code looking out for all possible termination conditions would be slow and cpu hungry; this could be done with brains and macropump, I suppose, but I don't know how yet.

Is there a way of basically checking the input and DRO's to find which was done, ONLY if and when the machine stops running?