CNC Question: Limit Switches

GBCues

Damn, still .002 TIR!
Gold Member
Silver Member
Hey Guys,

Well, after a year or so, I finally got my CNC "taper bar" to working condition. This was my first CNC project, so there was a long learning curve and I'm already seeing things I could do to improve it or do better on my next project.

But today's question has to do with limit/homing switches. Without violating the "no source" rule here, can some of you guys give me an idea of the switches you use? I dabbled in the optical switches early on and have some I could put in use, but they're kind of a PITA. I've been told the mechanical micro limit switches are not accurate/repeatable enough - at least for an inlay machine - mine is strictly a shaft/butt tape machine.

Googling "precisin micro switch" gives a lot of hits, but many seem overly large for a cue-lathe application.

Just wondering.

Thanks in advance,

Gary

For the curious:
 

Attachments

  • IMG_0866.jpg
    IMG_0866.jpg
    100.6 KB · Views: 1,062
  • IMG_0867.jpg
    IMG_0867.jpg
    97.4 KB · Views: 1,001
  • IMG_0868.jpg
    IMG_0868.jpg
    97.3 KB · Views: 1,007
limit switches don't have to be all that accurate. They should not be used for"home Positions" but rather are to prevent the axis' from overtravel,,,,,,,
 
What optical switches do you have?

Ok Gary, what do you have in the way of switches? How are you wiring these switches? You know what a limit switch is as they are wired on your machine. Are your limit switches wired in series or are they individually wired? How many inputs do you have left on your controller? Do you understand how setting a home position will help? Just for the record, I love home switches on mine.
Just getting a feel for what you know so please don't be offended.


Jim.
 
This is the one I use in X and Y - Omron

K
 

Attachments

  • Omron.jpg
    Omron.jpg
    91.3 KB · Views: 961
Ok Gary, what do you have in the way of switches? How are you wiring these switches? You know what a limit switch is as they are wired on your machine. Are your limit switches wired in series or are they individually wired? How many inputs do you have left on your controller? Do you understand how setting a home position will help? Just for the record, I love home switches on mine.
Just getting a feel for what you know so please don't be offended.


Jim.

Jim,

No offence taken - I figure you've forgotten more than I know about CNC!!

I got the switches from Hubbard CNC on eBay and I see they don't carry these any longer. The red side says "Micro Switch, Freeport, Ill" the other side says "VL3-2" and the electrical specs.

The switches are all wired as home runs back to my Gecko G-540 controller. I am using X as my long axis and the Home, Minimum limit switch is a single unit, I have a Home/Minimum Y switch and a Maximum X switch. In general, they do a good job, but I'm seeing some variation in repeatability. +/- .002".

Having the switches set up as Home Switches is great!!

Thanks for replying!!

Gary
 

Attachments

  • IMG_0870.jpg
    IMG_0870.jpg
    94.5 KB · Views: 1,046
Ok look for these.

Gary the mechanical switches are only good for limit. You will want to wire them in series and use them on your g540 between pins 10 and 12. I think that's correct. You will want to wire them normally closed so that when the switch is activated it breaks this e-stop chain. That way if any of them are active then your in e-stop. Now you will want to have a bypass switch that is normally open in parallel with the entire limit system so that if you hit a limit you can bypass for short term. Now wiring them this way saves all of your inputs for home switches. Now then, you will want to use a photo switch. These are the best as they will switch in the same spot every time. Look for the 941w ver. of this: http://www.optekinc.com/datasheets/OPB930-940-L&W.PDF. They should be easy enough to find. I would suggest Jamco or Digikey. You will also need some sort of resistor setup to correctly prep the switch to match your input into the G540. I am not sure what you need as I run directly into the 3rd printer port of my smooth stepper. Mounting is a pain however it is worth it. Now then since this is a lathe, have you cut your Y axis pulses in half? I like to work in diameter on the DRO. This way I can just measure and type my exact caliper readings. That being said, the center of your turning spindle should be Y 0.000

Let me know if this makes sense.

Jim.
 
Gary the mechanical switches are only good for limit. You will want to wire them in series and use them on your g540 between pins 10 and 12. I think that's correct. You will want to wire them normally closed so that when the switch is activated it breaks this e-stop chain. That way if any of them are active then your in e-stop. Now you will want to have a bypass switch that is normally open in parallel with the entire limit system so that if you hit a limit you can bypass for short term. Now wiring them this way saves all of your inputs for home switches. Now then, you will want to use a photo switch. These are the best as they will switch in the same spot every time. Look for the 941w ver. of this: http://www.optekinc.com/datasheets/OPB930-940-L&W.PDF. They should be easy enough to find. I would suggest Jamco or Digikey. You will also need some sort of resistor setup to correctly prep the switch to match your input into the G540. I am not sure what you need as I run directly into the 3rd printer port of my smooth stepper. Mounting is a pain however it is worth it. Now then since this is a lathe, have you cut your Y axis pulses in half? I like to work in diameter on the DRO. This way I can just measure and type my exact caliper readings. That being said, the center of your turning spindle should be Y 0.000

Let me know if this makes sense.

Jim.

Wow Jim, sounds to me like you are all over this,,,,,,but I have one question,,,,why are you using "Y" for diameter,,,,metalworking turning centers use X for diameter and Z for length,,,,,,which is also the way most post processors output turning code,,,,,,,just wondering

(apologies to the op for veering off topic,,,,,,,this just caught my eye)
 
Renegade,

You're absolutely right about this, but I choose to program all my turning machines this way.

Here's why.

