Hello Guest it is November 22, 2019, 05:34:59 AM

Author Topic: program pause until spindle starts  (Read 3280 times)

0 Members and 1 Guest are viewing this topic.

program pause until spindle starts
« on: February 23, 2012, 09:20:22 PM »
How do I get Mach 3 to not proceed with running gcode until spindle is running?  I have input 2 setup and it works when I turn spindle on it lights up, spindle off it goes out.

Tried M3 macro, can't get that to do it.  Tried creating a file M3userpostscript.m1s with the following and that doesn't work either....

Message “Spindle Start Requested”
SystemWaitFor(Input2)
While IsMoving ()
sleep (10)
Wend
Message “Spindle Start Delay”
Code "G4 P2"
While IsMoving
sleep (10)
Wend
Message “”
Call SetUserLED(1010,1) ???

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: program pause until spindle starts
« Reply #1 on: February 23, 2012, 10:13:57 PM »
Do you just want to wait for the rpm to get up to speed? There's a built in delay for that on the Spindle tab of Ports and Pins.

 Is this during a tool change? Does Mach3 turn your spindle on with M3?
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: program pause until spindle starts
« Reply #2 on: February 26, 2012, 11:19:21 AM »
No mach 3 does not control spindle, but it is supposed to wait for input from spindle relay (i think it is) to be activated, then the time delay before axis start moving.  I can't get it to do that for some reason.

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: program pause until spindle starts
« Reply #3 on: February 26, 2012, 06:14:57 PM »
Do you have the spindle enabled?
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: program pause until spindle starts
« Reply #4 on: February 27, 2012, 07:18:22 AM »
Spindle is running yes

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: program pause until spindle starts
« Reply #5 on: February 27, 2012, 02:06:15 PM »
I thin what Gerry is asking IS do you have the spindle setup in MACH3 config.  IF not then Mach may  ignore ANY m3 it sees. SO if you put your code in the M3 macro Mach3 will never see it.

You could build a simple Mcode (M100) that contains the code then place the M100 where a M3 would go. THAT will test your funtion.

Just a thought, (;-) TP
Re: program pause until spindle starts
« Reply #6 on: February 27, 2012, 02:36:08 PM »
I have the relays working for the spindle yes, under the config.  I have a signal coming back to mach 3 via Hillbilly BOB, If I go into the diagnostics screen when spindle is running I get a indicator in mach 3 both on input and output.

I'm not quite sure I follow you on the M100, or where to put it, or even what the code would look like.

This is second Hillbilly BOB conversion I've done for Boss 5 machine, but I'm not sure if code has changed or what.  More than likely i've overlooked some simple setting but, not sure.