Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started 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:
- Stops the program cycle (similar to M06 when there is no auto-tool changer)
- Waits until spindle speed is within +/- 10% of speed set with S#
- If/when spindle is at correct speed allows user to press Reset and/or Cycle Start
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!
-
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
-
Here is another not exactly but more reference.
http://www.machsupport.com/forum/index.php/topic,158.0.html
Darek
-
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
-
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!