1 Week Ago #1
I'm just commissioning my new router and have been testing limit/home switches. I am using NPN NC proximity switches, running off 24V. I started by doing basic limit switch testing - jog gently towards the limit switch and check that it worked. I have combined home/limit switches at one end of each axis (XYZ), limit at the other (XY), and just at one end for Z. Pretty standard configuration; for me it was easier to mount two switches than have one travelling switch and I had bought a box of 10 off eBay anyway. I am using three separate inputs on a CSMIO-IP/M so each axis has its own input with cascaded pairs of switches on X and Y.
Limit switch functions worked fine - good reliable stop. Then I moved to checking homing function with Mach3 and that's where I started seeing problems. Using "Ref All Home", Z homes to the top of travel, overshoots slightly, and then moves off the switch to find home. Usually. However, I get frequent "limit switch" trips and when I look closely, I see that the LED indicating on/off on the Z prox switch is flickering slightly. I had noticed something like this when I first fitted the switches and was just testing them by winding the relevant axis by hand, using the LED as an indicator as the IP/M was not connected at the time. Some of them seemed to have a pretty sharp cutoff, and some seemed to have a slight area of uncertainty. I put this down to them not being fully wired in and that the input circuitry of the motion controller would sharpen up the switching point.
What I think is happening is that Z moves to home, overshoots as expected, and then backs slowly off. However, the IP/M detects "home" the first time the switch trips, but because the switch then changes state a few more times (and goes on doing this) this is detected as a limit switch event. Even if the Z homing works OK (maybe 50% of the time) as the other axes home, the vibration (???) shakes the Z axis slightly, and the limit function trips again. On X, I have made the target block as square-edged as possible for the most accurate triggering; on Y I use the edge of the ballnut but that is also fairly square; on Z I am using the end of the Hiwin rail which has something of a bevel on it. Don't know if this is a contributory factor.
It might be noise related as I can have the machine sitting with the Z switch LED flickering and then hit e-stop (which turns off power to the motors, amongst other things). The flickering stops, but restarts when I reset Mach3. I shall try taking the switch cable out of the drag chain it shares with the Z motor cable (CY screened) to see if that helps, but I ran out of time this evening.
It might be a cheap and nasty set of switches, of course - one of them was completely faulty from new. Has anyone seen anything like this before? I know that JazzCNC has demonstrated excellent repeatability of these switches but maybe that was with a better quality switch!
1 Week Ago #2
Neale I don't know anything about CSMIO-IP/M but could it be something simple like a floating input that might have to be pulled high etc. Or the grounds of the ps not connected
Last edited by Clive S; 1 Week Ago at 12:17 AM...Clive
1 Week Ago #3
I was of the understanding (seem to remember Dean saying it) that you couldn't use the same proxy as limit and home with the IPM?
Sent from my HUAWEI VNS-L31 using TapatalkNeil...
1 Week Ago #4
Wild guess, the switch output is an open collector and your pull up resistor isn't connecting.
1 Week Ago #5
Thanks for the comments, guys.
Don't think that it's pull-up problem as the IP/M has a bit more sophisticated input arrangement that does not need these. In any case, the indicator led on the switch itself flickers which suggests a problem upstream of the IP/M.
Grounding - I'll come back to that.
Don't remember anything in the docs that says that IP/M does not support combined home/limit switching; that bit seems to work and it's just the unreliable home switch trip (again, you can see this at the led without considering the motion controller) that does not work. In other words, the IP/M seems to work as per standard Mach3 functionality.
Now - grounding. For testing the control box is sat on the floor in front of the machine. So the wire from the star point in the box is not connected to the mounting bolt as intended. I shall sort this out, but I seem to remember noticing that there was not a clear switching point when testing using a bench power supply, so I'm starting to suspect that this is not noise-related.
Around 4 am I woke up thinking about hysteresis. When I was reading up on these switches, I remembered seeing something about this so I have just gone back to check. Typically, these things should have a hysteresis range of 10-20% of the switching distance, so about 0.4-0.8mm in my case. Switch-on and switch-off points are separate, specifically to avoid this kind of switching uncertainty and the possibility of false switching when things vibrate. Just what I'm seeing. I think that some of my switches are better than others so I shall go back and test more carefully. Anyone know a source of good examples of these switches? My ebay source doesn't seem to be there any more. I wonder why?
Please keep comments coming. The silliest problems are always the ones you can't see yourself
1 Week Ago #6
Neile How about setting the home position to say about 2 -3 mm away from the switch so that the limit won't see it any more. Just a thought!..Clive
1 Week Ago #7
I might be completely misunderstanding what you are doing, but...
An NPN output usually requires a separate pull up resistor
If you want to gang them up on one line you get NO not NC
1 Week Ago #8
Home position - problem here is that the same switch is home and limit. During homing, Mach3 disables limit function to allow homing to take place (l believe). It homes, and then immediately re-enables limit function and the next "flicker" (random switch operation) trips the limit. I think! Sometimes the z homing does work, and Mach3 starts the XY homing (I home both together). I suspect that gantry vibration then trips the hair-trigger Z limit switch again and it all stops. I could, I suppose, move z away from the home position once it has homed (if it does without tripping a limit) so that subsequent vibration does not cause false triggers, but that's not really fixing the underlying problem.
Pull-ups - IP/M doesn't work that way. A lot of BOBs use some kind of buffer input so you use a pull-up/pull-down resistor to one rail and switch to the other rail. The IP/M input looks rather like an opto-isolator input (with some clever current limiting, etc, to handle a range of input voltages and with both ends brought out to a terminal block) so you take one end to one of the rails and switch to the other. In my case, with open-collector NPN switches, I take one side of each input to the 24V rail and switch the other side to ground. My X and Y axes both have two switches wired in cascade (effectively in series as they are NC); this seemed to work fine testing on the bench and seems to work OK on the machine for limit switch purposes. In any case, the problematic axis at present is Z where there is only one switch anyway!
Sorry if I might come over as teaching anyone to suck eggs but I wanted to explain some of my reasoning to people with less knowledge; sometimes those with less knowledge make fewer assumptions and can see wood for trees
Personally, I still suspect those switches...
Last edited by Neale; 1 Week Ago at 12:10 PM.
1 Week Ago #9
1 Week Ago #10
I bought a box of ten a couple of years ago (this machine has taken longer to finish than I expected!) I have fitted 6, so I have gone through the rest of the box testing each of the other four. I bolted each one in turn to the machine so I could trigger it by turning the ballscrew by hand and connected it to a bench power supply. So, completely independent of the control box, motion controller, etc.
One does not work at all. One turned out to be an "EX" version which only had two wires instead of a three-wire AX. The other two both have this sharp switch-on/switch-off point with a microscopic movement of the ballscrew needed to go from on to off with a flickering stage between. As I understand it, this is not what a proximity switch should do - there should be a difference between on and off trigger points to avoid exactly this situation. I think I have a bad batch of switches.
By magicniner in forum General DiscussionReplies: 15Last Post: 07-01-2015, 08:59 PM
By manofgresley in forum Milling Machines, Builds & ConversionsReplies: 22Last Post: 26-08-2014, 07:06 PM
By Fivetide in forum General DiscussionReplies: 4Last Post: 28-09-2012, 12:06 PM
By motoxy in forum Machine Control SoftwareReplies: 18Last Post: 30-08-2012, 12:26 PM
By C.AlveSilva in forum Linear & Rotary MotionReplies: 1Last Post: 17-04-2012, 11:53 PM