- Posts: 22010
- Thank you received: 3
How to and2 the probe input with a digital input
- tommylight
-
- Offline
- Administrator
-
Less
More
3 years 2 weeks ago #282779
by tommylight
Replied by tommylight on topic How to and2 the probe input with a digital input
This is off the top of my head, so double checking is preferable:
The names with _ on the left side can be any name you like to make it easier to follow, the name with _ on the right side must be an existing signal like "probing is active" or something like that.
Code:
loadrt and2
addf and2.0 servo period
net input_from_probe and2.0.in1 paraport.0.in-9
net input_from_something_else and2.0.in2 from_wehre_the_signal_comes
net output_signal_from_and2 and2.0.out probe-in
Please Log in to join the conversation.
2 years 11 months ago #284317
by Waldemar
Replied by Waldemar on topic How to and2 the probe input with a digital input
Regarding debounce - is this info still relevant?[url=https://www.forum.linuxcnc.org/24-hal-components/32621-need-help-adding-debounce-to-probe
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
Less
More
- Posts: 22010
- Thank you received: 3
2 years 11 months ago #284320
by tommylight
From your error report, on line 5 you are trying to add something to base-thread, and base-thread does not exist on Mesa configs as there is no need for it.
Probably changing that add to servo-thread will work, although also probably should be servo-period, not servo-thread.
Replied by tommylight on topic How to and2 the probe input with a digital input
Code:
Debug file information:
Note: Using POSIX realtime
HAL: ERROR: thread 'base-thread' not found
./custom.hal:5: addf failed
Probably changing that add to servo-thread will work, although also probably should be servo-period, not servo-thread.
Please Log in to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
Less
More
- Posts: 721
- Thank you received: 0
2 years 11 months ago #284325
by smc.collins
Replied by smc.collins on topic How to and2 the probe input with a digital input
I'll post up my hal component this weekend for tool measuring and probing etc. It has a spindle enabled block function, i also have a bouncy switch probe.
Please Log in to join the conversation.
2 years 11 months ago #284471
by Waldemar
Replied by Waldemar on topic How to and2 the probe input with a digital input
Cheers Tommy - servo-thread worked:
Just repeating the probing op, so far so good.
Thanks again.
Wal.
loadrt debounce cfg=1
addf debounce.0 servo-thread
setp debounce.0.delay 100
unlinkp motion.probe-input
net probe-in debounce.0.0.in
net probe-filt debounce.0.0.out => motion.probe-input
Just repeating the probing op, so far so good.
Thanks again.
Wal.
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
Less
More
- Posts: 22010
- Thank you received: 3
2 years 11 months ago #284472
by tommylight
Replied by tommylight on topic How to and2 the probe input with a digital input
Glad you got it working and thank you for reporting back.
Please Log in to join the conversation.
Time to create page: 0.048 seconds
