Hello Guest it is July 14, 2020, 06:58:10 PM

Author Topic: homing limits problems  (Read 5223 times)

0 Members and 1 Guest are viewing this topic.

Offline kak

*
  •  81 81
    • View Profile
homing limits problems
« on: February 28, 2008, 05:57:20 AM »
Hello
I`m a newbe, and can`t figure out how it works. I have a homebuild 3 axis machine and I want to make some test mills, but the safety comes first.
I have 3 normaly open home switches signed to pins 10, 12 ,13, and 3 normaly closed limit switches in series - pin 11.

1. When I hit one of the switches, I can still move the steppers with arrows and page up/down buttons - is that normal?   
I just want the machine to stop when it hits one of the switches - when I use arrows buttons and I can`t.
I want to be shure that the switches are working before I start to mess with software limits.
As I said I`m a newbe and I don`t know how it`s supposed to work, but are all the switches a kind of e-Stop switches?   Or the home swiches has to be activated/pressed when homed?

2. In the Input Signals window I have only marked the X Home, Y Home and Y Home, but what is the X++ and X- for?
Is X++ the limit and X- the home switch?

3. Is there a field where I can type the pitch of the lead screw? That`s because when I type G0 X5 the x axis is moving about 8cm?? 
My motors are 200 steps per revolution but I run 1/2 step. That gives 400 steps per rev. My lead screw has a pitch of 1mm, so I typed 400 in the "Steps pr unit" field. But the software doesn`t know abouth the lead screw pitch, does it?

Thanks
Adam

Offline bowber

*
  •  216 216
  • Kirkby Stephen,Cumbria, UK
    • View Profile
Re: homing limits problems
« Reply #1 on: February 28, 2008, 06:25:20 AM »
Hello Adam and welcome to the world of CNC.

I'm no expert but my system seems to work ok so I'll try to help you.

The X++ & X- are the travel limits, one for the + direction and one for the - direction.
You can put all your switches in series and have them all on the one pin, stick to normally closed as this is fail safe. If a wire breaks then the system will stop and you'll have to find the break, possibly fustrating at the time but better than crashing into the end of travel as would happen with N/O switches.

You can use one of the travel limit switches as a homing switch as well, Mach only homes one axis at a time so the switches being in series will not be a problem (this assumes you want home at the end of travel) Off the top of my head I can't remember the settings you need to use but there has been much disscussion on recently about this subject so do a search on previous posts.
Also look at some of the video tutorials and the pdf manual, they both have information about limits and homing switches.

Steve

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: homing limits problems
« Reply #2 on: February 28, 2008, 06:27:02 AM »
OK Home switches are for referencing the machine at startup so that Mach knows where it is. The ones you are wanting is the X++  X-- etc as they are the limit switches which will stop your machine if triggered. You can however set one of these switches on each axis as Home switches also, ie desgnate the same pin as you have for a limit.
 I dont know how you have your switches set up as you seem to have six switches, you could probably get away with the three normally closed switches, one for each axis and just have them triggered when they go to either end of the travel. If you can do this then you can have these 3 switches wired up in series, using 1 pin and tghey would work as X Y Z limit switches and X Y Z home switches.
Hood

Offline kak

*
  •  81 81
    • View Profile
Re: homing limits problems
« Reply #3 on: February 28, 2008, 08:03:02 AM »
Thank you for the quick answers.

I think I have to do some soldering and try again. 
Will the switches stops the motors also when I jog or use the arows keys?

