If you’ve noticed UGS pausing or giving you error messages when you run a job, there have been a few reported software CAM packages out there like Carbide Create that seem to like sticking gcode (such as an M6 tool change or M0) into files.
We recommend using UGS since it’s such a beginner friendly yet powerful interface to your LongMill, however it’s lack of support for M6 commands can get annoying. Some easy fixes to this problem can be:
- Open the g-code file in a text editor like Notepad, CTRL + F to search, then find the line where the ‘M6’ command is and delete that whole line. Once deleted, you can save the file and open the revised file back up in UGS.
- If you click ‘OK’ on the error window, you should be able to hit the PLAY button again and the program should start to run as you’d expect
- Other g-code sender can better handle these commands, so it’s possible to switch over: ex. bCNC, CNCjs, or other LongMill-compatible interfaces, listed here: https://sienci.com/dmx-longmill/machine-interface/).
If you want to stick with UGS and use a more permanent fix, this is a solution we’ve found:
In UGS if you go to Tools → Options → UGS → Controller Options then click the ‘Add’ button, a new row will appear in the bottom part of the window. Under the “Regular Expression Pattern Remover” column, you’ll be able to double-click the empty cell to enter in the g-code command that you’d like UGS to ignore, in this case it would be “M6 T101”.
Once done, be sure to hit “Apply” before you close out of the window. Note that the expressions will only take effect on the NEXT file you open, so if you’ve already got a file open you’ll need to reopen it to see the changes take effect.
Ultimately, you can add as many of these expressions as you wish. Since these commands can take many forms depending on the CAM package used, we’ve listed some of the best ‘catch-all’ expressions we’d recommend you use below:
If these expressions are still not addressing your issues, let us know so we find how to cover your problem as well! Special thanks to @Kevin for pointing out the regex support of these expressions