Author Topic: Homing and Limit Switch Probblems.  (Read 56855 times)

0 Members and 1 Guest are viewing this topic.

Offline lvanduyn

  • Active Member
  • Posts: 8
    • View Profile
More Homing and Limit Switch Problems.
« Reply #10 on: August 06, 2010, 10:14:04 PM »
  I also have something strange going on with the limit switches.  I have a home switch at one end  and a limit at the other end of each axis.  Each switch is wired normally open and the two are in parallel.  X axis is connected to input 11, Y to 12, Z to 13, and A to 15.   The parallel port monitor page shows pin 11 to be low and the other 3 to be high as they should be.  In fact all are high and go low with switch activation  as is verified by looking at the LEDs on the breakout board.  Toggling the home or limit on the X axis makes the bit go high on the PP monitor screen.  Exactly backwards.  The other 3 display as they should.  All inputs are marked as neg active on the setup page and the homing/ref all works as it should.  
  So the question remains - why is input 11 shown backwards from the rest???
  Larry

Offline DaveCVI

  • Active Member
  • Posts: 558
    • View Profile
    • Calypso Ventures - home of MachStdMill
Re: Homing and Limit Switch Probblems.
« Reply #11 on: August 06, 2010, 11:21:44 PM »
This is a bug. Thanks for spotting it.

The reason X acted backwards is that it was on pin 11. Pins 1, 11, 14 & 17 have hardware inversion on the lines.
The logic that drives the led display for the PP page was forgetting to invert the LED state to compensate for the hardware inversion in the PP. Thus the Leds for pins 1, 11, 14 and 17 were displaying "reversed".

You other switch signals were ok as they were on pins 12,13,14 which do not have PP hardware inversion.

I've fixed this for the next MSM release.

Dave

  I also have something strange going on with the limit switches.  I have a home switch at one end  and a limit at the other end of each axis.  Each switch is wired normally open and the two are in parallel.  X axis is connected to input 11, Y to 12, Z to 13, and A to 15.   The parallel port monitor page shows pin 11 to be low and the other 3 to be high as they should be.  In fact all are high and go low with switch activation  as is verified by looking at the LEDs on the breakout board.  Toggling the home or limit on the X axis makes the bit go high on the PP monitor screen.  Exactly backwards.  The other 3 display as they should.  All inputs are marked as neg active on the setup page and the homing/ref all works as it should. 
  So the question remains - why is input 11 shown backwards from the rest???
  Larry
Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com

Offline handsmfg

  • Active Member
  • Posts: 65
    • View Profile
Re: Homing and Limit Switch Probblems.
« Reply #12 on: August 07, 2010, 08:04:26 AM »
Hey guys thanks for all the help. Daves post  about the debounce setting in general config being set at 0 was the correct fix. i set it to 2000 and closed MSM down and then reopened and now i can home in MSM just like in 1024. Ok this raises my last and final question on this issue. What is an exceptable debounce level and how high is too high? Right now I have it set at 4000. I've had signal noise issues in the past and had it so high that none of my inputs worked at all. which I assumed Mach was looking for an input signal but since the debounce was set so high it was taking too long for the signal to keep up with the CPU clock. I think I read on the Mach3 form that 4000 to 8000 was good. Thanks.

Eric

Offline DaveCVI

  • Active Member
  • Posts: 558
    • View Profile
    • Calypso Ventures - home of MachStdMill
Re: Homing and Limit Switch Probblems.
« Reply #13 on: August 07, 2010, 11:12:03 AM »
Good to know that we have identified what the problem was.

Here is some info re debouce:
4000 is a pretty high debounce setting.

Mach's debounce is really a software fix for a hardware problem.
The ideal solution is to remove the noise form the system and use a debounce of 0.
Many people either can't or don't want to expend the effort required to accomplish that.
The pragmatic approach is to lower the debug number until the problem reappears, then raise it back up a little.
That leaves the issue of "How do I tell if my required debounce setting is too high"?

"Debouce" is the amount of time a signal must be continually "on" before mach will consider it as just having turned on.
Each number in the DRO represents about 40usec of time (25kHz Mach: 1/25KHz = 40uSec)
A debounce of  40uSec* 4000 = 160mSec. That is a long time for a computer, it's even pretty noticeable to a human.

At 4000, the probe signal has to be on for a minimum of 160ms before mach will see it and stop the probe motion.

How fast are you probing?  Let's just pick a number for illustration:
Say you are probing at 50ipm; during the debounce interval the probe will have moved (50ipm * 160msec ) / 60 sec/min = 0.133 inches....
so the probe will travel 0.133 in past where the edge is before mach will think the probe is triggered - and then it has to decelerate and stop.....
One might want to consider - how much tip travel does the probe have? 0.133 inches over travel could be hard on the probe -  depends on the probe design.

Same scenario with 200 debounce: 50ipm * (200*40usec) / 60 sec/min = 0.0067 inch over travel

Personally, I prefer to see a debounce of no more than a few hundred. but the real answer is whatever combination works that makes the machine run reliably.

Play with the numbers and decide what you are comfortable with.

Dave
Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com

Offline handsmfg

  • Active Member
  • Posts: 65
    • View Profile
Re: Homing and Limit Switch Probblems.
« Reply #14 on: August 07, 2010, 11:29:32 AM »
Since I can home now, I decided to jump into my probing issue that I mentioned in my first post. I have never probed before so I thought I would try and get it to work. Before I had all incoming power cords grounded to the mill frame. I was getting feed back voltage to my BOB and it was sending the 5vdc for my BOB to ground every time the probe light came on. I disconnected the grounds that ran to the frame and they are not attached to anything. My star ground for limits and metal controller box go to another earth ground separate from house ground. I set everything up and got my probe to light up Mach3 probe light using the MSM profile. I was getting false probe touches indicating signal noise i guess when i wasn't probing so I installed a 1uf capacitor across pin input and 5vdc out on board which I have going to mill frame. I use a 1uf cap. on all my encoder read heads for signal noise suppression. The probe light stopped twitching and finally was stable. I tried probing again and it worked. Today has been a day of surceases so thank you Dave and all others for inspiration. It took a long time to get to this point and lots of mistakes and lots of fried hardware. It was fun and rewarding but also very expensive. This thread can now be put to bed problem fixed. So again thanks to all.

Eric

Offline DaveCVI

  • Active Member
  • Posts: 558
    • View Profile
    • Calypso Ventures - home of MachStdMill
Re: Homing and Limit Switch Probblems.
« Reply #15 on: August 07, 2010, 11:36:32 AM »
Eric,
It's good to know you have it working now - have fun!

Dave
Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com

Offline Aetherins

  • Holding
  • Posts: 1
    • View Profile
Re: Homing and Limit Switch Probblems.
« Reply #16 on: August 16, 2016, 03:55:37 AM »
Eric,
It's good to know you have it working now - have fun!

Dave


Yeah Dave. I agree with you.