Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Chris.Botha on May 19, 2009, 09:56:45 PM

Title: Index switch / limit switch
Post by: Chris.Botha on May 19, 2009, 09:56:45 PM
This is a complete noob question.. proabbly covered in documentation somewhere but im too lazy/old/ignorant to find it...

i have four "limit switches" on my mill which are used to home my axis' and one is used as a probe.. and they work really really well..

the only headache with them is that if I accidentally crash into them they move out the way to save the switch but that means I have to refind my 4th axis Y centre after I recover from the crash.. major PITA..

now it occurs to me it should be a reasonable simple thing to just tell the mill to stop moving in its current direction if it hits the limit switch in the course of a errant path or manual jog.. like a mini estop if you will..

I checked the options but its all greek to me..

dumb jeweller here...

any help appreciated

Title: Re: Index switch / limit switch
Post by: ostie01 on May 19, 2009, 11:02:51 PM
Did you try the soft limit option?

Title: Re: Index switch / limit switch
Post by: Chris.Botha on May 19, 2009, 11:21:14 PM
I think that applies to the machine slowing down when it does a home operation? I need something that will stop the mill if it goes more than 2 micron or so over the actual limit switch during normal operation, not just during homing?

im prepared to live with an ESTOP solution as ti will savbe me from killing $200 omron switches...

Title: Re: Index switch / limit switch
Post by: ostie01 on May 19, 2009, 11:27:43 PM
Just post a section of Mach3 Manual, normally, soft limit will prevent hitting limit switch.

But, again, I'm not an expert, just trying to help, Jeff Configure Soft Limits
Most implementations of limit switches involve some compromises. Hitting them accidentally will
require intervention by the operator and may require the system to be reset and re-referenced. Soft limits
can provide a protection against this sort of inconvenient accident.
The software will refuse to allow the axes to move outside the declared range of the soft limits of the
X, Y and Z axes. These can be set in the range -999999 to + 999999 units for each axis. When jogging
motion gets near to the limit, then its speed will be reduced when inside a Slow Zone which is defined
for the table.
If the Slow Zone is too big, then you will reduce the effective working area of the machine. If they are
set too small, then you risk hitting the hardware limits.
The defined limits only apply when switched on using the Soft Limits toggle button – see Limits and
Miscellaneous control family for details.
If a part program attempts to move beyond a soft limit, then it will raise an error.
The soft limits values are also used to define the cutting envelope if Machine is selected for the toolpath
display. You may find them useful for this even if you are not concerned about actual limits.

BTW, your jewelry are very well made, very nice , keep posting
Title: Re: Index switch / limit switch
Post by: vmax549 on May 20, 2009, 12:00:02 AM
CHris IF you set up the switches as limit switches it will do as you ask(;-) You can also have the same switches as home switches as well. Mach knows the difference in when to use them IF they are set up correctly.

Just a thought, (;-) TP
Title: Re: Index switch / limit switch
Post by: Chris.Botha on May 20, 2009, 12:33:32 AM
thanks guys.. ok so if its not too much trouble can someone explain where and how i need to change this.. im a bit clueless?  what im after is setting a limit to how far back and forward my mill can travel.. in X Y and Z

so it must never be able to go below 0 for example? but still be able to home? hmm i dont even understand what im asking anymore...

ok ill take pics of my settign screens and physical switches  later and you can make suggestions?
Title: Re: Index switch / limit switch
Post by: Hood on May 20, 2009, 01:48:48 AM
This is how the limits/home work for combined switches.
 If you are doing a homing move the limits will be treated as home switches, Mach will move one axis at a time (if using Ref All to home) until a switch is seen and then back off until it closes again, home is set for that axis and Mach moves the next axis and repeats until all axis are homed.
 When Not homing the switches are treated as Limit switches and if you touch them Mach will E-Stop. You can have Auto Limit Override enabled which will allow you to press the Reset button and then Jog back off of a limit switch, this will be at a reduced speed for the first press of the jog key, this is just in case you inadvertantly jog the wrong direction and gives you time to react.

Next is soft limits, they are from Config menu then Homing and limits. What they will do is stop the machine from ever hitting the physical limit switches and also when you press Start it will give you a warning if the code if going to take you outside of any softlimit.
 To set the softlimits you set the X and Y Minimum and the Z Max as Zero, the X and Y Max are set to the length of travel on these axis and the Z Min is set likewise but using a negative number. You then have a slow zone and this is to allow Mach to slow down to a crawl so it can creep right up to the limit switch but not overshoot and hit it. The size of slow zone will depend on the Accel/Decel of your machine, if a fast Accel then the distance will be small, Slow Decel and it will have to be bigger, the only way to fnd this distance is through trial and error by jogging at full rapid towards a limit and see if the SoftLimits can stop the axis in time before the physical limit is tripped.

Title: Re: Index switch / limit switch
Post by: RICH on May 20, 2009, 02:09:24 AM
Here's a llink to info on homing set up "without limit switches" / just soft limits that may save you some time.
You just need to build on it some from what Hood posted.,11409.msg72346.html#msg72346

Title: Re: Index switch / limit switch
Post by: Chris.Botha on May 20, 2009, 03:28:39 AM
oh ok got it now!

thanks a million guys.. got a cut on right now, will test after :)
Title: Re: Index switch / limit switch
Post by: jimpinder on May 20, 2009, 03:57:12 AM
The entirely mechanical solution is to alter your "switches". I use small laser modules, shining on detectors - i.e. the "switches" never make physical contact and are completely protected. Another advantage is I can also have several detectors at different positions, to stop the carriage at different points. I have a combined lathe/mill and have a different set of limit and home switches for each "mode" - same lasers (2modules), different detectors (6)
Title: Re: Index switch / limit switch
Post by: TRX on May 23, 2009, 04:05:51 AM
 Laser?  Do you have pictures of this somewhere?  Commentary?

 Of all the work it took to do my CNC conversion, the limit switches were the biggest pain in the posterior, and I have this bad feeling that they're going to be a problem eventually...
Title: Re: Index switch / limit switch
Post by: jimpinder on May 25, 2009, 04:27:56 AM
The two laser modules, which are 2 inches long and 1/2 inch dismater (certainly less that that) run off a 5 volt supply. You can get tham fitted with lenses to give amore focused output. I got mine from Maplin (UK firm) at £10 each. The dtectors are three wire Schmidt trigger devices, giving an instantaneous change fro 5 to 0 v if hit by a laser beam. They drive TTL and CMOS directly.

I have my lasers mounted on the table shining onto detectors mounted on the lathe body. There is no physical contact between the two, indeed, they with work over a long distance if required.

Excellent, repeatable results, to less than 2/100ths of a mm.