Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 08:20:58 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  Adding a physical button to control outputs
Pages: 1 2 »   Go Down
Print
Author Topic: Adding a physical button to control outputs  (Read 628 times)
0 Members and 2 Guests are viewing this topic.
swanner
Active Member

Offline Offline

Posts: 57


View Profile
« on: September 29, 2011, 11:28:05 PM »

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?
Logged
Hood
Active Member

Offline Offline

Posts: 17,368


Carnoustie, Scotland


View Profile
« Reply #1 on: September 30, 2011, 02:15:47 AM »

How do you control it at the moment?
Hood
Logged
swanner
Active Member

Offline Offline

Posts: 57


View Profile
« Reply #2 on: September 30, 2011, 09: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.
Logged
Hood
Active Member

Offline Offline

Posts: 17,368


Carnoustie, Scotland


View Profile
« Reply #3 on: September 30, 2011, 09: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
Logged
Hood
Active Member

Offline Offline

Posts: 17,368


Carnoustie, Scotland


View Profile
« Reply #4 on: September 30, 2011, 09:23:25 AM »

A brain just like this will work fine, I have it as Input 4.
Hood


* ScreenHunter_01 Sep. 30 15.22.jpg (17.19 KB, 736x178 - viewed 57 times.)
Logged
swanner
Active Member

Offline Offline

Posts: 57


View Profile
« Reply #5 on: October 02, 2011, 10: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?
Logged
Hood
Active Member

Offline Offline

Posts: 17,368


Carnoustie, Scotland


View Profile
« Reply #6 on: October 03, 2011, 06: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
Logged
swanner
Active Member

Offline Offline

Posts: 57


View Profile
« Reply #7 on: October 03, 2011, 04: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?

* Dust Hood.brn (2.49 KB - downloaded 13 times.)
Logged
Hood
Active Member

Offline Offline

Posts: 17,368


Carnoustie, Scotland


View Profile
« Reply #8 on: October 03, 2011, 04: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
Logged
Hood
Active Member

Offline Offline

Posts: 17,368


Carnoustie, Scotland


View Profile
« Reply #9 on: October 03, 2011, 04:56:39 PM »

Would this work?
Hood


* ScreenHunter_01 Oct. 03 22.54.jpg (11.34 KB, 1360x78 - viewed 26 times.)
Logged
Pages: 1 2 »   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!