Multiple Probes: Touch-off Probe and Edge probe
- aikiaviator
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 7
02 Mar 2025 05:30 #322991
by aikiaviator
Multiple Probes: Touch-off Probe and Edge probe was created by aikiaviator
Hi all,
So my config has a tool touch-off and a separate probe.
I have figured out that they both use the Probe-input to work, however, they are both in and both NO. Now I have tried to configure to have them both by setting Probe Input, to both but the load tells me that basically I cannot have two inputs for the probe input. So now I have validated that if I comment out each of the tools separately when connected, they work very well, but looking to have it so that the tools work if both and/or if probe is attached or not. I have attached the ini and Hal files here and input would be appreciated. I noted another thread talking about this and it mentioned using MUX. I tried the adjustments, but to no luck. Can anyone give me the solution to running dual probe-inputs in the ini and io.hal files would be great.
So my config has a tool touch-off and a separate probe.
I have figured out that they both use the Probe-input to work, however, they are both in and both NO. Now I have tried to configure to have them both by setting Probe Input, to both but the load tells me that basically I cannot have two inputs for the probe input. So now I have validated that if I comment out each of the tools separately when connected, they work very well, but looking to have it so that the tools work if both and/or if probe is attached or not. I have attached the ini and Hal files here and input would be appreciated. I noted another thread talking about this and it mentioned using MUX. I tried the adjustments, but to no luck. Can anyone give me the solution to running dual probe-inputs in the ini and io.hal files would be great.
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
Less
More
- Posts: 4239
- Thank you received: 1867
02 Mar 2025 07:35 - 02 Mar 2025 07:38 #322996
by Aciera
Replied by Aciera on topic Multiple Probes: Touch-off Probe and Edge probe
Sounds like you need an 'or2' component, if the probe is NO (ie signal is High when probe is tripped) I would use the non-inverted input:
Don't forget 'loadrt' and 'addf' for the or2 component and to adjust the 'or2' to whatever name or number you are loading the component as.
net probe-1 <= hm2_7i96s.0.inm.00.input-00 => or2.in0
net probe-2 <= hm2_7i96s.0.inm.00.input-02 => or2.in1
net probe-input <= or2.out => motion.probe-input
Don't forget 'loadrt' and 'addf' for the or2 component and to adjust the 'or2' to whatever name or number you are loading the component as.
Last edit: 02 Mar 2025 07:38 by Aciera.
Please Log in or Create an account to join the conversation.
- aikiaviator
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 7
02 Mar 2025 12:49 #323011
by aikiaviator
Replied by aikiaviator on topic Multiple Probes: Touch-off Probe and Edge probe
Hi Aciera,
Not sure what you mean, however, here is my ini, main.hal and io.hal. Could you advise what this would require and in what file as to the loadrt and addf as well as I am not familiar with the coding. Thanks in advance.
Not sure what you mean, however, here is my ini, main.hal and io.hal. Could you advise what this would require and in what file as to the loadrt and addf as well as I am not familiar with the coding. Thanks in advance.
Attachments:
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
Less
More
- Posts: 4239
- Thank you received: 1867
02 Mar 2025 13:30 #323014
by Aciera
Replied by Aciera on topic Multiple Probes: Touch-off Probe and Edge probe
in io.hal replace this:
with this:
Might also be worth having a look at the docs:
www.linuxcnc.org/docs/html/hal/basic-hal.html
#net digital-0-input motion.digital-in-00 <= hm2_7i96s.0.inm.00.input-00-not
net probe-input motion.probe-input <= hm2_7i96s.0.inm.00.input-00-not
#net probe-input motion.probe-input <= hm2_7i96s.0.inm.00.input-02-not
with this:
loadrt or2 count=1
addf or2.0 servo-thread
net probe-1 <= hm2_7i96s.0.inm.00.input-00 => or2.0.in0
net probe-2 <= hm2_7i96s.0.inm.00.input-02 => or2.0.in1
net probe-input <= or2.0.out => motion.probe-input
Might also be worth having a look at the docs:
www.linuxcnc.org/docs/html/hal/basic-hal.html
The following user(s) said Thank You: aikiaviator
Please Log in or Create an account to join the conversation.
Moderators: KCJ, Lcvette
Time to create page: 0.085 seconds