Limit Switch Troubles - HAL Debounce

More
6 years 9 months ago #156004 by ytiuqibu
Thanks Andy we can try this next week when I next have access to the machine. At the moment it is homing satisfactorily using just Home on the X and Z axes and we are relying on the soft limits rather than the limit switches. With this setup we eliminate the joint errors and can run jobs while we investigate options.

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

More
6 years 6 months ago #164223 by jay.perez1
Hi Andy,

Do you know if there's another thread that explains how to add this filter to my shared home & limit switches in layman's language ? I current have all of my NC switches connected to a single input pin on my parallel port breakout board.

Thanks in advance for any help.

Jay

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

More
6 years 6 months ago - 6 years 6 months ago #164267 by andypugh
Is this a layman who is happy to edit the HAL file?

You have a choice of using a single filter for both home and limit or choosing a slightly longer filter for limits to allow for more accurate homing. But as you are running a p-port and have a base thread, you can probably debounce in the base thread and then this distinction does not apply

Sample code. Note that you won't be able to use this as-is, it will need to be worked in to our HAL using the pin names and signal names from your HAL.
Code:
loadrt debounce cgf=1 ... addf debounce.0 base-thread setp debounce.0.time 20 ... net limit_raw parport.0.pin-00-in => debounce.0.0.in net limit_filt debounce.0.0.out ... net limit_filt axis.0.neg−lim−sw−in axis.0.pos-lim-sw-in net limit_filt axis.0.home-sw-in ... net limit_filt axis.1.neg−lim−sw−in axis.1.pos-lim-sw-in net limit_filt axis.1.home-sw-in ... net limit_filt axis.2.neg−lim−sw−in axis.2.pos-lim-sw-in net limit_filt axis.2.home-sw-in
Last edit: 6 years 6 months ago by andypugh.
The following user(s) said Thank You: jay.perez1

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

More
6 years 6 months ago #164345 by jay.perez1
Hi Andy,

Calling myself a Layman was way overstating my abilities, at least when it comes to HAL files and such ... ;-)

I'm certainly capable of cutting & pasting info into the file but I'm nowhere even close to being able to intelligently make changes without specific detailed information being fed to me.

Is the example you included setup for my situation where I have all of the NC switches on a single input pin on the BOB?

Something else I noticed, there's quite a bit more lines of code in the automatic email I received when you replied than there is in your message on the forum, and, a couple of the lines are Blue text on my phone but not here.

Jay

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

More
6 years 6 months ago #164346 by andypugh
I forgot the [code] tags initially.

And, for some random reason, the emails get code and pictures and some other stuff stripped out.

If you log in to the forum there should be a code sample to pick from.

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

More
6 years 6 months ago #165696 by jay.perez1
Hello Andy,

Thanks again for your earlier reply and the debounce sample you provided.

LCNC is tripping my limit switches when I turn on the spindle. All of the cables are physically separated and the limit switch cables are all shielded and grounded at the BOB end. Everything is fine when I power up the VFD but as soon as I command the spindle to rotate it trips the system. I'd like to try using the debounce to see if it resolves this.

The example you posted includes lines for all three axes. However, not sure if that's or necessary/preferred for my situation where I have all of the NC switches in series on a single input pin on the BOB. Would you please comment on that ?

Also, in your most recent reply to ytiuqibu below you mention having two separate values for Homing and Limit Switch tripping. Can I request/beg/cajole you to point me to or post an example on how to do that when using the combined switches ?

Regards.

Jay

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

Time to create page: 0.207 seconds
Powered by Kunena Forum