MechMate CNC Router Forum

Go Back   MechMate CNC Router Forum > Electrical & Electronic > 70. Control Systems
Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old Wed 04 August 2010, 12:19
zigmart
Just call me: John #112
 
Phoenix, AZ
United States of America
auto zero with limited inputs

Is it possible to get all the push buttons, proximity sensors and a zero probe to all work with just one BoB??


Pin 10 - Emergency Stop
Pin 11 - Start
Pin 12 - Pause
Pin 13 - Auto Zero
Pin 15 - Proximity Sensors

Pin ?? - Probe

I was thinking (Something I probably shouldn't do) if there was a way to have pin 13 (Auto Zero) trigger a macro that could temporarily disable one of the buttons so the probe could use that particular input, ie pushing auto zero disables the the start circuit and lets the probe use pin 11 until the zero routine is finished, then it goes back to normal once the machine completes the routine. Don't know how to go about it though. Maybe someone could slap some reality into me, or help me figure this out. I am gonna cross post this over on the Mach forums too.

Thanks, John
Reply With Quote
  #2  
Old Wed 04 August 2010, 12:35
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
John, why can't you just use Pin 13 for both the Auto Zero and the Probe? Surely, you won't be using both at the same time.
Reply With Quote
  #3  
Old Wed 04 August 2010, 12:43
zigmart
Just call me: John #112
 
Phoenix, AZ
United States of America
Problem is if pin 13 is set to start the macro, wont it start it again when the probe makes contact if the same pin is used. Unless the macro disables the button press). Which is sorta what I am getting at, I just used the start button as an example.
Reply With Quote
  #4  
Old Wed 04 August 2010, 12:50
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
Start what Macro? Oh, maybe you're seeing AutoZero as a button to start the zeroing sequence? I'm thinking of it as a Z Zero sensor used during the zeroing sequence.

I think you'll find that you don't do the zero sequence often enough to warrant a dedicated button.
Reply With Quote
  #5  
Old Wed 04 August 2010, 13:24
zigmart
Just call me: John #112
 
Phoenix, AZ
United States of America
Dang cell phones, accidently replied to brad or the iternet gods via email instead of here. Apologies if I sounded rude, that wasn't the intention, as I appreciate all the help I can get.

Now for the reply!!

Then what the heck is the third button on the y-car for?? Seems to me no matter wether it is used to start the zero routine or something else, we still run into the problem of limited inputs with one BoB. In any effect, I would like to use it to trigger the zero routine as my keyboard isnt right at the machine, and I like to watch it up close
Reply With Quote
  #6  
Old Wed 04 August 2010, 13:44
smreish
Just call me: Sean - #5, 28, 58 and others
 
Orlando, Florida
United States of America
John,
I have set up the Z-zero routine and probe on the same pin with a macro. I think it was Greolt that published the script, but it essentially let the probe be a single 1 shot input, while initializing the routine was a 3 second hold.
So, since I confused myself, it works like this.

*I wired the probe and button in parallel to the pin 13 on my machine*

push button for 1 second...sets zero where your at, or where the probe touched
push button and HOLD for 3 seconds, intialized routine to start and then waited for a quick 1 second touch from EITHER the button or probe.

This let you "escape" from the routine if your not ready.

IT was a really nice macro. I don't have the file anymore since my machine #5 is gone, but did work.

I was set up for:
Pin 10 - Emergency Stop
Pin 11 - Start
Pin 12 - Pause
Pin 13 - Auto Zero / probe
Pin 15 - Proximity Sensors (all run in series thru relays)

Per the autocad drawing file I just found on my old laptop.

Good luck.
Sean

Last edited by smreish; Wed 04 August 2010 at 13:45.. Reason: I spell like a kiddy.
Reply With Quote
  #7  
Old Wed 04 August 2010, 14:31
zigmart
Just call me: John #112
 
Phoenix, AZ
United States of America
Cool, hopefully he chimes in with the macro
Reply With Quote
  #8  
Old Wed 04 August 2010, 17:41
Greolt
Just call me: Greg
 
Victoria
Australia
John

I think Sean is talking about a macro that he wrote. Not the one I put up a couple of years ago.

http://www.mechmate.com/forums/showt...0&postcount=69

Greg
Reply With Quote
  #9  
Old Wed 04 August 2010, 18:05
zigmart
Just call me: John #112
 
Phoenix, AZ
United States of America
That is a real bummer, hopefully we can solve this problem again, since he no longer has the script!!
Reply With Quote
  #10  
Old Wed 04 August 2010, 22:01
Richards
Just call me: Mike
 
