Machsupport Forum
Mach Discussion => Brains Development => Topic started by: alevitt53 on December 05, 2017, 07:46:51 PM
-
Hello All,
I'm running the brain attached with a Hitachi WJ200. Spindle is controllable with M3 and M5 commands and the speed is controllable
with the S.... Command.
The Problem:
If the spindle is turned on and a speed is set with the M3 S12000 command all is well and the program runs.
Enter the M5 command at the end of the program and the spindle stops, the run light on the VFD goes out and all is well.....UNTIL
If you enter a M3 command on the command line without the S following, the spindle will turn on and go back to the previous 12000 rpm number.
It appears Mach is holding on to that number, not the brain and not Modbus. Checking the registers on the modbus yields a 0 rpm.
Is there a setting on Mach that I am missing?? Why is Mach holding that speed?
The only work around I have found it to include S0 after the M5 command in the running program.
Any Ideas???
Thanks
Art
-
When you set the spindle speed with the S word, that speed remains in effect until you change it.
-
CamBam generates the G-code with the m3 S commands. Other than adding a footer to set M5 S0 is there a setting in Mach to tell it to set S to 0 when the M5 command is initiated?
-
No, if you want to change the speed, you need to have the g-code change it.
Why do you want the speed set to 0 anyway?
-
Just as a safety precaution. If Mach is running and an inadvertent M3 command is issued, or if the spindle start button is activated the spindle will turn at the previous rate.
-
is there a setting in Mach to tell it to set S to 0 when the M5 command is initiated?
Hi Art,
In the folder C: / Mach3 / macros / Mach3Mill (or whatever Profile you are using) add the line Code("S0") to the file m5.m1s then save the file.
Tweakie.
-
Thanks!!
That's exactly what I was looking for!!
Much appreciated
-
i am also facing same of alevitt53 its change back to previous rate. what to do now did i have to change code set to o or so?
-
I found the easiest way to solve this problem is to edit the g-code and just add an S0 command after the M5 command.
There is also a field in the general setup that you can add an S0 command on every E-Stop. That will set the speed to 0 whenever there is an E-Stop and the program has not reached the S0 command.
-
thanks for quick reply.