Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: jorgenbli on July 18, 2018, 04:11:20 PM

Title: How to prevent machine movement before machine is referenced
Post by: jorgenbli on July 18, 2018, 04:11:20 PM
Is there an easy way to make all buttons except "Reference All Axes" disabled before the machine has been homed?
I use the Wx4 screenset. As of now if I have put a check in the M6 script to avoid a tool change if the machine is not referenced. However, it is still possible to jog the machine out of its limits and even run any g-code which could cause the machine to crash. Any ideas?
Title: Re: How to prevent machine movement before machine is referenced
Post by: lesspaul on July 20, 2018, 08:57:57 AM
Easy? That would be determined by your level of Screen Editor and Lua savy.

To do exactly what you ask -- disable all buttons except Ref All Home would require quite a bit of screen editor tweaking.
A simpler solution would be to modify the Enable button to check to see if axes are already referenced, and if not, ask user if they want to reference all axis.
If yes, enable machine and reference axes
If no, do not enable machine.
Title: Re: How to prevent machine movement before machine is referenced
Post by: Cbyrdtopper on July 20, 2018, 11:00:13 AM
Lesspaul,
I like your solution, simple and to the point.
It is similar to what my Dad did when we were using Mach3 on some equipment. 
He would disable the Cycle Start Button until the machine was homed; it would check for machine reference and send up a message box if it was not homed.
Title: Re: How to prevent machine movement before machine is referenced
Post by: joeaverage on July 22, 2018, 08:38:58 PM
Hi,
I didn't get that carried away....what I did though was to disable <CycleStart> until the machine has
been referenced.
I made a second <CycleStart> button that would override the main one if necessary but it has a MessageBox
which has to be dissmissed before it will work.

Craig