Homing / limits - the manual is misleading, possibly wrong

More
6 years 7 months ago #159845 by cmorley

3.6. HOME_OFFSET
Contains the location of the home switch or index pulse, in joint coordinates. It can also be treated as the distance between the point where the switch or index pulse is latched and the zero point of the joint. After detecting the index pulse, LinuxCNC sets the joint coordinate of the current point to HOME_OFFSET. The default value is zero.
Note - The home switch location, as indicated by the HOME_OFFSET variable, must be strictly within the soft limits. That is, MIN_LIMIT < HOME_OFFSET < MAX_LIMIT.

It doesn't say the home switch must be within soft limits (they must be within hard limits).
Home offset is the distance from the home switch to the machine origin.
_Machine origin_ must be inside the soft limits.

I tried your home settings in a simulation:
Code:
[AXIS_X] MAX_VELOCITY = 25.0 MAX_ACCELERATION = 750.0 MIN_LIMIT = -245.0 MAX_LIMIT = 0.0 [JOINT_0] TYPE = LINEAR HOME = -0.01 MIN_LIMIT = -245.0 MAX_LIMIT = 0.0 MAX_VELOCITY = 25.0 MAX_ACCELERATION = 750.0 STEPGEN_MAXACCEL = 937.5 SCALE = 80.0 FERROR = 1 MIN_FERROR = .25 HOME_OFFSET = 1.000000 HOME_SEARCH_VEL = 3.500000 HOME_LATCH_VEL = 3.500000

and it failed until I set the home offset and home search velocity negative.
I feel reasonably confident that the simulation is right.
I wonder if your axis directions are correct on your machine?
directions are based relative to tool movement not table.

Chris

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

More
6 years 7 months ago - 6 years 7 months ago #159850 by rodw
I really think that these instructions are correct but it takes a while to get your head around the process. I found it was perfectly clear when I Built my machine but:

1. Hard limits by definition have to sit outside of soft limits. They should never be hit. Stuff breaks.

2. Limit switches need to be inside the hard limits far enough to allow the axis to coast to a stop before crashing into the hard limits. I found things stop pretty quickly

3. Soft limits need to be inside your limit switches so the switches are never triggered.

4. Home switches need to be inside limit switches (and soft limits) and must allow enough room to coast to a stop as the deceleration is very gentle during homing for maximum accuracy.

You can ignore limits (typical case is shared home/limit switches) but after homing, you must use a home offset to move the axis off the limit switch or it will trigger the limit as soon as it comes out of homing.

So from my experience, shared home/limit eats into machine travel. My home switches are about 45 mm inside the limit switches to allow the table to coast under homing, then I use a home offset to move it as close to the limit switch as I can to maximise travel.

Also you must be careful to read the right instructions. The OP said he was using master. The home offset is covered under para 3.7
linuxcnc.org/docs/devel/html/config/ini-...ng.html#_home_offset

But Chris quoted another version where the para was 3.6 so take care.

In my view if you have enough inputs (and enough room for the switches) having separate max limits, min limits and home switches is the way to go, particularly with gantry machines
Last edit: 6 years 7 months ago by rodw.

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

More
6 years 7 months ago #159902 by cmorley
I might also suggest that having your min limits 0 and max limits positive would be nicer it you ever use g53 - then all g53 coordinates would be positive

Chris.

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

More
6 years 7 months ago #159906 by calvin.d
ok this makes more sense, but I think there is still room to improve the doc

searching the doc soft limits seems to be there once (in the lines we are talking about) and hard limits is not explicitly stated at all. Think if we cleared up some terms and added enough a paragraph to add some definition this would help a ton.

Basically
Hard limits are the physical min and max of the machine
Soft limits create the area of restricted travel for and Axis / Joint ?
Home location is where the machine will move to after the homing sequence is complete
Home Offset is location of the homeswitch in the co ordinate system of the joint/axis

adding something about how to handle shared home/limit switches would be great. I'm actually happy to write this, if we are willing to update the documentation.

even having 1-2 examples would be every useful

Thank You
C

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

More
6 years 7 months ago #159914 by calvin.d
ok here is the relevant sections of my ini
the machine is a gantry style xyyz
with shared home/min for xyy and home/max for z

This seems to be working fine, is there anything obviously wrong ?
Code:
[AXIS_X] MIN_LIMIT = 0 MAX_LIMIT = 440 [AXIS_Y] MIN_LIMIT = 0 MAX_LIMIT = 380 [AXIS_Z] MIN_LIMIT = 0 MAX_LIMIT = 51 [JOINT_0] AXIS = X MIN_LIMIT = 0 MAX_LIMIT = 440 HOME = 1 HOME_OFFSET = -3 HOME_SEARCH_VEL = -60 HOME_LATCH_VEL = 30 HOME_SEQUENCE = 0 HOME_USE_INDEX = False HOME_IGNORE_LIMITS = True [JOINT_1] AXIS = Y MIN_LIMIT = 0 MAX_LIMIT = 380 HOME = 1 HOME_OFFSET = -3 HOME_SEARCH_VEL = -60 HOME_LATCH_VEL = 30 HOME_SEQUENCE = -1 HOME_USE_INDEX = False HOME_IGNORE_LIMITS = True [JOINT_2] AXIS = Y MIN_LIMIT = 0 MAX_LIMIT = 380 HOME = 1 HOME_OFFSET = -3 HOME_SEARCH_VEL = -60 HOME_LATCH_VEL = 30 HOME_SEQUENCE = -1 HOME_USE_INDEX = False HOME_IGNORE_LIMITS = True [JOINT_3] AXIS = Z MIN_LIMIT = 0 MAX_LIMIT = 51 HOME = 49 HOME_OFFSET = 53 HOME_SEARCH_VEL = 60 HOME_LATCH_VEL = -30 HOME_SEQUENCE = 2 HOME_USE_INDEX = False HOME_IGNORE_LIMITS = True

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

More
6 years 7 months ago #159925 by cmorley
After you home is it possible to jog and trip your limits?
For instance in joint 0 (X axis I think) :
you designate that x is between 0 and 440
you are using a shared limit/home for the negative limit so when your home switch trips the machine should be at zero but with HOME_OFFSET you tell linuxcnc that is is actually at -3
3mm isn't much (about 1/8 inch) but I bet it's enough to trip the limit switches.

Chris

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

Time to create page: 0.387 seconds
Powered by Kunena Forum