Hello Guest it is March 29, 2024, 11:48:16 AM

Author Topic: Adding a physical button to control outputs  (Read 6530 times)

0 Members and 1 Guest are viewing this topic.

Adding a physical button to control outputs
« on: September 30, 2011, 12:28:05 AM »
How do would I go about setting up a button that would turn an output on and off? I would like to add a button to control the air solenoid for my dust hood, the solenoid is using 2 wires on a 3 conductor wire...it would be nice if I was able to utilize that unused wire instead of running a new one. I know how to setup an input but how do I get it to control the output? Also, if I used a button that sticks instead of a momentary one is there a way that it could override the output on/off code and make sure the dust hood stays up when it's depressed?

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Adding a physical button to control outputs
« Reply #1 on: September 30, 2011, 03:15:47 AM »
How do you control it at the moment?
Hood
Re: Adding a physical button to control outputs
« Reply #2 on: September 30, 2011, 10:15:18 AM »
The dust hood is setup using the 'flood coolant' button and is triggered by M8, I'm trying to operate it right from spindle location, either toggling it up/down or having it to where the button raises the hood and overrides the code.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Adding a physical button to control outputs
« Reply #3 on: September 30, 2011, 10:19:38 AM »
No problem then, just use a Brain and have the brain look at the input you are using, pass it through and terminate at the flood toggle button.
Just a momentary switch is needed.
Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Adding a physical button to control outputs
« Reply #4 on: September 30, 2011, 10:23:25 AM »
A brain just like this will work fine, I have it as Input 4.
Hood
Re: Adding a physical button to control outputs
« Reply #5 on: October 02, 2011, 11:49:00 PM »
I've been playing with the brain part of the software and have a situation: I setup a brain that reads the Y position DRO, so that when the machine is away from the work area and near the tools the dust hood (flood) is up (enabled). Doing this overrides the flood toggle so that the dust hood is either up or down depending on the machine location, is there a way around this so it only locks the dust hood up when it's by the tools but the rest of the machine you can toggle it up or down?

I wanted to setup another one kept the dust hood up if the tool is under a certain length, but I suspect I'll have the same problem. (when using a tool longer then the set length the hood would be stuck down...)

Also whenever I go to brain control and load any brain I get a Bad XML read but they still seem to work....any ideas on that?

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Adding a physical button to control outputs
« Reply #6 on: October 03, 2011, 07:36:36 AM »
Getting a brain to do what you want can be a lot of trial and error and you have to get creative if its not just a simple task such as switching something on/off via a button.
For what o are talking about you will likely have to use formulas (greater than/less than etc) use And and Ors looking at states of LEDs etc.
Hood
Re: Adding a physical button to control outputs
« Reply #7 on: October 03, 2011, 05:40:45 PM »
I've attached the brain I messing with, this is the last thing I tried, but not matter what I do I'm getting the same results - no manual control over the output once the brain is enabled. Could you give me and example of how to get it to only work if the condition is true and leave it alone when it's false? Any idea on the bad xml read message I'm getting?

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Adding a physical button to control outputs
« Reply #8 on: October 03, 2011, 05:49:00 PM »
Try naming the Brain with no spaces ie DustHood.brn rather than Dust Hood.brn
As for giving you an example, cant unless I mess around with it, which I will try if I get a chance.
Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Adding a physical button to control outputs
« Reply #9 on: October 03, 2011, 05:56:39 PM »
Would this work?
Hood