- Posts: 61
- Thank you received: 0
HAL newbie struggling with debounce set up
I'm entering:
cd linuxcnc
halrun
loadrt debounce
at this point i'm getting an error......could not insert module.......operation not permitted
not good with the terminal yet
Please Log in to join the conversation.
cmtunnel wrote: cd linuxcnc
halrun
loadrt debounce
at this point i'm getting an error......could not insert module.......operation not permitted
You don't actually need to cd to linuxcnc, though that is irrelevant.
If you type "man debounce" (in a separate terminal, not the halrun one) then you will see this page which says that the loadrt line is
In man-page format [this is optional] and ... means "as many as you want"
So, to load 3 debounces that will all have the same debounce time:
don't forget also, if you want to see it working
Please Log in to join the conversation.
Please Log in to join the conversation.
cmtunnel wrote: I can't see it doing anything but I don't know what to look for. I will need this to run all the time for my limit switches. How do I set it up so that it runs inside linuxcnc? Or does it do that automatically?
If you want to have this running in LinuxCNC , then you add the commands to the HAL file (except for the loadrt threads and start commands, those are handled by LinuxCNC)
You will need to change signal and pin names to suit your actual HAL file, of course.
Please Log in to join the conversation.
net switch-raw hm2_5i25.0.0.input-00-not => debounce.0.in
net switch-debounced debounce.0.out axis.0.pos-lim-sw-in axis.0.neg-lim-sw-in axis.0.home-sw-in
and then the same for y and z except 1's and 2's
net switch-raw hm2_5i25.0.0.input-01-not => debounce.1.in .................and so on??
Please Log in to join the conversation.
Yes.
You will have to remove/alter any existing HAL lines that conflict. (ie, try to net the same pins)
Please Log in to join the conversation.
it doesn't like the addf but im looking into it now.
Please Log in to join the conversation.
Please Log in to join the conversation.
cncbasher wrote: you have a typo it should be debounce.0.0.in & debounce.0.0.out etc
Ah yes.
cfg=1,2
would create input pins
debounce.0.0.in
debounce.1.0.in
debounce.1.1.in
All the debounce.0 has its own debounce time and debounce.1.0 and debounce.1.1 share a debounce time.
Please Log in to join the conversation.
Please Log in to join the conversation.
