Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: vkonradi on November 20, 2019, 12:12:51 PM
-
Configuration: USB RnRMotionController and stepper motors, running purchased and licensed Mach3 on a WinXP Thinkpad.
Laptop has all the power management and screen saver turned off, runs continuously. Wireless networking is disabled and Ethernet is unplugged. Not running any other application.
Intermittently the whole NC motion file will run successfully, but stop before executing the last 2 lines M05, M30. So the spindle is still running. Mach3 is hung at this point. Need to close Mach3 to recover. Sometimes Mach3 application can be closed. Other times it is showing an unrecoverable error dialog box, has to be force-closed.
I have turned off the NC path display. This seems to have fixed a hang in updates to the NC program display, but it did not cure the basic hanging issue.
Why is Mach3 successfully running a huge file of motions, then wedging at the spindle off command? Possible issue with RnRMotionController? Thanks for your help!
-
Check your G-Code file with notepad.
If there is no % at the last line, just add it.
-
Tag % onto the end of the last line, or as a new line following last line? Thanks.
-
% as single character on the last line.
Every G-Code line ends with CRLF character combination (nonprintable Carriage Return / Line Feed). Often missing at the last line of G-Code.
For that reason I've edited all postprocessors that I use to put % as a single character on the last line.
Eg.
.
.
.
M30
%
-
Viewed in notepad++ all lines including last end with CR,LF. But I'll try adding a lone % line anyway.
-
Added the leading and trailing % lines. Each is %CRLF specifically. Ran the operation sequence 3 times and it failed on the 3rd run. Same symptom, all moves executed but the spindle-off command not executed and hung. So yeah it is one of those nasty intermittent things. Unfortunately did not respond to the % lines.
I think I'll chop down the sequence, investigate if there is any dependence on length of the move sequence. If I can pare it down to a manageable size that executes quickly (and still fails) I can iterate on experiments without waiting hours of machine time. Maybe experiment with adding delays before the spindle-off command.
-
Last % line just ensures that the preceding is terminated with CRLF.
% per se is just a character that is ignored.
Try reinstalling Mach3. Just days ago I wanted to do some fine tuning of motors and could not enter Motor Tuning. Reinstall corrected, to me unknown, corrupted file(s).