× Forum Header

Parallel limit switch connection problem

More
13 May 2018 13:27 - 13 May 2018 13:31 #110671 by caseyryan
Hi!
I tried to connect limit switches in parallel, so they could all work as one but after I had connected everything and tested I bumped into a problem I haven't managed to find solution for.
The problem is that when the router bumps into one of the switches it throws an error saying "can't jog joint 0 further past max hard limit". I've googled some pages with similar problems but to no avail so far.
The switches are connected in my .hal file like so:
net XYZ-max-lim parport.0.pin-12-in-not => axis.0.pos-lim-sw-in axis.1.pos-lim-sw-in axis.2.pos-lim-sw-in

I've also attached the picture of .INI file of my router config (sorry, I wasn't able to get the file itself for there were some problems with copying it to a flashcard).

What am I doing wrong? Is there a way to change this behavior?
Right now the only way to get the router off the switch is to manually disconnect the
Last edit: 13 May 2018 13:31 by caseyryan.

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

More
13 May 2018 14:14 #110675 by DanMN
I believe you'll need the switches in series to get what you want. Depending on your trigger logic you'll have a loop that pulls the homing pin high or low when any of the switches either breaks or completes the loop. Since you're using a "not" pin, that would imply you'll need to create a wiring loop that is normally closed and pulls the pin high until any of the switches is opened by axis travel limit contact.

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

More
13 May 2018 15:11 - 13 May 2018 15:18 #110677 by caseyryan

Since you're using a "not" pin, that would imply you'll need to create a wiring loop that is normally closed and pulls the pin high until any of the switches is opened by axis travel limit contact.

Well, if I understand you correctly, you mean the entire switching loop must always be high unless one of the switches breaks it. If so, it absolutely doesn't matter. I tied both configurations with high and low pins. It gives me the same error in both cases.
I can't provide a separate pin for each switch because I only have 4 of them on my board, and one of them is used for a tool touch-off plate. But in this case it wouldn't even change anything whether I connect 3 axes separately or just as one switch. The router would just get stuck every time it reaches 0:0:0 position on any axis. I believe there must be some programmatic solution to this.
All I want is the router to stop when it bumps into any of the switches and then be able to jog it back again by checking "override limits" box. At the moment I can only do it if it hits any switch on the other side of the router frame
What does this "hard limit" mean? And why does it need it at all?
Last edit: 13 May 2018 15:18 by caseyryan.

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

More
13 May 2018 15:33 - 13 May 2018 15:51 #110679 by DanMN
The problem appears to be your soft limits. A home offset of "5" says your home switch is 5mm from the end of physical travel. If you were using separate limit switches you'd have a distinct limit switch at physical "0" and you'd leave that "lost" 5mm as safety margin. That 5mm point would be measured as the point where your homing cycle completed its latch back-off. So if you're approaching the limit switch from the positive end of the axis, latch velocity is a negative number, it would find the homing switch and move to home -- with in this case is also toward the negative end at zero. As you're configured now, you're instructing the axis to go backward to zero from home offset after finding the switch. Since it can't get to zero without tripping the switch, you're caught in trap.
Last edit: 13 May 2018 15:51 by DanMN.
The following user(s) said Thank You: COFHAL

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

More
13 May 2018 16:03 - 13 May 2018 16:04 #110680 by caseyryan

you're instructing the axis to go backward to zero from home offset after finding the switch

So, how can I resolve this? Change the homing offset to some negative value, like, say -10?

