586,036 active members*
3,663 visitors online*
Register for free
Login
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2008
    Posts
    28

    Relay Control

    I have installed some relays with separate 5vdc power supply to basically turn on/off a power receptacle where my spindle and the vacuum cleaner are connected to and this is what it does without any software setup:

    I started the computer, loaded Mach3, and turned on the control box and it stayed off as it should. I loaded a simple test program that didn’t have any M03 g-code in it and when I clicked on start the machine started running and the relayed turned on, ran the program and it came back to the starting point but the relay never turned off and the program had M05 (Spindle Off) and M02 (End Program). The relay also never turned off after I closed the Mach3 and turned off the control box. If I would disconnect the parallel cable from the computer it will turn off but after plugging the cable back in it would turn on again. The relay is connected to pin #14 so the got the power to turn it on when the program stated running and there was nothing there to shut it off after that and it’s still pumping 5v from the computer only. I have never played with that part of the software and I need to find out how to set it.

  2. #2
    Join Date
    Mar 2003
    Posts
    35538
    In the Ports and Pins screen, assign pin 14 to an output in the "Output Signals" tab, then assign that output in the "Spindle Setup" tab.
    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)

  3. #3
    Join Date
    Dec 2003
    Posts
    24221
    It sounds to me like you are driving the relay direct from the parallel port?
    If so you should really use a buffer/driver or a BOB, see recent posts here re 2n7000 etc.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

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

  4. #4
    Join Date
    Sep 2008
    Posts
    6

    Smile Just curious

    Just curious...I am about to create the same scenario and was wondering
    if there is some way the relay can be triggered erratically...rather then a start and stop....I would like say the vacuum to come on every 200 lines of g-code....does this mean I need to inject mstarts and stops throughout the run.

    thanks
    cnc guy
    toronto

  5. #5
    Join Date
    Jun 2007
    Posts
    3757

    Talking Mach3.

    You can use Output #1 and Output #2 turned on by M7 and M8, and both turned off by M9. Relays are are on my BOB.
    Intended for mist and coolant, but I use one for a 1HP monster dust sucker.
    I put a double power outlet on my machine and plug in whatever I like.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

Similar Threads

  1. Printer Port relay control
    By Sieg in forum CNC Machine Related Electronics
    Replies: 6
    Last Post: 12-08-2007, 08:39 PM
  2. non RF remote relay control?
    By DennisCNC in forum CNC Machine Related Electronics
    Replies: 2
    Last Post: 07-08-2006, 11:15 PM
  3. How do I control a relay?
    By amccoy in forum CNC Machine Related Electronics
    Replies: 7
    Last Post: 05-30-2006, 10:00 PM
  4. How to set a relay for a spindle motor ON/OFF control
    By TTaki in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 2
    Last Post: 03-09-2005, 01:26 PM
  5. How to control a relay with a PC
    By NeoMoses in forum CNC Machine Related Electronics
    Replies: 5
    Last Post: 08-06-2003, 11:55 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
  •