Acceptable/helpful to debounce spindle tach?

More
30 Dec 2013 05:05 #42178 by mtngun
As discussed on another thread, I'm struggling to get G76 threading to work satisfactorily on a lathe with a single spindle sensor (1 signal per rev).

Turning up the RPM helps quite a bit, so that the Z-speed "hunting" occurs perhaps 1 in 100 passes instead of 1 in 2 passes. The Z-speed "hunting" at higher RPM does seem to correlate to "blips" in the measured RPM. :(

However, even one bad threading pass would scrap the part, and it's an expensive part (gun barrels).

At PCW's suggestion, I've ordered the parts to replace my single sensor with an encoder. Hopefully that will help. But it may take a month or two for me to implement the encoder.

In the meantime, is it possible to filter out the occasional "blip" from my spindle sensor by using debounce? And if so, can someone please help me with the Hal (yes, I've searched, and am in the process of trying to modify my Hal, but I'm still too new to this to understand the half of it so I will probably need help to get it right). :blush:
Attachments:

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

More
30 Dec 2013 06:03 #42181 by mtngun
To my amazement, I seem to have figured out the Hal code for debounce and it actually seems to work (modified Hal attached).

The relevant hal lines were:

loadrt debounce cfg=1
addf debounce.0 base-thread
setp debounce.0.delay 5
net spindle-phase-a-raw <= parport.0.pin-13-in-not => debounce.0.0.in
net spindle-phase-a <= debounce.0.0.out

So far the Z axis is behaving itself while threading, even at 68 rpm. :woohoo:

Anybody see anything wrong with my debounce setup, or anything that could be improved?

Does the delay=5 seem reasonable?
Attachments:

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

More
30 Dec 2013 06:57 #42183 by mtngun
My first LinuxCNC thread, on a piece of scrap.



This is better than I was ever able to do in TurboCNC, so I'm a happy camper at the moment. :woohoo:

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

More
31 Dec 2013 07:24 #42210 by BigJohnT

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

Time to create page: 0.162 seconds
Powered by Kunena Forum