Can't seem to get homing working

More
03 Jun 2018 14:08 #111506 by electrophile
I have a small laser engraver and it has two mechanical micro limit switches on either sides to detect the maximum and minimum limits. When I try and home, The homing occurs and then the axis crashes as seen below. What am I missing?



My parallel port config in stepconf looks like this:



The Z-axis config looks like shown below. What I want is for the axis to home the way it does (before crashing) and then pull back 10mm in the opposite direction and set that as the home position.

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

More
03 Jun 2018 14:48 #111507 by Sparky961
Have you tried changing 'Home Latch Direction'? There is detailed information on homing configuration here:

linuxcnc.org/docs/html/config/ini-homing.html

If you haven't already looked at your machine's INI file (generated by stepconf) now would be a good time to start getting to know what's in there. Stepconf can only take you so far.

Here is a pared down version of my Y axis configuration, showing only the homing parameters. This searches for home in the positive travel direction, backs off slowly until the home isn't tripped, then moves 3.5" in the negative direction and sets that as zero.

Pay close attention to the sign of all three xxxx_VEL parameters and HOME_OFFSET.
#********************
# Axis Y
#********************
[AXIS_1]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -5.0
MAX_LIMIT = 6.0
HOME_OFFSET = 3.500
HOME_SEARCH_VEL = 2.5
HOME_LATCH_VEL = -0.1
HOME_FINAL_VEL = 2.5
HOME_USE_INDEX = NO
HOME_SEQUENCE = 1

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

More
03 Jun 2018 16:02 #111515 by electrophile
Thanks. I tried changing the Home Latch direction and that didn't really have any effect. I've attached my .ini and .hal files here. I was able to get the axes to home right after reading your config and the documentation at that link. However, I don't seem to have a lot of working distance between the homed point and the axis 0.0. I'm guessing this is where the HOME_OFFSET plays a role. I'll keep at it and I'll post again if I have more questions.

File Attachment:

File Name: motionpro-6600.hal
File Size:4 KB

File Attachment:

File Name: motionpro-6600.ini
File Size:2 KB
Attachments:

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

More
03 Jun 2018 16:44 #111521 by Sparky961
If I understand what you're saying correctly, having a look at the Y axis setup from a different machine may help you. I've included the complete INI and HAL files from this machine, as it seems like you're able to navigate those files and understand what's in there. There are some externally-referenced files that aren't included because they shouldn't be relevant.

On a machine with shared home and limit switches your zero needs to be set inside the limits and the machine prevented from tripping the home/limit through setting up soft limits. You'll need to enable "HOME_IGNORE_LIMITS" when homing too.

Since yours is a stepper machine, most likely open loop (no encoder feedback) you can disregard "HOME_USE_INDEX", as my machine was using servos and encoders in a closed loop. This improves homing repeatability using the index pulse of an encoder.

Also note that your machine zero position is irrelevant since you should be setting up a work offset (G54 et al) when doing any real programming. That puts your zero reference in a known location on the part/stock you're machining, engraving, scanning, printing, or whatever. Whether you set it at mid-travel, near one of the ends, or at mid-travel is up to you.

I also like setting up a machine so that after homing it moves the table to a "useable" position, since the first thing done on many machines is to move it from the post-homing position to the centre of travel or the table near to the operator.

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

More
03 Jun 2018 16:44 #111522 by DanMN
Home_offset defines the distance between the physical location of the homing sensor in relation to the physical end of the axis travel. Depending on the geometry of a given machine, it may not be possible or practical to locate the homing sensor proximate to the end of the axis. Remember, LCNC is endlessly configurable across any conceivable layout - and that leaves you lots of room to get into trouble too.

If a machine required the homing sensor +50mm from the intended zero point of that axis, the homing routine will find the sensor, call that point "50mm" and allow the axis to travel backward to zero, or whatever point you define with the Home variable - which is usually some arbitrary tiny distance from the hard end of travel, or a discrete limit switch (as opposed to shared home/limit switches).

For example, you configure your z axis to have its zero and a hard-stop limit switch at the extreme top of travel, but your homing switch is 20mm below that. You'd set home_offset = -20 and then set Home = -.01. You would get a warning if you tried to command the z axis to true zero, as that is now outside the soft limits of the machine and would trip your limit anyway.

I don't think it's common to have a huge distance for home offset, since having intended usable axis distance on the wrong side of your homing velocity direction might make things tricky if you started homing sequence inside the home offset distance - you'd never find your sensor. You'd just trip your limit and be stuck until you did an override jog to the happy side off your homing sensor and homed again.

For a common setup, the switches are shared home/limit, Home_offset = 0 and Home = [some tiny back-off distance] either in the positive or negative direction on your final axis, depending on whether you home from the min or max end of your axis (again, that endless configurability).

While fiddling around with this, I always rigged a temporary switch at the end of travel, tied to e-stop. This prevented many collisions due to 3am typos in my ini file. Forget a minus sign, and things go clunk-bing-crunch-pop very fast.

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

More
03 Jun 2018 16:51 #111523 by Sparky961
Oops... files weren't attached and for some reason I can't edit that last post.

They should be attached to this one.

I'll add in hindsight that the Z axis for this machine should be pretty close to what you're trying to accomplish, as I wanted the zero to be at the highest point of travel as well.
Attachments:

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

More
04 Jun 2018 06:35 #111575 by electrophile
@Sparky961, Thank you. That helped immensely and I was able to get my homing right. I'm still a little confused about HOME_IGNORE_LIMITS. So if I set this to YES it will ignore the physical limit triggers for that particular axis but not the others? I was confused by that documentation.

@DanMN, Thank you for that detailed explanation. I had the my machine home to the bottom left corner of the table while my X0 and Y0 are at the top right corner. This is where the HOME_OFFSET helped. Contrary to what you've suggested, I had to make this a larger number, in fact, it had to be the whole length of the X and Y travel, but at least it works. I've attached my final config files here.
Attachments:

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

More
04 Jun 2018 11:40 #111592 by Sparky961

@Sparky961, Thank you. That helped immensely and I was able to get my homing right. I'm still a little confused about HOME_IGNORE_LIMITS. So if I set this to YES it will ignore the physical limit triggers for that particular axis but not the others? I was confused by that documentation.


HOME_IGNORE_LIMITS=TRUE only ignores the limit switch for a given axis while homing. When home/limit are the same physical switch this prevents the machine from tripping the limit switch while homing. After homing the limit switches are active and will cause a limit switch error if tripped. Your soft limits are intended to keep the machine tavel between the physical limit switches. Tripping a limit switch indicates that the axis has, for whatever reason (like the machine not being homed), traveled into a prohibited region and causes shutdown and an error message.
The following user(s) said Thank You: electrophile

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

Time to create page: 0.117 seconds
Powered by Kunena Forum