Will this method work for all M-codes?
I need to run a script after the G-code is done, i.e. M30.
I've been looking for some method like IsMoving to be able to tell if the file execution is still under way, like IsFileRunning(), but haven't been able to find any. If there where I could do run my scrip in the macropump. IsMoving seems dangerous to use since there could be situation where the axis doesn't move but the g-code file isn't finished yet.
Basically i need to make sure that the work piece doesn't get released while the CNC is still working on it, even if the operator flips the hardware switch that does exactly that.