Welcome, Guest. Please login or register.
Did you miss your activation email?
December 12, 2017, 09:04:59 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Brains Development
| | |-+  Mach holding spindle speed
Pages: 1   Go Down
Print
Author Topic: Mach holding spindle speed  (Read 156 times)
0 Members and 1 Guest are viewing this topic.
alevitt53
Active Member

Offline Offline

Posts: 15


View Profile
« 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

* WJ200 - Final.brn (3.23 KB - downloaded 9 times.)
Logged
ger21
Global Moderator
*
Offline Offline

Posts: 5,660



View Profile WWW
« Reply #1 on: December 05, 2017, 09:12:12 PM »

When you set the spindle speed with the S word, that speed remains in effect until you change it.
Logged

Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
alevitt53
Active Member

Offline Offline

Posts: 15


View Profile
« Reply #2 on: December 05, 2017, 09:29:00 PM »

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?
Logged
ger21
Global Moderator
*
Offline Offline

Posts: 5,660



View Profile WWW
« Reply #3 on: December 05, 2017, 10:08:16 PM »

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?
Logged

Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
alevitt53
Active Member

Offline Offline

Posts: 15


View Profile
« Reply #4 on: December 06, 2017, 09:01:38 AM »

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.
Logged
Tweakie.CNC
CNC is only limited by our imagination.
Global Moderator
*
Offline Offline

Posts: 6,940


Super Kitty.


View Profile WWW
« Reply #5 on: December 07, 2017, 02:07:09 AM »

Quote
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.
Logged

Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
alevitt53
Active Member

Offline Offline

Posts: 15


View Profile
« Reply #6 on: December 07, 2017, 08:33:58 AM »

Thanks!!
That's exactly what I was looking for!!
Much appreciated
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!