Hello Guest it is July 12, 2020, 04:40:02 PM

Author Topic: Help Modifying RefAllHome  (Read 1592 times)

0 Members and 1 Guest are viewing this topic.

Help Modifying RefAllHome
« on: March 14, 2018, 04:47:44 PM »
I would like to modify my Mach 4 RefAllHome script so that it homes only my X and Y axes and not the Z axis. Is this possible? Thanks.
Re: Help Modifying RefAllHome
« Reply #1 on: March 14, 2018, 04:59:22 PM »
Hi,
yes thats pretty straight forward, I'm at work at the moment but could help laterif someone hasn't already
pointed you in the right direction.

Craig
My wife left with my best friend...
     and I miss him!
Re: Help Modifying RefAllHome
« Reply #2 on: March 14, 2018, 09:31:35 PM »
Hi Craig,

Yeah, if I could get this figured out by the time I go back to work on Friday that would be great. I'm sure it's an easy change, but I haven't been able to find any guidance on this specific topic. Also, I was hoping to get some clarification on how to use a limit switch as a home/limit switch. Everything I've tried so far has resulted in Mach 4 either not being able to jog, or crapping itself and running past the switch and crashing. I have a Bridgeport Series 1. Z axis has separate limit switches which work fine as limit switches, but with the switch set as a limit/home at the same time, I can't RefAllHome without bad things happening. With the Z switches set as limit switches, I can't ref the other axes home, hence the need to change the RefAllHome script. With the switch set as Home only RefAllHome works great, but then I don't have a limit switch which is obviously bad.

On a related but separate topic, my X and Y axes each have only 1 limit switch that trips at the extents of travel. Mach 3 was smart enough to recognize that a limit switch triggered moving in one direction was either a -- or a ++ depending on the direction of travel at the time the switch was triggered and allowed you to jog back off of it. So far I haven't figured out a way to use only 1 limit switch as a -- and ++ limit switch. I never used the homing function when the machine was set up with Mach3, but I'm certain that the limit switches were operational the way I described. It sure would be nice if there was a way to use 1 switch as Home/--/++, but maybe that's impossible in Mach 4 and I need to lower my expectations. Thanks
Re: Help Modifying RefAllHome
« Reply #3 on: March 14, 2018, 10:01:44 PM »
Hi,
you want ONE switch to do THREE jobs. Ideally you would have one limit switch at the end of each axis and one
separate home switch on each axis for total 9 switches. As it turns out switches are cheap, crashing because you've
tried to economise on switches is expensive.

Craig
My wife left with my best friend...
     and I miss him!
Re: Help Modifying RefAllHome
« Reply #4 on: March 14, 2018, 10:05:47 PM »
Okay. Thanks for that, I'll keep that in mind.

So about modifying the Homing script...
Re: Help Modifying RefAllHome
« Reply #5 on: March 14, 2018, 10:23:08 PM »
Hi,
modifying the ref all home script is easy but what are you going to do for home switches?

Homing works by Mach driving an axis until it detects the activation of a home switch. Without a home switch Mach
has nothing to detect. If you have a limit switch you could use that, not my preferred option but you can
do it. It will mean that while the homing function is operating that the limit switches must be ignored. Just when
you are likely to have a stuff up you have to disregard your limit switches??? Thats like going to a race track
in your car but taking your seat belt off when you get there to go racing...it just doesn't make sense.

Craig
My wife left with my best friend...
     and I miss him!
Re: Help Modifying RefAllHome
« Reply #6 on: March 14, 2018, 10:29:03 PM »
Thank you for your concern about my limit switches. I very much understand the importance of limit switches, and if I could, I would put all of the limit switches on every axis. Rest assured that I eventually will put the correct amount of switches on my machine at a future date, but until then I just need it to work, and part of that means having RefAllHome on only the X and Y axes. If you know how to modify that code and would like to tell me how then I would really appreciate your doing so. Thanks
Re: Help Modifying RefAllHome
« Reply #7 on: March 14, 2018, 11:33:33 PM »
Hi,
to get the code, any code, to work you need home switches on your X and Y axes.

Do you have home switches on them?

Craig
My wife left with my best friend...
     and I miss him!
Re: Help Modifying RefAllHome
« Reply #8 on: March 14, 2018, 11:34:44 PM »
Hi,
I don't really care about limit switches, but you absolutely need home switches in order for a homing routine to work.

Craig
My wife left with my best friend...
     and I miss him!
Re: Help Modifying RefAllHome
« Reply #9 on: March 14, 2018, 11:45:28 PM »
Hi,
Yes, I have home switches on my X and Y axes. For the past year I've used the switches as they're currently configured as home switches. Now I want to use the switches on my Z axis as limit switches only. In the future I'll probably add a third switch to do homing on the Z axis, but for now I don't really need to home the Z axis, as I typically rezero between operations or tool changes anyway. Thanks