Basically, I look at it like it's a mill. So X is the lateral axis, Y goes front to back, and Z of course is the router up and down. By keeping it as a mill, I tremendously reduce the confusion found when going back and forth between machines. I find it much easier to hand code all my turning routines rather than build them out as profiles or 3d models and try to post code from that. Even with multiple passes, big radius' and such, our codes are very simple, usually not more than a dozen or so lines. I've had several friends who called me asking about how to draw the shaft in 3 dimension in BobCad. I tell them I have no idea! Actually, I can, but it's just allot quicker and easier to write the code. My code is also simple and easy enough that even they rookies can grasp it very quickly when the start out. It's almost like a training program.

Now, if you're talking about internal threading, or joint or butt work, that's a different story.

That's how it works for me anyway.


Royce Bunnell
www.obcues.com
 
Last edited:
Wow Jim, sounds to me like you are all over this,,,,,,but I have one question,,,,why are you using "Y" for diameter,,,,metalworking turning centers use X for diameter and Z for length,,,,,,which is also the way most post processors output turning code,,,,,,,just wondering

(apologies to the op for veering off topic,,,,,,,this just caught my eye)

Oh yes, good question. I like others have cut my teeth on Mach 3 Mill software. The mill software is better than the lathe software for instance the screen lay out. I understand the difference between both but prefer to use mill. I use a 3 axes mill for live turning using the forth axis stepper as a turning spindle. Keeps my life simpler if that is possible. I at one time use the same machine for both turning and inlaying cues and used a profile loader to switch between the two. By the way, you are correct, The cross slide on a lathe should be X and the long travel toward and away from the spindle would be the Z axis. I think Gary knew that as he explains that his long travel was the X axis to clarify.

Jim.
 
Gary the mechanical switches are only good for limit. You will want to wire them in series and use them on your g540 between pins 10 and 12. I think that's correct. You will want to wire them normally closed so that when the switch is activated it breaks this e-stop chain. That way if any of them are active then your in e-stop. Now you will want to have a bypass switch that is normally open in parallel with the entire limit system so that if you hit a limit you can bypass for short term. Now wiring them this way saves all of your inputs for home switches. Now then, you will want to use a photo switch. These are the best as they will switch in the same spot every time. Look for the 941w ver. of this: http://www.optekinc.com/datasheets/OPB930-940-L&W.PDF. They should be easy enough to find. I would suggest Jamco or Digikey. You will also need some sort of resistor setup to correctly prep the switch to match your input into the G540. I am not sure what you need as I run directly into the 3rd printer port of my smooth stepper. Mounting is a pain however it is worth it. Now then since this is a lathe, have you cut your Y axis pulses in half? I like to work in diameter on the DRO. This way I can just measure and type my exact caliper readings. That being said, the center of your turning spindle should be Y 0.000

Let me know if this makes sense.

Jim.

Jim,

Thanks so much - this all makes great sense. I have already run into the problem of hitting a limit and having to manually back out of it - having the bypass switch will simplify this. I do run the center of my spindle as Y 0.000. I will look into cutting my Y pulses in half - that should cut down on all the recalculating of the next cut/pass.

Thanks to all of you for the input!!

Gary
 
Jim,

I guess I have to backtrack and say that while I understand the theory, I don't understand how to implement it.

You talked about having the spinning axis (center of shaft) set to Y=0.00 and halving the Y-steps so that it's easier to use a diameter value in your G-code. But if the center of the shaft is 0.00, how do you set up the homing/reference value for your Y-axis in Mach3? At first I thought it might be the Home Offset setting in Homing/Limits, but after reading the manual on that parameter, I don't think so.

According to the manual - Ref All Home will always set the reference coordinates for the individual axes to 0.000. As I understand it, I would want my reference value to be +1.500 inches (for my setup).

Thanks for your help!

Gary
 
Jim,

I guess I have to backtrack and say that while I understand the theory, I don't understand how to implement it.

You talked about having the spinning axis (center of shaft) set to Y=0.00 and halving the Y-steps so that it's easier to use a diameter value in your G-code. But if the center of the shaft is 0.00, how do you set up the homing/reference value for your Y-axis in Mach3? At first I thought it might be the Home Offset setting in Homing/Limits, but after reading the manual on that parameter, I don't think so.

According to the manual - Ref All Home will always set the reference coordinates for the individual axes to 0.000. As I understand it, I would want my reference value to be +1.500 inches (for my setup).

Thanks for your help!

Gary

Gary, thanks for posting the question here. Ok to start with I am glad that you understand why you want the Y axis to be zero at the center of your turning spindle or shaft. Now then when you reference an axis you are setting Machine zero. This should not be confused with your work offset (generally G54) to zero. I too home my Y axis in a positive direction. The G54 work offset will be the difference between Machine Zero and G54 Zero. This way when I home out Y axis the cutter is going away from the center of the spindle. I will not run my cutter into something. Now Mach3 makes it easy to set your Y zero position after reference. As an example I would home out my machine setting Machine zero, then I would jog up until my cutter just touches my wood in the turning spindle. I would then take the diameter of the wood where I am touching and enter that value into the Y axis DRO that shows the current work offset. I would then take a test cut on the piece of wood to further check the Y axis position. I would then measure again after the cut and adjust my DRO to match. It will be close however this will make it accurate. Now then you can save your work offsets at this point ( the difference between machine zero and work offset zero) or exit out of Mach 3 and Mach will ask if you want to same fixtures or something like that. At this point choose yes as Mach is saving your work offsets. Next time you load Mach3 home out your machine and command your Y axis to "G0 Y 2.5" in MDI or what ever your safe zone should be. It should move your cutter to 1.250" away from your center of turning spindle.
Please check out this video from Mach's web site. Art does a really good job of explaining most of this on his homing, limits, and offsets video.
http://www.machsupport.com/videos/

Jim.
 
Back
Top