Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Davek0974 on March 12, 2016, 11:02:59 AM

Title: Limits - Am i being too smart ;)
Post by: Davek0974 on March 12, 2016, 11:02:59 AM
Finally got round to testing my new mill build, all motion is 100% which was most pleasing ;)

Then I got too big for my boots and tried fitting a limit switch, using inductive sensors this time, NO type.

My brilliant idea was to use one sensor on the moving part of the axis and have two adjustable targets, all good so far;)

Got that lot fitted and set X+, X- and X-Home all to one input (this was the smart bit I thought)

But....

The limits work but I cannot jog off of either end - it just shows "Limit switch triggered" immediately after pressing Reset, and the home works but immediately throws a limit fault after homing.

So...

Am I correct in now thinking that I am indeed a twat and you must have TWO sensors or have I missed something simple??

These sensors seem to not flip on or off - they flicker a little as the target gets near - is this normal??
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 12, 2016, 11:51:05 AM
Another brain-fart (had a coffee);)

Use the single sensor as X-Home only and then apply soft-limits and slow-zones??

Another single sensor for Y axis home.

Z axis?? - Home is at top of travel for mill (as opposed to plasma) am i right??

AFIK soft-limits are in Machine co-ords and being a mill, having it homed accurately would be pretty important i think?
Title: Re: Limits - Am i being too smart ;)
Post by: Hood on March 12, 2016, 01:12:22 PM
Do you have Auto Limits Override enabled?

If your sensors are flickering then that is not a great thing, try some debounce Interval.
Hood
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 12, 2016, 01:16:50 PM
I've just found the auto limit override on my laptop setup - i searched the settings screens but it was tucked away on the settings page, will apply it tomorrow.

I am slightly concerned about the sensor flickering, my previous experience was that they just flicked on and off, but those ones were like £30ea, the are ebay ones and i got 6 for about a tenner ;)

Maybe they are just sh1te.
Title: Re: Limits - Am i being too smart ;)
Post by: Hood on March 12, 2016, 01:26:07 PM
The flickering would be the equivalent of bounce on a mechanical switch and will cause lots of problems.
Debounce may help though.
Hood
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 12, 2016, 01:40:17 PM
hmm thats not sounding good, what sort of value would you start with for debounce?
Title: Re: Limits - Am i being too smart ;)
Post by: Hood on March 12, 2016, 01:41:13 PM
Try 2000 and if it helps work down until it stops working then bump up a bit.
Hood
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 12, 2016, 01:44:00 PM
Thanks Hood, will be on it tomorrow;)
Title: Re: Limits - Am i being too smart ;)
Post by: leversole on March 12, 2016, 09:23:12 PM
Try 2000 and if it helps work down until it stops working then bump up a bit.
Hood

I have good quality mechanical swtiches that homing wont back off from, read about debounce, tried 4 (I thought it was 4 time 40ms?!?), no change...will put 2000 in tomorrow and see if it fixes it!
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 13, 2016, 06:33:53 AM
Sorted :)

These switches cannot be used for combined homing/limits - the flickering immediately triggers a limit fault after homing as it sees the flicker as the next sense input. Probably just crap sensors.

My fix was to use them for homing only, then add soft limits to control the position limits on all axes - the mill will always be homed when in use so this seems a safe option.

However, as the sensors all use one input, it sees the flickering as the next axis sense and just zeros all the dro's - did i say these sensors are crap?

The fix - modify the home-all button script to something like this for all axes...

DoButton( 24 )
While IsMoving()
Wend
DoOEMButton(133)
While IsMoving()
Wend
Code "G53 G1 z-3 F500"
While IsMoving()
Wend

This runs the home, zero's the DRO, then steps back 3mm which is enough to get the target clear of the sensors, then it moves onto the next axis and so on. It works perfectly but does leave the tool at X3, Y3, Z-3 but then you can jog back if it matters as the soft limits will stop a crash. It does NOT work without the While IsMoving lines in there. Debounce does NOT make any difference and is now set to zero.

I guess I could add a move to zero on all axes after the homing finishes, just to park it all at zero.

A video of homing working nicely...
https://youtu.be/T2CeluqhRl4

Now i can start final wiring and finish the build, damn good fun playing with it though :)
Title: Re: Limits - Am i being too smart ;)
Post by: ger21 on March 13, 2016, 08:22:44 AM
If your not using the encoder DRO's for anything, you can emit the DoOEMButton(133).
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 13, 2016, 08:27:54 AM
Ok, thanks i'll pull that out.

I'm still not happy though as homing accuracy seems poor, probably these sensors again, i have run many dozens of homes and the actual home position varies by about -0.4mm and + 0.6mm which i think sucks, but i may be wrong here??

Debounce was tried but makes little difference.

I might order some full-price sensors from CNC4YOU and try them out.
Title: Re: Limits - Am i being too smart ;)
Post by: ger21 on March 13, 2016, 09:04:35 AM
Yes, ±.5mm sucks for homing accuracy. :)
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 13, 2016, 09:33:21 AM
Seems i have a BOB PSU issue - if i run the BOB and sensors from my bench PSU it all works perfectly, no flickering LEDS or false triggers and i can enable the limits properly.

If i run from the 15v SMPS i get flickering LEDS and duff sensing, but it only does it when the drives are enabled! Had not noticed that before, seems the drives/motors/psu are interfering with the BOB some how.