South Jordan, UT
United States of America
If you really want to maximize signals, use some binary logic. With three inputs, you have eight possibilities (really only seven because you'll need an "off" state).

Assuming that you have three N/O switches:

000 = all inactive
001 = function 1 active
010 = function 2 active
011 = function 3 active
100 = function 4 active
101 = function 5 active
110 = function 6 active
111 = function 7 active


Having four switches would give you fifteen usable routines. Five switches would gie you thirty-one usable routines, and so forth.

Add a delay routine so that you have a second or so before the inputs are judged to be stable, then branch based on which switches are active.
Reply With Quote
  #11  
Old Wed 04 August 2010, 23:19
zigmart
Just call me: John #112
 
Phoenix, AZ
United States of America
Why you gotta hurt my brain, Mike. That is a bit more than what I need
Reply With Quote
  #12  
Old Thu 05 August 2010, 07:39
domino11
Just call me: Heath
 
Cornwall, Ontario
Canada
Or, if you just need an extra function or two, a toggle over the pushbutton will give two functions for the one button. Toggle left is function 1 and toggle right is function 2. Use a three position toggle for an extra function (middle position). You could also use a locking toggle so that it does not get bumped when you don't want it to.
Reply With Quote
  #13  
Old Thu 05 August 2010, 09:37
smreish
Just call me: Sean - #5, 28, 58 and others
 
Orlando, Florida
United States of America
...Mike,
I was SO tempted to go there on my discussion. I'm glad you did and not me...I'm not that smart. LOL
Reply With Quote
  #14  
Old Thu 05 August 2010, 10:10
zigmart
Just call me: John #112
 
Phoenix, AZ
United States of America
Actually the toggle doesn't seem like a bad idea!!
Reply With Quote
  #15  
Old Thu 05 August 2010, 14:02
Richards
Just call me: Mike
 
South Jordan, UT
United States of America
The problem with my idea is that it requires a macro that treats a group of input signals as a single entity. It also requires a macro that can handle a time delay. I've done very little programming in Mach, so I really have no idea whether such a macro is even possible. I assume that it would be possible, but it might take more effort than it would be worth.

An alternative approach is to use multiple parallel ports. The I/O pins would still be limited, but you might have enough I/O to do the job without resorting to writing custom code.

I've been playing with EMC2 and Linux. It looks interesting, but I dread the learning curve. At my age, I'm never sure that I'll live long enough to understand anything new.
Reply With Quote
  #16  
Old Thu 05 August 2010, 14:54
zigmart
Just call me: John #112
 
Phoenix, AZ
United States of America
I woulda gone with another parallel port, but i am running a itx computer for this machine, so no room for it. Sean says it is possible to do what i would like to, and has even done it, but for now I will just use a toggle switch on the bin and work on a more elegant solution from there.
Reply With Quote
  #17  
Old Thu 05 August 2010, 17:49
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
Okay, now I'm really confused. I thought the issue is that we had more buttons than available inputs. How does adding a toggle switch (another input, or two if it has three positions) help solve the not enough inputs problem?

I've cut this board three times already, and it's still too short!

Sean's macro description is to double up the functions of an existing input.
Reply With Quote
  #18  
Old Thu 05 August 2010, 18:07
domino11
Just call me: Heath
 
Cornwall, Ontario
Canada
Brad,
Sorry, my post was confusing. I was just proposing using a toggle switch (or Switches) to select the binary coding that Mike had suggested. The pushbutton would then just send the binary code to the breakout board. Then there would be no need for the delay routine.
Reply With Quote
  #19  
Old Thu 05 August 2010, 18:24
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
Heath, help me understand the practical implementation of that.

Would you have three toggle switches, one for each of the binary digits, and then a single button for all functions?

I can see how you might use a number of diodes, or a small logic board in order to have the buttons themselves trigger combinations of inputs, and thus be able to process up to seven buttons with three inputs. I can see a similar technique to allow three buttons with two inputs. But I can't see how one button and a toggle switch can ever consume fewer than two inputs.

Two other silly ideas to toss out while we're at it: If you had an analog input, you could use different voltage levels (resistor values) to distinguish buttons. Or, if you have a serial port on the machine, you could use the CarrierDetect, DataSetReady, ClearToSend, and RingIndicator for four more inputs - and DTR and RTS for two more outputs. That's assuming somebody can couple it up to Mach3.
Reply With Quote
  #20  
Old Thu 05 August 2010, 18:54
zigmart
Just call me: John #112
 
Phoenix, AZ
United States of America
Actually, you are correct a toggle switch wont work, since both items are still going to the same pin, either one would still trigger the event. Sean's solution is still the correct one, so I am gonna have to try to either research the heck out of it (mach board is telling me to buy another parallel board) or reinvent the wheel since the macro was apparently lost with machine #5
Reply With Quote
  #21  
Old Thu 05 August 2010, 18:58
domino11
Just call me: Heath
 
Cornwall, Ontario
Canada
Brad,
You are right, the toggles just set up the binary input and the pushbutton is just a "send". You would not need the delay routine. My first post did not come out right and gave the wrong idea. You would need to use two inputs min. I just thought the macro would be easier to write and easier for the operator if they could just input the code and then press send. You could also use a rotary switch for the selector as well.
Sorry if I confused the situation.
Reply With Quote
  #22  
Old Thu 05 August 2010, 19:20
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
Next up, Mach3 macros that understand Morse Code!
Reply With Quote
Reply

Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tilting or hide-away MM? limited floor space Mike94531 General - MM Build 49 Sat 13 March 2010 03:39
Auto Tool Changer WTI 50. Toolheads 38 Mon 14 December 2009 12:30
Auto Toroid Winder WTI 702. Power Supplies 0 Sat 20 June 2009 19:03
Toggling inputs - faulty Campbell BoB Alan_c Troubleshooting 15 Mon 08 December 2008 10:30
Ipac - many extra Mach inputs via the keyboard port Gerald D 70. Control Systems 2 Thu 21 February 2008 05:06


All times are GMT -6. The time now is 07:57.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.