Hello Guest it is March 28, 2024, 08:50:46 PM

Author Topic: Outputs for Status Lights  (Read 7615 times)

0 Members and 1 Guest are viewing this topic.

Outputs for Status Lights
« on: October 29, 2008, 01:15:20 AM »
I was wondering if someone could point me in the right direction.

I am trying to build a status light system with leds, but I am unsure of how to configure mach for this.  I have 2 free output pins (16 and 17).  I want the light bar to show green when mach is in a normal and running state, and I want it to show red when mach is in emergency mode.

Can anyone help me out here?

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Outputs for Status Lights
« Reply #1 on: October 29, 2008, 04:35:00 AM »
Should be simple enough to do with a Brain. Not tried it but would think if you looked at the Run LED then passed the signal to an output that would activate one LED. For the opposite state you would just invert the signal to another output similar to the screenshot.
Hood
Re: Outputs for Status Lights
« Reply #2 on: October 29, 2008, 12:02:52 PM »
Thanks for that.  I can get it to output when it is running, but when I hit the e-stop button, I don't get anything.  Does the e-stop disable all outputs?  It must. so is there an alternative to using an output?

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Outputs for Status Lights
« Reply #3 on: October 29, 2008, 12:22:10 PM »
Could you not have Mach holding it in what it thinks is an on state when reset is inactive?

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Outputs for Status Lights
« Reply #4 on: October 29, 2008, 12:29:21 PM »
Ah ok thought you just wanted it when no code was running. So what exactly are you wanting? Is the LED to be Green when Mach is not in reset and Red when it is? Or are you wanting it Green only when running code and Red at all other times?
Hood
Re: Outputs for Status Lights
« Reply #5 on: October 29, 2008, 12:31:40 PM »
I need Green lights when mach is not in reset (basically when the mach is on in normal mode)  and then red lights when mach is in reset.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Outputs for Status Lights
« Reply #6 on: October 29, 2008, 12:34:23 PM »
OK so then maybe setting the LED with a relay, you could then look at the E-Stop LED to switch the relay, NC side is for Red LED,  NO side for Green and then one output would control both states.

Hood

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Outputs for Status Lights
« Reply #7 on: October 29, 2008, 12:36:58 PM »
What are the lights? Beacon lights? Physical lights attached to Mach? Could you not use a relay? The output from Mach will be on unless in e-stop. It will be holding a relay in. When power is removed or mach is in reset it will drop the output and relax the relay fireing the red light (the other set of contacts on the relay).

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Outputs for Status Lights
« Reply #8 on: October 29, 2008, 12:37:08 PM »
that's a good idea.  but still curious.  does mach disable all outputs when in reset mode?

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Outputs for Status Lights
« Reply #9 on: October 29, 2008, 12:41:41 PM »
certainly seems that way although the enables must work so you could use them.
Hood