PDA

View Full Version : General Question: How Do CNC Programs Handle Limit Switches


Paul Alciatore
06-20-2009, 12:07 AM
I am doing some design work and would like it to be as general as possible. Machines with motor drives need some kind of limits to prevent running into the stops and causing various types of damage.

What I am curious about is how are these limits usually implemented. I have seen some dedicated systems on other kinds of machinery with DC motors where there are limit switches that interrupt the current to the motors when they are activated. One switch on each end of the range and steering diodes to allow reverse current to flow so the motor can turn the other way. But this would not work with steppers. So how is this handled? Do CNC machines usually have actual limit switches to detect the end of travel in each direction? Would these switches connect to the computer/software or do they just go to the motor controller boards? Or is this done completely in the software with no switches at all? Or what?

toastydeath
06-20-2009, 12:14 AM
There are two kinds of limits in commercial-level CNC hardware - soft and hard.

Soft limits are based on the home position. If the machine tries to go outside a set distance from the home position, the machine decelerates gracefully, throws an alarm, and breaks program execution. It also prevents that axis from moving in the direction of the soft switch until you clear the alarm.

The second kind is a hard limit - the machine kills power to ALL the servos, stopping it dead. There is an emergency release button on the machine - this forces the power to the servos and servo drives back on while it is held. When Emg. Release is held, you can move the axis in ANY direction, to the point of physically damaging the machine. I can walk a machine off the ballscrew, crush the spindle, or any number of other things with emg. release and the machine will faithfully do it.

So at least on the machines I use, there's no half kill for the power. It's either a logical half-kill, or a physical total kill/total recovery.

macona
06-20-2009, 03:36 AM
There are more options than that. Most commercial servo drives have limit switch inputs built in. When it is triggered the drive will inhibit motion in that direction but not in the direction opposite of the limit. The drives in my mill have this option as well as the Mitsubishi drives in my lathe. I have not used this option though as I would have to do some rewiring on my mill and I am using limits as home switches as well on my lathe. I am not sure if the limit inhibit would interfere with the homing routine. I want to try to tie in the encoder with the limit on my lathe to get a more precise homing.

Paul Alciatore
06-22-2009, 01:10 AM
Thanks guys, your answers are a big help.