Hello Guest it is June 19, 2024, 06:29:53 AM

Author Topic: Is there a way to temporarily disable limit switches on initial enable?  (Read 902 times)

0 Members and 1 Guest are viewing this topic.

I have my clearpath servos set to home to hard stops when they are enabled by Mach4 for the 1st time after powering them up. I like this function but of course since I have added limit switches they will triggered.

Is there a way to keep the limit switches from being enabled until AFTER the home to hard stops is complete? I know I can have the HLFB output from the servo tell Mach4 several different things so I'm thinking there might be a way to tell Mach to keep the limits disabled until the input tells Mach it is done and ready to go to work.
I posted this on the CNCZone forum in response to your question:

the HLFB is usually used for signaling a fault to the controller, say an overload condition or a following error. If you want to use the HLFB for some other purpose the you would
lose the ability to signal a fault. Are you sure you want to do that?

You may have seen a button <Axis Limits Override>. May I suggest try using that, I believe it will disable the Limit switches and you will be able to use hardstops. Thereafter you'd
turn the Limits back on.

If that works then with a little scripting you could automate it.

'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Thanks Craig. I'll give that a try and see how it reacts.
why have limit switches?

At the moment you say that you Home to the hardstops? Is that correct?. If you have set up limits switches they will perforce be 'inside' the hardstops
or Home location. If you try to say 'go to machine Home', something like a G28 or G30, then you will hit the limit switches BEFORE you get to machine home.
That does not make sense to me.

I have my Limit switches set up about 2mm inside the hardstops, I have the SoftLimits programmed to be about 2mm inside the limit switches and the Home
switches about 2mm inside the SoftLimits. That means at any stage I can call G28 or G30 or <RefAll> and the machine will go to its Home location with violating
either the SoftLimits or the Limit switches or worse the hardstops. Because my machine Home is about 4mm inside the limit switches I have not had a Limit switch invoked
Estop for over a year. I still occassionaly have a SoftLimit event, where the machine just ignores the last move or jog I requested because it would violate the SoftLimits,
but that does not occasion any loss of reference, ie no Estop.

'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Hi Dbl_Tap,

I am an applications engineer at Teknic and came across this post and your other post on CNCzone. I want to provide some additional information on the ClearPath motor’s digital output, HLFB (High-Level Feedback).

You can configure HLFB to let you know when you’ve finished making a move (without losing the ability to know if the motor has faulted). HLFB, as you’re likely aware, is a user-configurable digital output which can be set into various modes, each of which outputs a number of different motor statuses. ClearPath's HLFB output can, depending on the mode, simultaneously provide the following data to your controller: real-time torque usage, Move Done (including when you’ve finished a homing move), In-position, and fault status.

A detailed discussion of all HLFB modes is covered in the ClearPath User Manual. I’d encourage you to review them and feel free to contact us if you have any questions. Please note that some HLFB modes provide multiple statuses and will require that you program your controller to identify them. I have not personally used the Mach4 controller, but based on joeavaerage’s comments above, it sounds like you can program/configure your controller in a number of different ways. So there should be an HLFB mode that will work for you.

If you have any other questions about ClearPath’s HLFB output or want to discuss your project with an applications engineer, please feel free to contact us at https://teknic.com/contact/ or give us a call (585-784-7454).

-Ian R. – Teknic Applications Engineer
I'm going to make a couple of wild guesses about this problem.

If I understand from your CNCZone posts the <Limit Override> button does not work as we had imagined /hoped.

In the early days of Mach when everyone used a parallel port it was very much neccessary to economise on switches because there were so few
spare inputs. It was common to use a limit switch in double duty as a home switch. Many people still do that today despite having hardware that
means we no longer have to do this.

Mach would when homing treat limit switches as homes.

Does this not sound like what is happening to you? That is when you are homing, and expecting the axis to home to the hardstop it encounters a limit
switch, which in this mode of operation is considered a home switch. Mach then does what it normally does, is stop and then back up a wee bit.
While it is not your intention my guess and its is only a guess that this behaviour is because thats what Mach has always done.

That would suggest the the <Limit Override> button will not work.

There is however an API that will probably do what is required, not that I have used it...so its up to you to experiment with it:

Code: [Select]
LUA Syntax:
rc = mc.mcSignalEnable(
number hSig,
number enabled)

Enable or disable a signal mapping.

This, at least at first glance, allows you to enable a signal or disable it programmatically. I think that should do the trick.

'I enjoy sex at 73.....I live at 71 so its not too far to walk.'