p.s. It was not my setup, most of this is the default configuration of linuxcnc, including the homing offset of 5 (I didn't even know what it meant until you told me)
Last edit: 13 May 2018 16:04 by caseyryan.

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

More
13 May 2018 16:06 - 13 May 2018 16:08 #110681 by DanMN
It helps to understand the flexibility built into the system and how shared switches make compromises relative to that total set of features. For clarification of why the distinction between hard and soft limits, think about the variety of machines that Linuxcnc may encounter -- there could be situations where the homing switch is in some location other than the negative end of travel. It could even be in a location where setting it's homing position as zero would cause you to define a much smaller work area than the physical extents of a given machine. For example, you could have an axis where each 1000mm linear rail had an hard limit switch wired to e-stop, so if something ran-away, the entire machine would halt before your axis drove itself off the machine and onto the floor. That same machine might have its homing sensor at 150mm, due to some specific machine geometry, but you don't want that 150mm of travel lost. In that case, you'd use a home offset of 150, and HOME set to something just short of the distance that would trip your physical e-stop limit switch. Sticking with the example of 5mm, you'd use HOME = 5, telling your system to hit the homing switch at 150, latch to it and define that latch point as "HOME_OFFSET = 150", then upon homing cycle completion, move -145mm to HOME and set your soft limit at that point to axis zero. Your e-stop limit switch is still 5mm behind, hopefully to never be tripped.
Last edit: 13 May 2018 16:08 by DanMN.

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

More
13 May 2018 16:31 - 13 May 2018 16:32 #110682 by caseyryan
Sorry for my newbie questions but I still don't understand the idea.
I haven't even set up homing sensors (it still is another matter to learn to me), for now I only want to be able to jog the router off of the limit switch by means of software.
I think you would agree that any machine has its hard limits on both sides. Going in any direction it might drive itself onto the floor if it isn't stopped by a limit switch or some other safety device. But I just can't get the idea of making it possible to override the limits on one side and making it impossible on the other. It really looks weird to me when my router gets stopped by a limit switch and then I have to turn it off, reach it and rotate the stepper motor by hand to make it jog off the switch.
Will the negative homing offset resolve this problem?
Last edit: 13 May 2018 16:32 by caseyryan.

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

More
13 May 2018 16:32 #110683 by Mike_Eitel
Hi

1. Have a reading session.
www.linuxcnc.org/docs/devel/html/config/ini-homing.html.
for master branch or
www.linuxcnc.org/docs/2.7/html/config/ini-homing.html
if you in 2.7 branch.

2. You must home one axis after the other. The order is defined by HOME_SEQUENCE

3. After one axis has found it's zero you have to send it to a position where "his" switch is no more active. By HOME=xxx.

4. Then the next axis is free to run...

Mike

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

More
13 May 2018 16:33 #110684 by DanMN
Looking at your picture, I'd suggest your machine is currently in a position that represents X & Y at the maximum positive extents of their travel. You'd be operating the machine facing the spindle at the opposite end of the table from your Y-axis motor, at the left side of your picture. From that orientation, facing the spindle, your gantry is in the upper righthand corner of your work envelope.

If you take this orientation as correct, you need to configure something like this (presuming 1000 mm travel for example):

X Axis:
Your HOME SEARCH VELOCITY is a positive number
Your HOME OFFSET is 995
Your HOME is 5

This gives you 990mm of travel inside of soft limits. Your homing cycle will narrate as:
"Move in the positive direct of Y at HOME SEARCH VELOCITY until you encounter the switch. Back off the switch at HOME LATCH VELOCITY (a negative number in your case, since the sign needs to be opposite from SEARCH velocity), once you've barely creeped backward off the switch, define that exact point as the 995mm positive soft limit of the machine. Now, move backward 990mm to a point which is physically 5mm from the hard end of travel, and name that point axis soft limit ZERO."

So, you've turned the machine on, hit "Home" and this should happen if configured sanely:

1. Your z-axis (ideally homing at the TOP of its travel, with HOME_SEQUENCE = 0!) moves up as far as it can go before the other axes move. This will prevent a lot of snapped tools and gouged tables...
2. Your other two axes are defined with HOMING_SEQUENCE = 1 and 2 respectively, and each in turn finds it's limit switch, latches and moves to HOME.

In my case, my table homes at the operator end. When I hit Home, the spindle lifts, latched and stops, then the X-axis moves to the left, latches and stops, then the Y-axis moves in the negative direction toward me until it finds the switch and latches. As soon a Y-latches, both the X and Y simultaneously move to HOME -- which in my case is the midpoint of each axis.

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

More
13 May 2018 16:37 - 13 May 2018 16:48 #110685 by DanMN
I guess I'm overcomplicating your situation. I'd suggest you sort out homing before trying to play with axis movement.

If you simply want to fake your machine into overriding a tripped switch you could temporarily wire in momentary contact switch to make or break your loop. I did that during the configuration stage until I had wrapped my head around the concepts involve.
Last edit: 13 May 2018 16:48 by DanMN.

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

Time to create page: 0.176 seconds
Powered by Kunena Forum