Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: stevehuck on September 05, 2023, 05:04:23 PM
-
Is it possible to set the tool number in Gcode? I have been searching all the docs and it seems like the answer is no.
I run my program the first time and tool number is one. Stops for the tool change (T2 M6) and tool number changes to 2. Awesome
Run the same program the second time. Tool number is still 2. Ignores the tool change because tool number matches the tool needed.
Added an unwanted tool change (T1 M6) so now i have to click cycle start twice every time i run after the first time to change the tool number back to 1.
Edited the M6 script forcing the stop at all M6 commands so no tool change is ignored. Awesome
Now the tool number is always 2.
I can live with that because it funtions the way i want it to. But thought I would ask. Is there a way to reset the tool number using a Gcode command? This way I could put the M6 macro back together, set the tool number to match the first tool in all my code, and skip the first tool change and not have to click twice!
But I think i already know the answer.
-
I think you can just click on the tool number and type the tool you want then hit Enter
-
Yeah I realize that but if i forget to do that and that #2 tool change gets skipped I have a ruined part. I'll just have to find a way to ignore the display.
-
I'm fixing to add M61 as a means to do just this. I'll post when there is a build up with this in it.
Steve
-
That would be great. I have to learn Lua. So many things would be doable if i had a good understanding
-
Steve,
I am not a programmer and it took me a little while to get the hang of the LUA.
I put this together to help other people.
https://www.machsupport.com/forum/index.php?topic=45397.msg289143#msg289143
Bill
-
Thank you. I'll take a peek later today after I get my chores done.
-
Build 5194 is up with M61 in it. Check the docs on how to use it. Basically M61 Q1. Q sets the tool number. Q0 means no tool installed.
Steve
-
Awesome thank you
-
Just checked 2.0.5036 is up on the site. Can't find anything about 5194. Where should I look?
-
On the FTP page, development versions. It's quirky in any browser I use, but hover over the Mach4Hobby versions and you'll see the version in the status line. It'll be the last Mach4Hobby one at the moment, until a newer version comes out!!!
https://www.machsupport.com/ftp/Mach4/DevlopmentVersions/
-
Didn't work. I put "M61 1" in as the first line. Ran the code and changed to tool 2 and program ended
Ran again and the tool number never changed back to tool one and never stopped for the tool change. Drotoolnumber stays number 2.
-
Did you mean M61 Q1?
-
I do now lol. Went back and read the docs again and realized I missed the Q. All good now. Works like I was hoping it would. Now I can change my M6 macro back to original. Thank you!
Quick question! Does the screen load file always get overwritten when installing a newer version. I'm going to install this tomorrow and I'll have to edit it again to get my cycle start button working again.
-
It is on the FTP site with the development versions.
https://www.machsupport.com/ftp/Mach4/DevlopmentVersions/Mach4Hobby_Installer-4.2.0.5194.exe (https://www.machsupport.com/ftp/Mach4/DevlopmentVersions/Mach4Hobby_Installer-4.2.0.5194.exe)
Here is the directory for future reference. https://www.machsupport.com/ftp/Mach4/DevlopmentVersions/ (https://www.machsupport.com/ftp/Mach4/DevlopmentVersions/)
Steve
-
Quick question! Does the screen load file always get overwritten when installing a newer version. I'm going to install this tomorrow and I'll have to edit it again to get my cycle start button working again.
You should install a new profile based off of the stock profiles. If you edit the screen, you should rename it in the screen's properties. Or else, yes, it will get overwritten with new version installs. There is a whole post on this forum about all of that stuff somewhere. Maybe someone will link it if I can't find it.
Steve
-
I do have new profiles with custom names but still had to edit to enable my cycle start button. Oh well thanks again. Now if I could jog from the keyboard on startup this setup will be perfect.
I bookmarked the ftp page incase something I didn't know I needed gets implemented. Thanks again.
-
Just wanted to come back and say thanks. Mill ran a dozen parts and was flawless. Acted exactly as I wanted it to. Thank you for all your help.
-
Awesome! You are most welcome. :)