- Posts: 14
- Thank you received: 1
Debounce and Base-Thread Help Needed
- Mr. Technical
- Topic Author
- Offline
- New Member
-
Less
More
6 years 9 months ago - 6 years 9 months ago #155565
by Mr. Technical
Debounce and Base-Thread Help Needed was created by Mr. Technical
Hi Guys,
I recently installed a touch plate on an older LinuxCNC router installation and have tested it. While it works fine sometimes, it often throws a message about a jog move with probe input triggered. I chalk that up to needing a debounce function, which I am trying to get working.
I added the following to the custom.hal file:
# Include your custom HAL commands here
# This file will not be overwritten when you run PNCconf again
#added 1-22-20
#add this to custom.hal for probe debouncing
#change delay and pin number to fit your needs.
loadrt debounce cfg=1
setp debounce.0.delay 300
addf debounce.0 base-thread
net debounce-probe-in debounce.0.0.in<=hm2_5i25.0.7i76.0.0.input-04-not
net probe-in debounce.0.0.out=>motion.probe-input
#end of probe debouncing.
And added this to the M22-R6Probe.hal file:
# ---probe signal---
#remove the following two lines from (your machine).hal to
#make debounce fix added to custom.hal file work.
#This essentially breaks the original nets in the next two lines
#so they can be reconnected to the debounce function.
#net probe-in => motion.probe-input
#net probe-in => hm2_5i25.0.7i76.0.0.input-04-not
# on 1-19-20,added "-not" in previous line to invert probe-in signal due to adding 4.7K pull up resistor to circuit.)
# tool is grounded, and plate is tied to 24VDC through 4.7k resistor at input 04)
When I try to start LinuxCNC after those changes, I get the following debug message:
Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
HAL: ERROR: function 'debounce.0' not found
custom.hal:15: addf failed
10694
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
I've attached the original files below for reference. Does anyone see what is wrong with how I'm trying to do this?
I suspect that the base-thread function is not loading properly, but don't know why.
All help is greatly appreciated.
Mr. Technical
I recently installed a touch plate on an older LinuxCNC router installation and have tested it. While it works fine sometimes, it often throws a message about a jog move with probe input triggered. I chalk that up to needing a debounce function, which I am trying to get working.
I added the following to the custom.hal file:
# Include your custom HAL commands here
# This file will not be overwritten when you run PNCconf again
#added 1-22-20
#add this to custom.hal for probe debouncing
#change delay and pin number to fit your needs.
loadrt debounce cfg=1
setp debounce.0.delay 300
addf debounce.0 base-thread
net debounce-probe-in debounce.0.0.in<=hm2_5i25.0.7i76.0.0.input-04-not
net probe-in debounce.0.0.out=>motion.probe-input
#end of probe debouncing.
And added this to the M22-R6Probe.hal file:
# ---probe signal---
#remove the following two lines from (your machine).hal to
#make debounce fix added to custom.hal file work.
#This essentially breaks the original nets in the next two lines
#so they can be reconnected to the debounce function.
#net probe-in => motion.probe-input
#net probe-in => hm2_5i25.0.7i76.0.0.input-04-not
# on 1-19-20,added "-not" in previous line to invert probe-in signal due to adding 4.7K pull up resistor to circuit.)
# tool is grounded, and plate is tied to 24VDC through 4.7k resistor at input 04)
When I try to start LinuxCNC after those changes, I get the following debug message:
Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
HAL: ERROR: function 'debounce.0' not found
custom.hal:15: addf failed
10694
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
I've attached the original files below for reference. Does anyone see what is wrong with how I'm trying to do this?
I suspect that the base-thread function is not loading properly, but don't know why.
All help is greatly appreciated.
Mr. Technical
Last edit: 6 years 9 months ago by Mr. Technical.
Please Log in or Create an account to join the conversation.
6 years 9 months ago #155571
by PCW
Replied by PCW on topic Debounce and Base-Thread Help Needed
With Mesa cards a base thread is not normally used.
You could use debounce with an appropriate number
of servo thread periods.
You could use debounce with an appropriate number
of servo thread periods.
Please Log in or Create an account to join the conversation.
- Mr. Technical
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 1
6 years 9 months ago #155585
by Mr. Technical
Replied by Mr. Technical on topic Debounce and Base-Thread Help Needed
Thanks for the info.
So, instead of: addf debounce.0 base-thread
I would use: addf debounce.0 servo-thread
What is typically a good delay value to use for debouncing a touch plate with servo-thread?
That is, what would I enter in this line copied from above?
setp debounce.0.delay 300
Thanks,
Mr. Technical
So, instead of: addf debounce.0 base-thread
I would use: addf debounce.0 servo-thread
What is typically a good delay value to use for debouncing a touch plate with servo-thread?
That is, what would I enter in this line copied from above?
setp debounce.0.delay 300
Thanks,
Mr. Technical
Please Log in or Create an account to join the conversation.
6 years 9 months ago #155609
by PCW
Replied by PCW on topic Debounce and Base-Thread Help Needed
You might try 3 to 10 (3 to 10 ms at a 1 ms servo thread)
Please Log in or Create an account to join the conversation.
6 years 9 months ago #155798
by bbsr_5a
Replied by bbsr_5a on topic Debounce and Base-Thread Help Needed
Dont use to many
SPACE Lines and also Comment lines #
from 2.8 update to 2.9 id id run in Problems on this issue
someone told me this
i removed this lines to a min at 2lines to the next and Wonders disapeard
Remember the planer does run to this files on regular bases this might interfear the system at Speed cuting
SPACE Lines and also Comment lines #
from 2.8 update to 2.9 id id run in Problems on this issue
someone told me this
i removed this lines to a min at 2lines to the next and Wonders disapeard
Remember the planer does run to this files on regular bases this might interfear the system at Speed cuting
Please Log in or Create an account to join the conversation.
6 years 9 months ago #155805
by Clive S
Is this true? As I like to add add a few spaces and ### In my files as I find then easier to read.
Replied by Clive S on topic Debounce and Base-Thread Help Needed
bbsr_5a wrote: Dont use to many
SPACE Lines and also Comment lines #
from 2.8 update to 2.9 id id run in Problems on this issue
someone told me this
i removed this lines to a min at 2lines to the next and Wonders disapeard
Remember the planer does run to this files on regular bases this might interfear the system at Speed cuting
Is this true? As I like to add add a few spaces and ### In my files as I find then easier to read.
Please Log in or Create an account to join the conversation.
Time to create page: 0.318 seconds