584,849 active members*
4,335 visitors online*
Register for free
Login
Results 1 to 12 of 12
  1. #1
    Join Date
    Sep 2005
    Posts
    106

    How to turn on/off spindle

    I have used Mach 3 with a Xylotex 4 axis board for about 8 years on a JGRO machine. I am now building a new machine and am trying to set it up to use M-codes to turn on/off the router. I have Port 1 - Pin 1 set for spindle control in both CW and CCW directions. When I hit the spindle button on the diag. screen output 1 goes high and blinks. Pin 1 on my ribbon cable goes to 4.88v. When I turn off the spindle it drops to 0v. This is all good.

    So now I have 2 questions.

    Hardware first: I made up a simple 5v relay using a NPN transitor circuit to turn on the spindle. But when pin 1 is connected to it and is turned on, the voltage is only .78v. So what hardware does everyone else use to turn on your spindles? I understand that there are breakout boards, but I have only 1 printer output from the PC, and therefore only one cable to attach to one board. The boards I have seen only have an 26 pin input and screw jack outputs, so how would I connect the Xylotex and a breakout board if that is what I need to do??

    Software second:

    I can turn on and off the spindle no problem, but only one time without having to do an E-stop. Without the E-stop, I cannot turn the spindle back on. Is this normal? Should I not be able to turn the spindle on/off as I like??

    Thanks
    Ray

  2. #2
    Join Date
    Dec 2003
    Posts
    24216
    When connecting to a P.P. you really need a TTL compatible device such as the 2N7000 Fet that does not load the port.
    http://www.cnczone.com/forums/genera...f_control.html
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  3. #3
    Join Date
    Sep 2005
    Posts
    106
    Thanks Al, i will get one tomorrow and rebuild the curcuit.

    Ray

  4. #4
    Join Date
    Mar 2003
    Posts
    35538
    I have Port 1 - Pin 1 set for spindle control in both CW and CCW directions.
    I'd set the CCW output to an unused output. Otherwise, Mach3 may be running both the M3 and M4 macros at the same time.

    I can turn on and off the spindle no problem, but only one time without having to do an E-stop. Without the E-stop, I cannot turn the spindle back on. Is this normal? Should I not be able to turn the spindle on/off as I like??
    This may be related to what I just mentioned. You should be able to start and stop as many times as you like.
    Do you have a long Spin Down Delay set?
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

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

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  5. #5
    Join Date
    Sep 2005
    Posts
    106
    Do you have a long Spin Down Delay set?

    I have the startup set to 2 sec. and the spin down at 5 sec. I was just putting these #'s in as a test, as I have net yet got the router to turn on yet.

    Ray

  6. #6
    Join Date
    Mar 2003
    Posts
    35538
    With the 5 second delay, you won't be able to turn it back on for about 6 seconds after turning it off. Try waiting 10 seconds and then try to turn it on.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

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

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  7. #7
    Join Date
    Sep 2005
    Posts
    106
    Thanks Gerry,

    I will try that tonight after work

  8. #8
    Join Date
    Sep 2005
    Posts
    106
    I tried turning on the router after having started, stopped and waiting 10 seconds, nothing. I left it for 5 min. but cannot not turn output 1 back on until I do an e-stop. Gerry, the icon for the router in your screen set does not turn off until I do the e-stop, I am thinking the problem is connected to that.

  9. #9
    Join Date
    Mar 2003
    Posts
    35538
    Email me your xml file.
    If the icon isn't going off, then you have a configuration issue. The button just uses Mach3's internal spindle on/off commands.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

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

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  10. #10
    Join Date
    Sep 2005
    Posts
    106
    Thanks for all the help guys, I built the circuit from the above post and now have new questions. While the circuit works fine in Mach, when I turn on the computer the router starts up. Once Mach is running the router turns off. Is this normal? Is there a way around it? I put in a drop resisitor from the input on the FET to ground to stop false noise. But this is a full 4.88v on the printer port until Mach boots. Side note: the router does not turn on once Mach is shut off.

    Thanks for the tip on the spindle control Gerry, that worked.

    Ray

  11. #11
    Join Date
    Dec 2003
    Posts
    24216
    First, when switching on, all power fed devices, drives spindle should be off by virtue of an E-stop circuit, once Mach boots up the E-stop can be released, enabling the drives and SP.
    If you want more protection, insert the output of the charge pump in the E-stop circuit and use as a type of watchdog.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  12. #12
    Join Date
    Sep 2005
    Posts
    106
    Thanks Al, next thing to build in.....

Similar Threads

  1. Spindle won't turn on
    By aksu74 in forum Tormach Personal CNC Mill
    Replies: 15
    Last Post: 04-22-2012, 12:26 PM
  2. how to turn on spindle while mill spindle is on!!
    By the mill kid in forum Mazak, Mitsubishi, Mazatrol
    Replies: 3
    Last Post: 11-22-2010, 08:08 PM
  3. Spindle won't turn on
    By ranchak in forum Bridgeport / Hardinge Mills
    Replies: 5
    Last Post: 08-30-2009, 12:32 AM
  4. help spindle does't turn
    By napa55 in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 03-03-2009, 06:51 PM
  5. interact 4 spindle drive won't turn on spindle
    By 0041601 in forum Bridgeport / Hardinge Mills
    Replies: 7
    Last Post: 06-23-2008, 11:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •