problen with debounce on sensor

More
24 Apr 2021 13:23 #206951 by Clive S
I am have a problem with the syntax with the debounce names type

loadrt dbounce names=db_breakaway,db_float,db_ohmic,db_arc-ok,db_x-home,db_y-home,db_y2-home,db_z-home

addf db_x-home servo-thread

net home-x db_x-home.in
net home-x-out db_x-home.out
Setp !!!!
# --- HOME-X ---
net home-x <= hm2_7i96.0.gpio.001.in

How do I setup debouce

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

More
24 Apr 2021 14:09 - 24 Apr 2021 14:09 #206952 by PCW
Replied by PCW on topic problen with debounce on sensor
setp db_x-home.delay 25
net raw-home-x hm2_7i96.0.gpio.001.in db_x-home.in
net home-x db_x-home.out
Last edit: 24 Apr 2021 14:09 by PCW.
The following user(s) said Thank You: Clive S

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

More
24 Apr 2021 17:54 #206961 by Clive S

setp db_x-home.delay 25
net raw-home-x hm2_7i96.0.gpio.001.in db_x-home.in
net home-x db_x-home.out


Thanks Peter.

I could do it in 2.8 but not in 2.9 with the names variety. To me the docs are not clear.

I will give it a go i;n the morning

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

More
25 Apr 2021 18:29 #207035 by Clive S

setp db_x-home.delay 25
net raw-home-x hm2_7i96.0.gpio.001.in db_x-home.in
net home-x db_x-home.out


Yes. It loads without errors. How can I check to see if it is actually working . IE how would I check lt in Halshow.

Many thanks.

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

More
25 Apr 2021 19:51 - 25 Apr 2021 19:52 #207038 by snowgoer540
Because the debounce time is usually so small, you probably won’t be able to notice it with Hal show.

You would be better watching this in halscope.

You could watch the db-xhome.in or the input pin itself and db-xhome.out. The output should be delayed by the time you have it debounced for.
Last edit: 25 Apr 2021 19:52 by snowgoer540.
The following user(s) said Thank You: Clive S

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

More
25 Apr 2021 21:03 #207041 by Clive S

Because the debounce time is usually so small, you probably won’t be able to notice it with Hal show.

You would be better watching this in halscope.

You could watch the db-xhome.in or the input pin itself and db-xhome.out. The output should be delayed by the time you have it debounced for.


Greg. I think it would be good if there was an example in the docs for QTPasmaC it does mention debounce but not how to achieve it.

The docs for 2.9 don't really cover the situation when using debounce using "names"

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

More
25 Apr 2021 21:28 - 26 Apr 2021 02:34 #207042 by snowgoer540
I will look into seeing if there’s room to clarify what’s there a bit, and maybe post a link to the proper manual if it’s not there.

In the meantime did you check this one out:

linuxcnc.org/docs/html/man/man9/dbounce.9.html

It’s a bit tough to find because dbounce and debounce are really close, google serves up the wrong one.

Edit: The docs read ok to me. There is also already a link to the dbounce docs in the debounce area of the qtplasmac user guide. I think the confusion is that google serves up the wrong doc because it thinks it should be spelled “debounce”. At any rate, I think specific examples for debouncing limit switch, etc. would be outside the scope of the qtplasmac docs.
Last edit: 26 Apr 2021 02:34 by snowgoer540.

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

More
26 Apr 2021 06:00 #207079 by Clive S

I will look into seeing if there’s room to clarify what’s there a bit, and maybe post a link to the proper manual if it’s not there.

In the meantime did you check this one out:

linuxcnc.org/docs/html/man/man9/dbounce.9.html

It’s a bit tough to find because dbounce and debounce are really close, google serves up the wrong one.

Edit: The docs read ok to me. There is also already a link to the dbounce docs in the debounce area of the qtplasmac user guide. I think the confusion is that google serves up the wrong doc because it thinks it should be spelled “debounce”. At any rate, I think specific examples for debouncing limit switch, etc. would be outside the scope of the qtplasmac docs.


Yes . I did find both versions in the docs. You are probably correct re the QTplasmaC docs .

This line

