PDA

View Full Version : Home proximity switch activating, axis reversing but then moving forwards again?



chillybo
12-06-2020, 12:12 AM
Hi there, much more knowledgeable people,
After finally getting some free time I am now at the stage of my build where I can do some wiring to the machine (gantry style router, CS Labs IPM, 3 axis, proximity switches mounted sideways on, Mach 3 etc). So I have just wired my first proximity home switch for the gantry and when I click home, off the gantry goes to the home sensor which is then activated and the gantry backs off. Problem is it then reverses direction and carries on towards a collision. Is this something to do with home and limits settings in mach 3 and the sideways / perpendicular mounted proximity sensor? I've tried experimenting with parameters but I'm not sure what i'm doing. Can anyone please advise why this is happening?
Thanks Chris

Kitwn
12-06-2020, 02:15 AM
Not sure about Mach3 but in LinuxCNC the gantry runs to the switch at relatively high speed, backs off a few mm and then runs back to the switch again more slowly to get a more consistent homing reference. It finally backs off again to the set parking position.

One guess would be your final parking position is a negative value on the wrong side of the switch.

JAZZCNC
12-06-2020, 08:37 AM
Can you post some pics of your home and limits setup screens. It's 99.999% just a setting but without seeing your settings i'd be guessing. Or better still post your XML file which you will find in the mach3 folder under the same name as the profile you use. You will need to Zip it up so the forum will allow you to upload it.
Then I can see all your settings.

chillybo
12-06-2020, 12:40 PM
Thanks Jazz,

28353

Hope I've attached the zipped XML file and not something else.
I altered home and limits to the new settings that should be showing on the XML file and it now works. Problem is that if I alter the home speed above 3% the machine makes an awful noise and the gantry doesn't move. The noise is high pitched and changes depending on the home speed. It doesn't sound like when a stepper motor stalls.

Thanks Chris

chillybo
12-06-2020, 04:25 PM
It also makes that noise when I press shift and jog but not when incremental jogging :confusion:

JAZZCNC
12-06-2020, 08:26 PM
Thanks Jazz,

28353

Hope I've attached the zipped XML file and not something else.
I altered home and limits to the new settings that should be showing on the XML file and it now works. Problem is that if I alter the home speed above 3% the machine makes an awful noise and the gantry doesn't move. The noise is high pitched and changes depending on the home speed. It doesn't sound like when a stepper motor stalls.

Thanks Chris

Didn't work not seeing any thing in the zip

chillybo
12-06-2020, 10:06 PM
Jazz and folks, here's a couple of pictures - home limit screen and motor tuning screen - if that's got anything to do with it.

2836328362

JAZZCNC
12-06-2020, 10:11 PM
What units are you using Metric or imperial.?

chillybo
12-06-2020, 11:29 PM
metric

Clive S
13-06-2020, 08:49 AM
metric

Did you see Jazzcnc quote "Didn't work not seeing any thing in the zip" How can anybody help with one word answers.

I would suggest have another go at posting the XML file and checking it works you might be able to post it by changing the file name by adding .txt to the end of the file name. ie Mach3.xml.txt

JAZZCNC
13-06-2020, 08:55 AM
metric

Ok well your motor tuning is setup for imperial.!

To set up correctly you need to know the screw pitch and the micro-steps set on drives. Divide the micro-steps by the pitch and this is your steps Per setting. If you have any ratio on the motor then you'll need to factor that in as well.

The velocity and acceleration you will have to set according to the machine by adjusting until motors stall then back them off 25%. Vel =2000 Accel=500 is a good starting point if you are unsure. If a router can't do those speeds it's not much use as a router.!!

chillybo
13-06-2020, 01:23 PM
Thanks Jazz, The drivers are set at 1600 and the ballscwews have a 5mm pitch. I have a 26 tooth driver pulley and a 20 tooth driven pulley. So do I divide 26 by 20 which gives 1.3 then add it on to 5 = 6.3 so the calculation is then 1600 divided by 6.3?
Thanks again Chris

Muzzer
13-06-2020, 04:14 PM
You will want to multiply the ratios, not add them. So 1600 multiplied by 1.3, divided by 5. So 416 unless I misread?

chillybo
13-06-2020, 07:53 PM
So I tried my formula for the motor tuning and it seemed to solve my origanal problem (the awful noise and no movement when continuosly jogging or setting the homing speed percentage anything above 3%). Muzzer, when I altered it to your formula (with the resulting value of 416) the issues came back. Anyway changing it back to what I thought it's now homing nicely on X and Y, next job is to wire Z home proximity switch.
Just a thought though, perhaps 1600 divided by (5 x 1.3) maybe correct way to do it. Seems logical?

chillybo
13-06-2020, 09:18 PM
That calculation also works and isn't far from the origanal value. :indecisiveness:

JAZZCNC
13-06-2020, 09:21 PM
Thanks Jazz, The drivers are set at 1600 and the ballscwews have a 5mm pitch. I have a 26 tooth driver pulley and a 20 tooth driven pulley. So do I divide 26 by 20 which gives 1.3 then add it on to 5 = 6.3 so the calculation is then 1600 divided by 6.3?
Thanks again Chris

Come on boys think about it and what the ratio is actually doing.? . . . . If it was 1:1 then 1600 / 5 =320 steps to travel 1mm. But you have a larger pulley on the motor so the screw travels 1.3 revolutions for one revolution of the motor. Or put another way 6.5mm per revolution. So to move 1mm we need fewer steps per mm not more.

There is a long-winded formula in the manual but the 1.3 was correct but you need to divide the 320 by 1.3 or 1600 / 6.5 which gives 246.1538 plus load more numbers but that will work.

Now Chillybo, you need to know the Steps per setting isn't something you can guess at or set to any number you like because it's an exact calculation based on pitch and ratios etc so it must be correct or the machine will never move the correct distance or be accurate.

Mach3 does have a feature that will calculate the steps per setting for you and I suggest you use it when using belts as it works using the distance traveled.
Go into setting Tab and just above the Reset button you'll see it says "Set steps per unit" Click it an follow the instructions. You will need an accurate measuring device, a tape measure isn't good enough. If you have a set of Digital calipers use them or a very good steel rule at worst.
The more accurate you can measure the better it will be.

JAZZCNC
13-06-2020, 09:34 PM
Just a thought though, perhaps 1600 divided by (5 x 1.3) maybe correct way to do it. Seems logical?

Didn't see that bit but yes that's correct.

chillybo
13-06-2020, 10:26 PM
wow I got it right. I've got digital calipers and a digital height gauge so i'l do some measuring and use that feature in neccessary. Going to finish wiring z home tomorrow and I'l put a celebratory video of it homing on here. Thank you for being so helpful guys:adoration:

chillybo
14-06-2020, 01:52 PM
Moving home!


https://www.youtube.com/watch?v=_u_gi4uGSPo