× Forum Header

limit and home switch

More
02 Dec 2014 21:19 #53602 by gaeldk
limit and home switch was created by gaeldk
Hello,

I have a classic stepper machine. i have a limit switch on :

- the max of Z (Z going from 0 to -250)
- the min of Y (0 to 900)
- hte min of X (0 to 600)

I would like, each time I turn on the machine, to rehome the G53 at the limit switch position.
So for example Z moves back up to 0.

I know which // port pins my limit switches are using. For example the Z home limit switch in on PIN 12.

So to configure this I suppose I have to set pin 12 on the // port setup to : Maximum Limit + Home Z Is this correct ?

How then to avoid a "limit swith error" when homing ?

Also is there a way to set up the speed of homing procedure ?

thanks for your help

Please Log in or Create an account to join the conversation.

More
03 Dec 2014 00:22 #53608 by ArcEye
Replied by ArcEye on topic limit and home switch
Hi

I know which // port pins my limit switches are using. For example the Z home limit switch in on PIN 12.

So to configure this I suppose I have to set pin 12 on the // port setup to : Maximum Limit + Home Z Is this correct ?

How then to avoid a "limit swith error" when homing ?

Also is there a way to set up the speed of homing procedure ?


If you set up say
Pin 10 Minimum Limit and X Home
Pin 11 Minimum Limit and Y Home
Pin 12 Maximum Limit and Z Home
in the pin selector tab

The config that is output will have entries like this
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 937.5
SCALE = 80.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 200.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 1.500000
HOME_LATCH_VEL = 1.500000
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1

[AXIS_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 937.5
SCALE = 80.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 200.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 1.500000
HOME_LATCH_VEL = 1.500000
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2

[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 937.5
SCALE = 80.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -100.0
MAX_LIMIT = 0.001
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 1.500000
HOME_LATCH_VEL = 1.500000
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0

Search and Latch velocities are set in your machine units ( these are mm )
HOME_IGNORE_LIMITS is also set

To speed up homing you could:-

Set all axes to HOME_SEQUENCE = 0
then they will all home at the same time

Jogging within a gnats breath of the switches, before pressing Home also helps greatly

When I finish for the day, I do a G28 then jog just off the switches
Next day I just press F1, F2 and Ctrl Home and I am set to go

regards

Please Log in or Create an account to join the conversation.

More
03 Dec 2014 02:53 #53613 by cncbasher
Replied by cncbasher on topic limit and home switch
your getting the limit switch error , because your not moving off the switch before setting 0 , so when the logic switches from homing to limit it sees the switch active
easy way is to move forward just clear of the switch and then make that the home position

Please Log in or Create an account to join the conversation.

More
04 Dec 2014 00:30 #53641 by gaeldk
Replied by gaeldk on topic limit and home switch
Thanks both for your answers, really appreciate the help.
I don't fully get your suggestion. :unsure:

The desired behavior is that when I home :
STEP 1) My machines moves slowly towards the combined home/limit switch - which is OK now
STEP 2) the machine stops when the limit switch fires and gets ready to move in the opposite direction. Eventually even better it could clear off the home/limit switch by itself

Right now it does STEP1 but then I get a limit switch error and can not use the machine without disabling the limits... which is not practical and a bit dangerous

My INI file looks like below for the Z axis (which is my test axis), I will replicate on the others after I am successful getting the right behavior on Z.
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 35.0
MAX_ACCELERATION = 130.0
STEPGEN_MAXACCEL = 162.5
SCALE = 160.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -280.0
MAX_LIMIT = 0.001
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 0.050000
HOME_LATCH_VEL = 0.050000
HOME_IGNORE_LIMITS = YES

As you can see HOME_IGNORE_LIMITS is set so I don't get what the issue is and why the error blocks everything in AxisGUI.
I am on LinuxCNC 2.6.4

Please Log in or Create an account to join the conversation.

More
04 Dec 2014 00:37 #53643 by BigJohnT
Replied by BigJohnT on topic limit and home switch
Add enough to home offset to finish up "off" the switch.

JT
The following user(s) said Thank You: gaeldk

Please Log in or Create an account to join the conversation.

More
04 Dec 2014 01:04 #53644 by ArcEye
Replied by ArcEye on topic limit and home switch

Add enough to home offset to finish up "off" the switch.

JT


Thanks John

That is what cncbasher was saying too, because I forgot to cover it

Your home position needs to be inside your limits and since you are using the same switch you need to set an offset in the
HOME_OFFSET =
that brings you inside the limits and off the switch.

Thereafter you can return to home and not hit the limits

Hope that clears it up

regards
The following user(s) said Thank You: gaeldk

Please Log in or Create an account to join the conversation.

More
04 Dec 2014 01:16 #53646 by gaeldk
Replied by gaeldk on topic limit and home switch
Thanks guys,

But unfortunately another problem showed up :dry: :(

In the homing procedure of Z axis, after max_home_z signal has been set to TRUE by reaching the switch (I use the HAL METER to check), the machine moves down as it should and clears from the switch BUT the signal never goes back to FALSE. So the Z keeps going down trying to clear from the switch although it already did...

If I stop and restart Axis (without doing anything to the machine) and then use the HAL METER again then the max_home_z signal is FALSE as it should be ...

What could be the reason for the signal not to be properly refreshed after it fired ?

Please Log in or Create an account to join the conversation.

More
04 Dec 2014 01:38 #53648 by BigJohnT
Replied by BigJohnT on topic limit and home switch
Could be a bad switch or an electrical problem.

JT

Please Log in or Create an account to join the conversation.

More
04 Dec 2014 19:13 #53680 by gaeldk
Replied by gaeldk on topic limit and home switch
Hello,

Spent all evening yesterday and this morning checking all the wires with a multimeter and pocket digital probe... all ok on the machine...

Then in a last minute desperate move, I changed PC, did not change the // cable just changed PC... to an older machine in my garage running the same debian wheezy linuxcnc (athlon X2, about 10 years old) and then...

it WORKS ! :woohoo: The switch probe properly switches back to FALSE when moving of the sensor....


So the problem is with the brand new PC I just got ! I talked a bit about this new PC in the thread : HERE

But the config is :

Debian Wheezy Xfce / Kernel 3.4-9-rtai-686-pae

So my conf is Q1900M
Intel Speedstep : Disabled
CPU C States support : Disabled
Ehanced Halt state (C1E) : Disabled
No Execute Mem protection : enabled
Intel Virtualization : disabled

IGPU : Enabled
Onboard HD audio : Disabled
Deep S5 : Disabled
PCIE1 Link speed : auto

any idea why the parallel port would misbehave on this small computer ?

thanks

Please Log in or Create an account to join the conversation.

More
04 Dec 2014 21:13 #53683 by andypugh
Replied by andypugh on topic limit and home switch

any idea why the parallel port would misbehave on this small computer ?


It might be due to pull-up / pull-down config of the pins.

How is the switch wired? Typically you only need to connect the pin to gnd with a switch, and it is high with the switch open and low with it closed.
However, it is possible you might need a pull-up to 5V to make that work.

If you have the switch wired to 5V through a switch then try the alternative wiring.

The old PC is probably a 5V p-port and the new one is probably 3.3V. This shouldn't matter when using switch-to-gnd and GPIO.

If you can't make it work then you have the perfect excuse to switch to something better than a parallel port :-)

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum