Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: william55 on November 30, 2015, 11:56:42 AM

Title: Limit Switches
Post by: william55 on November 30, 2015, 11:56:42 AM
I am a new member and I 'm sure this has been discussed many times, In searching for limit switch wiring options I decided on using one pin for  X,Y, Z, per a post I read here. Being new to this I was wondering if in the future I would regret this decision. Have any of you done this and just learned to work with it or could it cause problems down the road. I am just completing a build that I started a few years ago.
I look forward to being part of this forum
Title: Re: Limit Switches
Post by: robertspark on November 30, 2015, 01:44:45 PM

Not that its much credibility, but I use one pin for X, Y and Z limit and home switches.

It means that if you hit a limit switch you won't know which axis has had the limit switch.... but in all fairness... just look at the machine... and over-ride the limit switches and jog it off the limit switch.

It also means that you can only home one axis at a time..... not really a problem for me  (no hurry).....

I did not follow the schematic in the mach3 manual for my setup.... in that I did not wire my limit switches in series with my e-stop (section 4.14, manual link below).... I have my estop on another pin, and I have my probe input on another pin.
sections:  and cover the shared pins
Title: Re: Limit Switches
Post by: william55 on November 30, 2015, 02:09:07 PM
Thanks Robert
Thats kind of what I thought, as for the over-ride I haven't figured out how to do that yet. I ended up disabling the pins in Mach 3 to continue my setup
Title: Re: Limit Switches
Post by: robertspark on November 30, 2015, 03:09:26 PM
You have a few choices....

Easiest way... Go to ports and pins... Then inputs and scroll down to the input defined as limit override... Click on the emulate input... And click on the hotkey... Click on an unused key on the keyboard... This will assign this hotkey to the limit override.  .... One catch... I suspect that the limits will only be overridden when the key is depressed...

Option 2 (the way I did it...)... I used machscreen to create a button on my screenset that would toggle the limits override via the oembutton code... Very simple... And an led in the background to show when it's overridden.   I'll give you the code if you're interested... Once you start fiddling with screenset, macros and brains, you will have some fun setting stuff up the way you want or need
Title: Re: Limit Switches
Post by: william55 on November 30, 2015, 08:19:24 PM
Thanks for the advice, I would like to take a look at the code, never done something like that before. That's what makes life fun.
Title: Re: Limit Switches
Post by: Fastest1 on December 01, 2015, 09:19:21 AM
Limit override is an option on the diagnostics page.
Title: Re: Limit Switches
Post by: robertspark on December 01, 2015, 11:08:32 AM
If you wish to have a go at modifying a screen to your own requirements, I use machscreen and find it very easy to use.
Website here for download and also the description of how it works.

When you want a button to do something or an LED (or DRO) to display something, Mach3 has a whole load of OEM codes built into it, which allows you via mach3 / screen editor to define the "OEM" code for that object.

You can also use the OEM codes for other things like Macros, Brains and a Macropump too.

Basically if you want to create a button which allows you to over-ride your limit switches, you create a button and enter the OEM code "150", and if you were typing code it would be "DoOEMButton(150)"

And if you wanted an LED behind the button, you would define a bmp / png image (have a look at one of the other LED's on the screen hidden behind a button), and you would enter code "34", or again if you were doing code for a macro, you would use GetLED(34).