If debounce is required for other equipment like home or limit switches etc then more dbounce components may added in any of the HAL files without any regard to the signals listed here.


changes from debounce to dbounce

This is what was generated with my version of QTplasmaC

# ---PLASMA INPUT DEBOUNCE---
#values for these are in custom.hal ... but there was nothing generated in the custom hal
loadrt dbounce names=db_breakaway,db_float,db_ohmic,db_arc-ok
addf db_float servo-thread
addf db_ohmic servo-thread
addf db_breakaway servo-thread
addf db_arc-ok servo-thread

So I could not find the values anywhere, nor could I understand how to do it. The good thing is I learnt a lot .:)

I do appreciate all the help

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

More
26 Apr 2021 11:23 #207100 by snowgoer540

This line

If debounce is required for other equipment like home or limit switches etc then more dbounce components may added in any of the HAL files without any regard to the signals listed here.


changes from debounce to dbounce


That seems right to me. The first mention is talking about debouncing a switch, and the second is referring to the component "dbounce".


This is what was generated with my version of QTplasmaC

# ---PLASMA INPUT DEBOUNCE---
#values for these are in custom.hal ... but there was nothing generated in the custom hal
loadrt dbounce names=db_breakaway,db_float,db_ohmic,db_arc-ok
addf db_float servo-thread
addf db_ohmic servo-thread
addf db_breakaway servo-thread
addf db_arc-ok servo-thread

So I could not find the values anywhere, nor could I understand how to do it. The good thing is I learnt a lot .:)

I do appreciate all the help


How long ago did you make your config? I had a few backups people have posted on here over the last few weeks, only one of them had this stuff in custom.hal:
# for the float and ohmic inputs each increment in delay is
# is a 0.001mm (0.00004") increase in any probed height result
setp db_float.delay     5
setp db_ohmic.delay     5
setp db_breakaway.delay 5
setp db_arc-ok.delay    5

So either they took them out, or they aren't always getting put in for some reason. One reason I can see is if custom.hal already existed, but had nothing in it, it would not get that extra stuff. I am not sure in what cases this could be true, but from my 10s of looking at it, that's what I saw.

I will try to remember to check it out after work, but Phill might have to take a peek when he's back from vacation, and see if anything fishy is up.

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

More
26 Apr 2021 11:52 #207104 by Clive S

This line

If debounce is required for other equipment like home or limit switches etc then more dbounce components may added in any of the HAL files without any regard to the signals listed here.


changes from debounce to dbounce


That seems right to me. The first mention is talking about debouncing a switch, and the second is referring to the component "dbounce".


This is what was generated with my version of QTplasmaC

# ---PLASMA INPUT DEBOUNCE---
#values for these are in custom.hal ... but there was nothing generated in the custom hal
loadrt dbounce names=db_breakaway,db_float,db_ohmic,db_arc-ok
addf db_float servo-thread
addf db_ohmic servo-thread
addf db_breakaway servo-thread
addf db_arc-ok servo-thread

So I could not find the values anywhere, nor could I understand how to do it. The good thing is I learnt a lot .:)

I do appreciate all the help


How long ago did you make your config? I had a few backups people have posted on here over the last few weeks, only one of them had this stuff in custom.hal:
# for the float and ohmic inputs each increment in delay is
# is a 0.001mm (0.00004") increase in any probed height result
setp db_float.delay     5
setp db_ohmic.delay     5
setp db_breakaway.delay 5
setp db_arc-ok.delay    5

So either they took them out, or they aren't always getting put in for some reason. One reason I can see is if custom.hal already existed, but had nothing in it, it would not get that extra stuff. I am not sure in what cases this could be true, but from my 10s of looking at it, that's what I saw.

I will try to remember to check it out after work, but Phill might have to take a peek when he's back from vacation, and see if anything fishy is up.


I have only been playing with QTplamaC for a short time. So I believe I started with a new config.

In any event a custom.hal file should never get updated. Unless I suppose just once with a clean config.

setp db_float.delay 5


If I had seen the above it would have been simple B)

Thanks.

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

Moderators: phillc54
Time to create page: 0.137 seconds
Powered by Kunena Forum