Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Laz on May 01, 2020, 04:42:48 PM

Title: Mach4 stops responding
Post by: Laz on May 01, 2020, 04:42:48 PM

Finally got most issues solved by installing latest mach4 version and latest ess build
All seems to work fine but when i run my g code and gets to the end or press stop Mach4 freezes , all buttons are grayed out.
Can't jog , i can turn the spindle on and off but nothing else,
Tried disable and enable again but nothing. Tried reset button nothing. Can't restart the program eater.
The only thing i can do is quit mach and start it again
Can anybody point me in the right direction to sort this out

Thanks  Laz

Ps getting Ess solved all my homing issues thanks guys. 
Title: Re: Mach4 stops responding
Post by: TOTALLYRC on May 01, 2020, 09:52:02 PM
Are you in Demo mode???
Title: Re: Mach4 stops responding
Post by: Laz on May 02, 2020, 12:25:16 PM
Unfortunately it's not that simple
It's a fully licensed version
Title: Re: Mach4 stops responding
Post by: joeaverage on May 02, 2020, 05:21:17 PM
it sounds like the Gcode interpreter is gettig hung up.

Does it happen on every Gcode program?

May I suggest running a part program that you know triggers the fault but edit the program such that the last
two lines are:

Note that m30 is the last instruction but it must be followed but a LF and/or CR, and it is common practice
to put  a '%' to ensure the m30 is fooled by a LF at a minimum.

Title: Re: Mach4 stops responding
Post by: Laz on May 02, 2020, 05:51:12 PM
This is the last few line of my G code


Created by Aspire with the Mach 2/3 ATC  post processor
I will try the Fanuc post processor since i hear it is compatible with Mach 4 ( Is it true?)
and will try Fusion360 as well

The G code looks ok to me  is it?

Title: Re: Mach4 stops responding
Post by: joeaverage on May 02, 2020, 06:14:23 PM
try making the last M30 into lowercase m30 and try again.

Title: Re: Mach4 stops responding
Post by: Laz on May 02, 2020, 08:00:32 PM
Thanks Craig.

I tried a different G Code file and used the Fanuc post processor . It ran perfect no hangups
You were right the G code must have hung up .
But i noticed something else the m6 tool change script has a message box to tell you to change the tool and that message box sometimes appears under the main window so you can't see it and it makes it appear that mach is not responding
Cant click the ok button if you cant see it . If i minimize the main window it becomes visible , click ok and all is fine again.
Is there a way to make sure it is always on top
Title: Re: Mach4 stops responding
Post by: joeaverage on May 02, 2020, 08:30:12 PM
couple of points.

First:Mach4's Gcode interpreter converts all Gcode alphanumerics to lowercase, strips out leading zeros and strips out whitespace.

For example:
G0 X0.09 Y  95.6 Z 0.004 F150    becomes:

M 30    becomes:

In most cases the Gcode you write or is produced by your post will be correctlty interpreted, that is to say leading
zeros, whitespace and capitals don't affect the execution of the code.....but every once and a while they do. Faults like
that are devilishly hard to pick and diagnose. For this reason I would recommend you write all Gcode in lowercase
and without leading zeros. I often leave whitspace in to make Gcode more human readable, but otherwise try to present
Gcode to the inerpreter EXACTLY as the interpreter expects and thereby circumvent any translation faults.

Second: MessageBox is a wxWidgets function and is used typically to display results on your PC. It is not as such
part of Mach4 at all, but rather a whole suite of functionality imported to it. In your situation you have two choices:
1) Go to your m6() macro and remove the wxMessageBox call....or
2) Research the properties of wxMessageBox (wxWidgets is open source) and apply a 'pin to the top' property to it.

The later option is probably best but wxWidgets is for Geeks, written by Geeks and in pure Geekese. Not an easy proposition
for CNCers!