All limit switches on one input with bl-mach3 bob

More
27 Mar 2024 16:55 #296920 by Lpkkk
I know that changes are not 'live', in last few days I had to restart Linuxcnc plenty of times. So unfortunately it is not that. If I'm good remember I'm already using pin-15-in-not. When I start linuxcnc I'm able to start homing and during homing when limit is triggered everything stops. So I think everything is correct here. There is no signal when limit is not triggered. My issue is when one of the limit switches is triggered, it doesn't ignore limits on other joints.
So when I'm x axis and the limit sw on this axis is triggered, it also trigger home sw on other axes (joint 1 and 2) where those should be ignored as I'm homing at that time just x.

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

More
27 Mar 2024 18:19 - 27 Mar 2024 18:20 #296929 by Todd Zuercher
I went back and looked at the ini file you posted near the begining of this thread. I sure this isn't very current, so if you could post the current version it might be helpful.

Looking at that I only see a "HOME_SEQUENCE = " line in the [JOINT_0] section. This line must be present in the [JOINT_N] sections of each joint in your system. Also each "HOME_SEQUENCE = " line must have a different numeric value, 1,2,3... These determine the order that each joint homes in the homing process when you click "Home All". If you had seperate home switch inputs for each joint, then you could configure all of the joints to home at the same time, but with shared inputs they must take turns.

Also the "HOME_IS_SHARED = 1" line needs to appear in each [JOINT_N] section.

Finally the "HOME =" and "HOME_OFFSET =" values must be set so that after each joint touches off on the home switch, they park some distance away from the switch, so that the switch is not depressed.

For example, if the X axis home switch is at the negative end of travel, and you set these values to:
HOME = 0.0
HOME_OFFSET = -0.5
After joint0 touches off the home switch, the point where the switch was activated will be given the joint position = -0.5 and then joint0 will move to 0.0 and park +0.5 away from the home switch.

If you do not have those two lines defined in the [JOINT_N] section of a joint in the ini file, they will be assumed to =0 and after touching off the home switch the joint will park on the switch, which will prevent successive joints that use the same switch input from homing.
Last edit: 27 Mar 2024 18:20 by Todd Zuercher.

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

More
27 Mar 2024 18:28 #296930 by Todd Zuercher
Does the "HOME_IGNORE_LIMITS = YES" line appear in each {JOINT_n] section?

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

More
27 Mar 2024 19:10 #296934 by Todd Zuercher
I'm sorry, I must apologize. I mislead you at the beginning of this thread. I have never actually configured a machine that used a single input for home and limits and I did not realize that the ignore limits setting in the ini file only ignores the limits for that joint and not for all joints. Because of this you must block the limit inputs for all joints while one joint is homing. The lut5 component you were trying to use at the beginning would be useful for this purpose.

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

More
27 Mar 2024 20:17 - 27 Mar 2024 20:32 #296938 by Lpkkk
Ok. After even more tests done today I've found out that HOME_IS_SHARED option is only for one joint. We can use it when home and limit is the same switch or 2+ switches connected in series . It doesn't work as I expect so between joints. Same with ignore_home_switch. 
We can connect limit switches in series but only home and limit (or two limits if you are using max and min) and not between joints. 

To properly connect limit switches I had to put more wiring, separate cable for each switch and unfortunately 3 input ports

Edit:
Todd I've just read your last post. Thank you and all the good people who helped in this topic, meanwhile I've found the answer above. 
Last edit: 27 Mar 2024 20:32 by Lpkkk.
The following user(s) said Thank You: tommylight

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

More
27 Mar 2024 20:44 #296939 by Todd Zuercher
It can be done with one input, it just requires more complicated hal programming, involving some some hal logic such as the lut5 you had at the beginning of the thread, it would have worked if I hadn't steered you wrong.

The machine's I've set up have not been so limited for IO as to require me to try to combine limits and homes from multiple axis to a single pin, and didn't realize that the ini settings only worked for combining switches on a single joint. Again, I apologize for misleading you earlier.
The following user(s) said Thank You: tommylight

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

More
28 Mar 2024 12:09 #296992 by rodw
I have not done this either but I would try and2 ing the input with joint.N.homing  for each joint.
That way, only the individual joint being homed can trigger.

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

More
28 Mar 2024 12:10 #296993 by rodw
Also, be sure to use a HOME_OFFSET to move the axis off the switch at the end of homing so it does not get confused on the next joint

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

More
28 Mar 2024 12:44 #296997 by Todd Zuercher
I don't think it is the sharing between the home inputs that is the problem. It is the sharing of the limit inputs between different joints that is the problem. And for that the simplest solution is to block the signal from all of the limit inputs when any of the joint.N.homing pins are true. One way to do that is by using the lut5.
#Code to Load and Configure lut5
loadrt lut5
addf lut5.0 servo-thread
setp lut5.0.function 0x10000

#Home and Limit Input from Parallel port
net all-limit-home <= parport.0.pin-15-in

#Lut5 IO
net all-limit-home => lut5.0.in-4
net all-limit <= lut5.0.out
net homing-x <= joint.0.homing => lut5.0.in-0
net homing-y <= joint.1.homing => lut5.0.in-1
net homing-z <= joint.2.homing => lut5.0.in-2

#Joint_0 (X-axis) Home and Limit Connections
net all-limit-home => joint.0.home-sw-in
net all-limit => joint.0.neg-lim-sw-in
net all-limit => joint.0.pos-lim-sw-in

#Joint_1 (Y-axis) Home and Limit Connections
net all-limit-home => joint.1.home-sw-in
net all-limit => joint.1.neg-lim-sw-in
net all-limit => joint.1.pos-lim-sw-in

#Joint_2 (Z-axis) Home and Limit Connections
net all-limit-home => joint.2.home-sw-in
net all-limit => joint.2.neg-lim-sw-in
net all-limit => joint.2.pos-lim-sw-in

You can connect up to one more joint this way using the lut5 component.  If you need to use more joints, you would need to use a different hal  component such as logic that can handle more inputs for the additional joint.N.homing pins.

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

More
28 Mar 2024 15:32 - 28 Mar 2024 15:41 #297007 by wusel0464
Hello,

Connect all switches in series as openers and then specify the order of reference travel in the INI, which means one axis must move one after the other, two axes at the same time is not possible.
The limit switch can also be connected in this way for reference and has the advantage that a cable break can also be detected.
HOME_SEQUENCE = 0 for Z
HOME_SEQUENCE = 1 for X
HOME_SEQUENCE = 2 for Y
for example.

If you only need a limit switch function, then a simple series connection as an opener is sufficient. In this case it doesn't really matter which side the axle is on. Because it is actually an accident and you have to intervene manually.

Greetings Frank
Last edit: 28 Mar 2024 15:41 by wusel0464.

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

Time to create page: 0.118 seconds
Powered by Kunena Forum