Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: tombj on February 02, 2016, 04:32:15 PM

Title: Can all 3 of my homing switches share one pin in Mach 3?
Post by: tombj on February 02, 2016, 04:32:15 PM
I'm revisiting a partially completed Boss 5 Bridgeport conversion that I had to set aside for a few years, it uses Mach3 & the Ashburn BOB:

 http://ashburn.home.icx.net/index.html

I've never set up one of these conversions and have close to zero experience with Mach3, but have watched the videos and read most of the manual...

All of the limit switches are set up and run (I think) all in series with the OEM Estop button and use the one pin 10 active low to stop the machine.  I want to add homing capability and have added home switches to do so.   Can I wire the 3 axis home switches all in series?  That is, will Mach 3 know which switch is triggered in turn as it homes each axis because it is homing that particular axis? (assuming it can be set to reverse off of the switch so that the pin is no longer active after each axis completes its home/jog off home move)  I read 4.6.6 & 5.6 of the manual that says I won't be able to <ref all home> but because Mach3 homes each axis separately shouldn't <ref all home> still work?

I prefer not to use the existing limit switches as dual purpose home switches at the moment.  I have only one input left on the BOB...

Any advice would be greatly appreciated.
thanks
Tom
Title: Re: Can all 3 of my homing switches share one pin in Mach 3?
Post by: fixittt on February 02, 2016, 04:47:26 PM
Yes, why yes you can.  make sure they are all normally closed switches so when one opens it breaks the circuit.  Normally open switch will not work for this. .  I have done this several times. 

Also when wiring them up, take consideration on being able to probe test the switches in case one fails.  So you can diagnose which one is open.   IE.  Screw terminals for the wires.
Title: Re: Can all 3 of my homing switches share one pin in Mach 3?
Post by: tombj on February 02, 2016, 06:54:07 PM
Excellent, thanks for the info.  So in ports and pins do I then enable x home y home and z home all on the same pin (pin 15 in my case) then in motor home/soft limits set the home off. to a distance that will deactivate the home switch just triggered? and then <ref all> will work?

Thanks
tom
Title: Re: Can all 3 of my homing switches share one pin in Mach 3?
Post by: BR549 on February 02, 2016, 07:23:05 PM
Home off is NOT what you think it is. The Home routine automatically backs off teh switch on it's own. 

(;-) TP
Title: Re: Can all 3 of my homing switches share one pin in Mach 3?
Post by: tombj on February 02, 2016, 07:27:48 PM
OK, but I'll still enable x home y home and z home all on the same pin 15 to set this up, is that right? and <ref all> should then be usable?

thanks
tom
Title: Re: Can all 3 of my homing switches share one pin in Mach 3?
Post by: fixittt on February 02, 2016, 07:57:58 PM
yes you set them all on the same pin number.  When you do that, the home LEDS will either all be off, or all be on.  If they are on, then you need to change the active low status for each one until they are all off.   Then manually trigger each one to verify operation.

When you home, the axis will move until it triggers the the switch, then reverse until the switch changes state.  Then move to the next axis.  Z, Y then X.
Title: Re: Can all 3 of my homing switches share one pin in Mach 3?
Post by: tombj on February 02, 2016, 08:03:15 PM
That's great, I should be able to wire it up tomorrow.
thanks for the help!
tom
Title: Re: Can all 3 of my homing switches share one pin in Mach 3?
Post by: tombj on February 03, 2016, 06:04:56 PM
Well, I've wired the NC loop for the home switches, the loop is powered by the same 5v power supply that powers the breakout board. The breakout board pin 15 led is lit when the switches are inactive and when any switch is opened the led goes out on the board. It is an optoisolated input.  On the Mach 3 configuration page I enabled x,y,and z home(s) for pin 15 and tried setting active low and high for them but I get no light (or the light does not turn off) with either setting from the  m1 m2 m3 home indicators on the diagnostics page when these new home switches are operated.  I can only conclude that either there is a problem with the breakout board, parallel port or hopefully just PC configuration.  pin 15 is not enabled for any other I/O in Mach3.  Is there any difference in parallel port pin 15 that might require some programming in either Mach or the PC bios?  I know there are PS2 EPP and ECP type parallel ports, but don't know what I have, if they can be set, or if it makes a difference in this case...or am I missing something else?
thanks
tom
Title: Re: Can all 3 of my homing switches share one pin in Mach 3?
Post by: fixittt on February 03, 2016, 07:46:19 PM
what kind of switches do you have?  What do you mean "powered"?

Take a 2 wires, screw one to pin 15, the other to a ground on your breakout board.  Touch them together, the XYZ home Leds should light up if you enabled them, set them all to pin 15 and set the port to 1.

Title: Re: Can all 3 of my homing switches share one pin in Mach 3?
Post by: tombj on February 03, 2016, 08:09:40 PM
My breakout board inputs are optoisolated so require power to light the led inside the optoisolator, the light from which is in turn detected inside that optoisolator and then the high or low is passed on to the port pin, at least thats how I think they work.  the schematic for that is here see "optoisolated input":

http://ashburn.home.icx.net/id1.html

Good idea though as the optoisolators are socketed so if I remove that one I should be able to jumper its output with an external switch to test the port pin as shown in the schematic directly below it.  We'll see tomorrow, maybe its a bad optoisolator.
thanks
tom
Title: Re: Can all 3 of my homing switches share one pin in Mach 3?
Post by: bfgstew on February 04, 2016, 01:30:33 AM
I think you'll find the BOB powers the opto's on the BOB side, your switches need wiring from pin 15 to ground as stated, it looks for the difference in potential.
Title: Re: Can all 3 of my homing switches share one pin in Mach 3?
Post by: tombj on February 04, 2016, 08:53:29 AM
OK, I'll try it that way.  The LED on the BOB did go on and off when activating the home switch loop though...
thanks
tom
Title: Re: Can all 3 of my homing switches share one pin in Mach 3?
Post by: stirling on February 04, 2016, 11:08:16 AM
From the schematic you linked to, what you're doing SHOULD work. (Technically, you shouldn't use your BOB's 5V for your switch chain but that shouldn't stop it working it will just trash your galvanic isolation). BUT - if your BOB LED is working then the inputs (at least at the D connector) must be too.

You said the existing limits work - but you said "you think" - do they?

maybe post your xml file.
Title: Re: Can all 3 of my homing switches share one pin in Mach 3?
Post by: tombj on February 04, 2016, 02:53:36 PM
I just went out to the shop and solved the problem, which was that those optoisolators needed 24v rather than 5v power...I just checked the voltage across the estop input and got 26v, then checked the resistors in place on the BOB, and sure enough they were 2.2k which is what was called out on the BOB schematic for 24v inputs.  Now all is well and homing is working perfectly. I should have looked at the resistors first but what really threw me was the fact that the BOB input LED lit up when operating the switches; now I know that is merely an indication of a signal, not necessarily an ADEQUATE signal!  I'm lucky I already had no hair to tear out..
thanks for all the help!
Tom