Help adding two estops via HAL
- timsmithno1
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 1
07 May 2024 18:07 #300056
by timsmithno1
Help adding two estops via HAL was created by timsmithno1
Hi, I have a K2 CNC linked to my computer via a Probotix Unity 2 connected to two parallel ports. (
This page with pin connections on the Unity 2
may be useful for reference)
I am using LinuxCNC version 2.7.14. I know there are newer versions, but I could not achieve an acceptable level of jitter with them, and from my research of features added 2.7.x works fine for my purposes.
The parport0 handles basic machine control (axis, limits etc) and the parport1 is connected to an MPG pendant.
I have an estop on the pendant which works and I have specified as:
I would like to add a second estop on parport.0.pin-15, however by my understanding simply adding a second line like the above is not possible.
From my reading, doing this should be possible using an OR2 or an estop-latch. I have read the man pages for both, and think an or2 should be sufficient, however have been unable to fully understand how to write one for this.
Any help would be greatly appreciated.
I am using LinuxCNC version 2.7.14. I know there are newer versions, but I could not achieve an acceptable level of jitter with them, and from my research of features added 2.7.x works fine for my purposes.
The parport0 handles basic machine control (axis, limits etc) and the parport1 is connected to an MPG pendant.
I have an estop on the pendant which works and I have specified as:
net estop-ext <= parport.1.pin-12-in-not
I would like to add a second estop on parport.0.pin-15, however by my understanding simply adding a second line like the above is not possible.
From my reading, doing this should be possible using an OR2 or an estop-latch. I have read the man pages for both, and think an or2 should be sufficient, however have been unable to fully understand how to write one for this.
Any help would be greatly appreciated.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19479
- Thank you received: 6532
07 May 2024 19:27 #300061
by tommylight
Replied by tommylight on topic Help adding two estops via HAL
loadrt and2
addf and2.0 servo-period
net stop1 parport.1.pin-12-in-not and2.0.in1
net stop2 parport.0.pin-15-in-not and2.0.in2
net estop-ext and2.0.out
-
Roughly that from memory should do.
Or can not be used as any switch will enable the machine, AND will enable only if both are set.
addf and2.0 servo-period
net stop1 parport.1.pin-12-in-not and2.0.in1
net stop2 parport.0.pin-15-in-not and2.0.in2
net estop-ext and2.0.out
-
Roughly that from memory should do.
Or can not be used as any switch will enable the machine, AND will enable only if both are set.
The following user(s) said Thank You: timsmithno1
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
Less
More
- Posts: 10795
- Thank you received: 3556
07 May 2024 21:35 #300069
by rodw
Replied by rodw on topic Help adding two estops via HAL
A better way would be to use estop-latch and chain two instances of it together (one for each switch).
There is an example of using one instance in the forum hal examples
For multiple instances, I usually do a little block drawing before adding it to hal
There is an example of using one instance in the forum hal examples
For multiple instances, I usually do a little block drawing before adding it to hal
The following user(s) said Thank You: timsmithno1
Please Log in or Create an account to join the conversation.
- timsmithno1
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 1
08 May 2024 17:26 #300141
by timsmithno1
Replied by timsmithno1 on topic Help adding two estops via HAL
Thank you, I will give that a go!
I see the or problem now, I think that explains some of my issues.
I see the or problem now, I think that explains some of my issues.
Please Log in or Create an account to join the conversation.
- timsmithno1
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 1
08 May 2024 17:28 #300142
by timsmithno1
Replied by timsmithno1 on topic Help adding two estops via HAL
Thank you, I will try first with AND2, and once I can get it working I will try the more proper method. Also thanks for your many helpful responses on this forum (and tommylight) I have found them invaluable while getting other parts of this project working
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.051 seconds