Hi
If it helps, the below are extracts from my lathe .hal file which had problems with a home switch that required debounce.
Works perfectly now, 100 may seem big, but I have a fast base thread and trial and error resulted in that figure.
regards
ArcEye
***********************************************************************************************
loadrt debounce cfg=2
addf debounce.0 base-thread
#If necessary, you can
#to change the amount of debounce; the default is apparently 5, which
#means the switch input to emc has to be stable for 5 servo periods
#before the debounce output changes.
setp debounce.0.delay 100
##############################################
# Needed debounce on X home switch. Has quite
# a long travel and did not give a clean on/off
###############################################
net xhome-raw <= parport.0.pin-13-in-not => debounce.0.0.in
net xhome-filtered debounce.0.0.out => axis.0.home-sw-in