Getting baffled now :(
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 13, 2016, 10:47:24 AM
Well, I am just about ready to give up for the day! And I hate shutting up shop on a negative position. :(

It works fine if i run off the variable bench PSU but not on the little SMPS, but i don't think it's needed to spend £110 on a PSU just for the BOB!

Here's a video showing the result on the SMPS...
https://youtu.be/m9_6XrzW0Fc

And here's one showing what I expected and indeed what I get on the bench PSU...
https://youtu.be/XcI2J5RcyrE

Now the big question is WHAT DO I DO??

Obviously I will be throwing this at CNC4YOU as it's all their components but they usually blame the setup or the earthing or the wiring blah, blah, blah...

Facts...

The drive PSU & drives wipe out FM radio when engaged.
The BOB PSU does not work with my sensors.
The sensors appear fine when on a different PSU.
I am a bit p1ssed off at present as this little setup should have been easy ;)

Just about ready to pour a big one.
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 13, 2016, 11:08:19 AM
If your not using the encoder DRO's for anything, you can emit the DoOEMButton(133).

BTW i took that line out and now it does not zero the work DRO's so i guess I'll be putting it back ;)
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 15, 2016, 02:30:44 PM
Well, I'm officially baffled but very happy!

Changing the BOB PSU has completely fixed the issue, I have now got sensible homing routine, all limits working and the homing accuracy is now better than 0.1mm, more like 0.00 to -0.06mm variation over 25 homing calls.


:)
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 15, 2016, 02:31:33 PM
Yes, ±.5mm sucks for homing accuracy. :)

Now 0.00 to -0.6mm I think that's acceptable??
Title: Re: Limits - Am i being too smart ;)
Post by: ger21 on March 15, 2016, 02:36:01 PM
Is it .6, or .06mm?
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 15, 2016, 03:06:15 PM
I ran 25 homing routines and the dial indicator I had on the Y axis varied from zero to -0.06mm overall, generally nearer to zero.
Title: Re: Limits - Am i being too smart ;)
Post by: ger21 on March 15, 2016, 03:18:02 PM
Your previous post said 0.6.
Yes, .06 is not bad.
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 15, 2016, 03:24:11 PM
Yes, the previous one was measured when the sensors were not working correctly, the new PSU has sorted that out 100%
Title: Re: Limits - Am i being too smart ;)
Post by: ger21 on March 15, 2016, 03:46:01 PM
Now 0.00 to -0.6mm I think that's acceptable??
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 15, 2016, 03:51:34 PM
Bugger, apologies, typing too fast.

0.06 :)
Title: Re: Limits - Am i being too smart ;)
Post by: Hood on March 15, 2016, 04:16:35 PM
It sounds not too bad for a prox, especially a cheapo.
I preferred to use optos on the machines before I had Index homing capability. I did a test when I first got the optos fitted to a manual Bridgeport conversion. I still had a digital readout connected so was able to see where the axis was via the glass scales. I homed the machine and zeroed the Digital Readout then jogged away and homed again. I did that 100 times and only once or twice did the display not show 0.000mm and the couple of times it did read something else it was 0.005mm.

The optos were bought from the USA, they were inside a waterproof enclosure and had a spring loaded rod held central and a flag on the rod which was blocking the opto until the rod was pushed one way or the other. Can't recall the place I got them from as it was so long ago but I think they changed hands and stopped selling them anyway. I made a few of my own up as it was a great idea. As said however all my machines can home to the Index pulse of the encoder now so I have no need for them, just decent quality mechanical switches are all I need.
Hood
Title: Re: Limits - Am i being too smart ;)
Post by: Mogal on March 15, 2016, 04:23:17 PM
Sorry for stepping in, but 0.06mm or 0.002" is considered good?
I've been struggling with a new computer / wiring scheme.

My last program run was 3 hours, and at the end of it, the machine reported:
X = 0.0059" Y = 0.0004" and Z = 0.0002" <-- This was using the "verify" function.

Is this acceptable? I think I might have some binding on my X axis causing the losses there.
"Verify" never returns "Verified correct" I have mechanical limit switches.

Thanks,
Chris
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 15, 2016, 04:38:39 PM
Is that with servos/encoders or steppers?

I could probably tighten up a bit more by slowing the homing rate down a bit more, slotted opto's would certainly be better though.
Title: Re: Limits - Am i being too smart ;)
Post by: Hood on March 15, 2016, 04:39:55 PM
Verify is not really telling you whether your Home switches are good or not, what it is saying is the axis is out of position with reference to the home position as defined by the homing procedure.
Now it could be your home switches are not accurate and the axis was actually where it was or it could be the home switches are fine and the axis had lost position or lastly it could be a combination of both.
Simplest way to see would be Home, jog off relatively slowly and then Verify. If it is out then you will know your home switches are not the best, if it is not out then it is likely missing steps issue.

Regarding 0.06mm being good, all depends on the type of machine and how much you rely on using the Home switches as a reference, for me, on a metal cutting machine, it is not great, in fact it is poor. On a wood router however it is probably more than is required.

Hood
Title: Re: Limits - Am i being too smart ;)
Post by: Hood on March 15, 2016, 04:47:08 PM
Dave, it was steppers on that first retro, geared 3:1 if I recall.
Hood
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 15, 2016, 04:51:38 PM
I think it will work for a while, this is a mini multipurpose machine and I can easily upgrade sensors later if needed, i'll try slowing homing a little more and check that as well.
Title: Re: Limits - Am i being too smart ;)
Post by: Hood on March 15, 2016, 05:00:41 PM
Once you get it up and running you can use it to make housings for enclosing optos :)

Hood
Title: Re: Limits - Am i being too smart ;)
Post by: Davek0974 on March 15, 2016, 05:05:45 PM
:)