Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 08:55:16 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  Redefine M03 Code to check for RPM's?
Pages: 1   Go Down
Print
Author Topic: Redefine M03 Code to check for RPM's?  (Read 508 times)
0 Members and 2 Guests are viewing this topic.
oredigger
Active Member

Offline Offline

Posts: 2


View Profile
« on: April 27, 2011, 02: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  Wink) would be really helpful!

Thanks!
Logged
AndrewM
Support Tech
Administrator
*
Offline Offline

Posts: 185




View Profile
« Reply #1 on: April 28, 2011, 11:59:16 AM »

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
Logged

HillBilly
Active Member

Offline Offline

Posts: 181


View Profile
« Reply #2 on: April 29, 2011, 05:54:55 AM »

Here is another not exactly but more reference.

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

Darek
Logged
BR549
Active Member

Online Online

Posts: 2,557


View Profile
« Reply #3 on: April 29, 2011, 10: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
 
Logged
oredigger
Active Member

Offline Offline

Posts: 2


View Profile
« Reply #4 on: May 05, 2011, 08: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!
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!