Multiple Probes: Touch-off Probe and Edge probe

More
02 Mar 2025 05:30 #322991 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.

File Attachment:

File Name: pm728_7i96...mill.ini
File Size:5 KB

File Attachment:

File Name: io.hal
File Size:1 KB

File Attachment:

File Name: main_2025-03-02.hal
File Size:7 KB

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

More
02 Mar 2025 07:35 - 02 Mar 2025 07:38 #322996 by Aciera
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:
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.

More
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.

File Attachment:

File Name: pm728_7i96...3-02.ini
File Size:5 KB

File Attachment:

File Name: io_2025-03-02.hal
File Size:1 KB

File Attachment:

File Name: main_2025-03-02-2.hal
File Size:7 KB
Attachments:

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

More
02 Mar 2025 13:30 #323014 by Aciera
in io.hal replace this:
#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: KCJLcvette
Time to create page: 0.085 seconds
Powered by Kunena Forum