But what about the lead screw pitch? The software only knows , that the motor needs 400 steps to rotate my lead screw 1 revolution.   But doesn`t know the pitch of one revolution?
There must be a field somewhere where I can type the pitch value.

Adam
 
« Last Edit: February 28, 2008, 08:13:43 AM by kak »

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: homing limits problems
« Reply #4 on: February 28, 2008, 08:48:07 AM »
Yes the limits will stop everything when hit.

You dont need the pitch, what you need is steps per unit. To find out the steps per unit you need to know the amount of Revs to do 1 unit (inch or mm depending on your setup) then you find out how many steps you need for your motor to do one Rev (normal steppers are 1.8 degree, 200 steps per rev) you also need the gearing if any and lastly if your drive is full, half or micro stepping.
As an example
So say your leadscrew is 0.2 pitch that means you need 5 turns for 1 inch
Your steppers are 200 steps per rev
Your drives are 10 micro steps
Your gearing is 2:1
The calcs would be
 5 x 200 x 10 x 2 = 20,000 steps per unit (inch)
This is what you eneter in the motor tuning.
Hood

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: homing limits problems
« Reply #5 on: February 28, 2008, 12:26:23 PM »
Your maths seemed alright when you were calculating the pulses per unit. I assume your unit is millimeters. You are saying your motors are 200 steps per rev and the drivers are set to 1/2 steps. Therefore your motor will need 400 pulses to turn one rev and one rev of the motor turns the shatf forward by 1 mm - so you are correct - 400 is your answer - but you seem to be saying your axis is moving 8 mm instead of 5 mm when you put in GCode.

There can be many reasons for that, because Mach3 can take into account all sorts of offsets, so move the axis from 0 to 10 first, then move from 10 to 20 - measure the second movement - which should be 10 mms. This should be correct. Do not come back, or you will have to take into account backlash - which is another problem.

With your switches, you must understand the difference. LIMIT switches are what they say. They limit the movement of the axis, and, as such, however they are activated, should stop the axis dead. There are various settings that then allow you to back off the switch to get going again. (There are excellent videos to watch which explain all this)

HOME switches are different. As Hood said you can have the same switch act as a LIMIT switch and also as a HOME switch - the computer switches off the "LIMIT" action if it is using it as a home switch. The way a "HOME" switch works is that the computer will run the axis up to the home switch. The switch then switches and stops the axis. The computer then reverses direction and moves the axis off the switch untill it opens (or closes) again, then stops. The computer can, then, set the Digital Read Out's for the axis at 0 if you wish (or at any other figure). The computer then knows exactly where the machine is, and can compute all it's next moves from there.

You will find fitting and setting up Limit and Home Switches quite tedious. Home switches must be accurate. The way to test these is to home the axis, then knock off the auto zero facility and try homing the switch again a few times. The answer should always be 0 of course, but it is a test of your machine to see if that is actually the case. A few thous might be a more realistic answer.

I do not bother with limits or homes on my lathe - which I set up for each job - and I am staisfied then that it is accurate.
My lathe also has a milling head, and whilst I do not do too much milling, I prefer to set each job off from a know position, usuallly the bottom left hand corner of the job, with Z resting on the work.

Since I am not trying to run off thousands of parts, this satisfys me, but each to his own!!

Not me driving the engine - I'm better looking.

Offline kak

*
  •  81 81
    • View Profile
Re: homing limits problems
« Reply #6 on: February 28, 2008, 02:17:54 PM »
Thank you for the great explanations.
Now my machine stops when it hits a switch and moves a little bit the other way.
But still there is something wrong. When I hit the switch and then hit it again, I can`t reset or move anything. I mus play with the switch assignment a bit.

But now I can`t zero the Machine Coord`s.  My X is -64 in home position and I can`t zero it. I have try many different things, but it`s not working. The mach3 videos starts with the machine coords in zero, so there isn`t much help there.
I`m so close to end the setup :-) 
Sorry for all the questions, but I´m tryin to find some answers somwhere else, before I ask here in this forum.

Adam

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: homing limits problems
« Reply #7 on: February 28, 2008, 02:44:48 PM »
OK the first time you hit the switch and it reverses I am presuming you mean you are pressing Ref All button and it does the homing move, that is what it should do, ie move to home, break the switch, Mach reverses, switch close and Mach is homed.
 Now to the next time you hit the switch, if you are not doing a homing move then the switch is seen by Mach as a limit when it gets hit Mach stops everything as it should. You can do one of two things here, you can press the Over ride limits button or you can have the Auto override button active. If you use the standard override you can press it when you have hit a limit, you will then be able to presss the reset button then Jog off the switch. If you have the Auto override active then if you hit a limit you can just press the reset and jog off. When you have hit a limit and are jogging off the speed will be reduced, this is a safety thing so that if you accidentaly jog the wrong way you will not do so at full rapid.
 Your zero problem may not be a problem, when you do a home move press the Machine coords button and see if it says zero, if yes then all is well as the numbers you were seeing previously are your offset numbers. The Machine coords are used by Mach to keep a track of where your machine is, the Offset coords are used by you to set upo the zero position to where you want to start your work.
Hood

Offline kak

*
  •  81 81
    • View Profile
Re: homing limits problems
« Reply #8 on: February 28, 2008, 03:30:29 PM »
Thanks Hood. Now I really understand the difference between Homing and Limits.

But about the zero, my Offset Coord`s are zero, and I can make them zero at any position.  But the Machine Coords after homing, are Zero somewhere outside my table . I can`t use Software limits because of that.
Why can`t  I  just  press the zero X, zeroY and zero Z like I can with the Offset Coords - that will solve the problem.

Adam
Re: homing limits problems
« Reply #9 on: February 28, 2008, 03:38:27 PM »
Adam,
Is "Auto Zero" checked ? See pic.
It's under Config.
RC