Hello Guest it is August 18, 2019, 01:29:32 AM

Author Topic: Dual home/limit switches, how to setup?  (Read 7823 times)

0 Members and 1 Guest are viewing this topic.

Dual home/limit switches, how to setup?
« on: October 07, 2012, 04:59:05 AM »
Hi, I'm new to the CNC world but I have a good knowledge of software/hardware in general.

My issue is I have no idea how to configure Mach3 for the limit/home switch setup I have.

Basically there is an inductive sensor on the machine for a rough limit (approx 15mm from one end of the travel) and I also have a hall effect sensor on the back of the steppers for a more accurate home position.



The process, as I see it, would be:
1. Move forward until it hits the inductive sensor.
2. Reverse till the inductive sensor is off.
3. Home using the hall effect sensor on the stepper motor.

I have positioned the hall effect sensor to activate approx 1/2 rotation away from activating the inductive sensor.


Any information is gratefully accepted.

Cheers.
 

Offline Chaoticone

*
  • *
  •  5,570 5,570
  • Precision Chaos
    • View Profile
Re: Dual home/limit switches, how to setup?
« Reply #1 on: October 07, 2012, 05:31:08 AM »
Dual switches arent necessary with Mach.  Most industrial machines work a little different than Mach.  They usually have a slowdown switch and an emergency stop switch.  Their homeing routine is they will travel in the home direction and once they see the slowdown switch they will slow down and begin looking for an index pulse from the encoder. Once it sees the index pulse it will travel a set distance (adjustable by a parameter) and when it reaces that point declare it homed.  The estop switch is incase there is an overshoot for some reason. If the axis activates the estop then it puts the machine in Emergency stop state.  Mach's homing routine is this.  When you refrence an axis it will travel in the home direction untill it sees your limit switch and stop.  It will then go in the direction opposite of home a set distance to clear the now active switch and declare that home position.  In homing and limits there are settings you can use to adjust the homing speed, slow down distance (slow zone, how far from where it thinks the home position is that it goes to speed set in homing and limits) to get pretty accurate results with not so good hardware.  You might be able to set yours up like this.  Run your signal form your rough home position switch to your fine switch as the supply and then use the signal from your fine switch to mach as the home signal.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Dual home/limit switches, how to setup?
« Reply #2 on: October 07, 2012, 06:26:28 AM »
Thanks for the reply.

I was hoping to be able to write a macro to do the smarts, rather than playing with the wiring, but I guess it will have to do.

More electronics will be needed because the sensors are 24v and they have low output currents (>60ma). I'm running 5k ohm resistors on the sensor outputs because the USB controller inputs can only handle 5v/20ma.

Oh well, life wasn't meant to be easy..

Cheers.

Offline Chaoticone

*
  • *
  •  5,570 5,570
  • Precision Chaos
    • View Profile
Re: Dual home/limit switches, how to setup?
« Reply #3 on: October 07, 2012, 10:33:46 AM »
You should be able to do it with a macro if you want to I think.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline BR549

*
  •  6,886 6,886
    • View Profile
Re: Dual home/limit switches, how to setup?
« Reply #4 on: October 07, 2012, 11:38:57 AM »
Most machine that can home to the index do so within the drive itself. You Home the machine then Home the drive.   

I came up with an easy  solution to mimic that but it is a little odd BUT it does work.you set up your axis (X) as normal to home to the switch. ALSO you create a phantom axis say c and use your index mark from you X axis to be the home switch. You also set C to use the same Step/Dir pins and port.

First you call the G28.1 X0 to send the X axis to the home switch then call the G28.1 C0 to send the X axis to home to the index mark.

This was from a long time ago proceed with caution if you use it.

Just a thought, (;-) TP
Re: Dual home/limit switches, how to setup?
« Reply #5 on: October 08, 2012, 07:27:22 AM »
Thanks for the info.. Will give it a try tomorrow.


Cheers.