Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: oredigger on April 27, 2011, 03:29:52 PM

Title: Redefine M03 Code to check for RPM's?
Post by: oredigger on April 27, 2011, 03:29:52 PM
First, I apologize if this is something that has been answered or could be answered by searching the threads... but I'm on a bit of a time crunch here...

I will be a teaching assistant for a shop class that starts in a couple weeks, and there is a lot of prep that needs to be done before the class. I have setup Mach 3 on the CNC lathes (Syil C6-B's) and everything seems to work fine. But because the spindles are controlled manually, we want the program to check for spindle speed before running the program to help prevent tool crashes.

Basically we want to redefine the M03 command so that it:

As you can tell, we don't have any strict requirement other than not allowing the students to run the program until the spindle is up to speed. It is also not a big deal if we have to create/use a custom M-code. Any help you can provide, links to guides, example code (or full code  ;)) would be really helpful!

Thanks!
Title: Re: Redefine M03 Code to check for RPM's?
Post by: andrewm on April 28, 2011, 12:59:16 PM
This one has a script to Estop the machine when the spindle moves outside a defined area, Not exactly what you wanted, but its a start.

http://www.machsupport.com/forum/index.php/topic,16290.msg110182.html#msg110182

Drew
Title: Re: Redefine M03 Code to check for RPM's?
Post by: HillBilly on April 29, 2011, 06:54:55 AM
Here is another not exactly but more reference.

http://www.machsupport.com/forum/index.php/topic,158.0.html

Darek
Title: Re: Redefine M03 Code to check for RPM's?
Post by: BR549 on April 29, 2011, 11:28:40 AM
Add this to the end of the M3 macro. It will get you started in the right direction


While GetOemDro(39) < (GetOemDro(202) * .10)
Wend
 
If GetOemDro(39) >= (GetOemDro(202) * .10) Then   
         Message( "Spindle is up to Speed  PRESS CYCLE START to continue" )
   
 End If
 
Code"M01"

End
 
Title: Re: Redefine M03 Code to check for RPM's?
Post by: oredigger on May 05, 2011, 09:49:55 PM
Wow... thanks for the responses! I have been really busy as of late and haven't had the chance to try and implement any of this, but I may get a chance to work on it this weekend/early next week. Thank you for your help, I really appreciate it!