Hello Guest it is March 28, 2024, 07:05:54 PM

Author Topic: Home and limit switches  (Read 2079 times)

0 Members and 1 Guest are viewing this topic.

Home and limit switches
« on: August 06, 2018, 05:58:36 PM »
I went to home my machine today and y does not work right, I shut down last night turned it on today and the Y axix heads for home 0 as always, it bumps the switch backs off and reverses right back into the switch putting it in stop mode. Can't figure that out.

I checked all my settings and nothing has changed since turning off last night.


I feel like i am chasing a ghost. Some suggestions would be great.

Ken

Offline Mauri

*
  •  328 328
    • View Profile
Re: Home and limit switches
« Reply #1 on: August 06, 2018, 06:50:35 PM »
lumber60,
As I mentioned in another Post, you could do it in Screen Load Script.
The first one is not Ref all Home part of Mach4 screen set  and the Second one is you add another button below the first and resize the first so it fits and call the function like the Ref all Home but with the following.
Then you can make the offsets like you need for your machine needs, this is an alternate method if you find that you have issues with Mach4 and your Controller when Homing.
Regards,
Mauri.


In New Button
RefAllHomeWithOffset()
-- Homing Offset
offset_applied ="false";

In Screen Load Script.
---------------------------------------------------------------
-- Ref All Home() function.
---------------------------------------------------------------
function RefAllHome()
   mc.mcAxisDerefAll(inst);  --Just to turn off all ref leds
   mc.mcAxisHomeAll(inst);
   coroutine.yield() --yield coroutine so we can do the following after motion stops
   ----See ref all home button and plc script for coroutine.create and coroutine.resume
   wx.wxMessageBox('Referencing is complete')

end
---------------------------------------------------------------
-- Ref All Home With Offset() function.
---------------------------------------------------------------
function RefAllHomeWithOffset()
    mc.mcAxisDerefAll(inst)  --Just to turn off all ref leds
    mc.mcAxisHomeAll(inst)
    coroutine.yield() --yield coroutine so we can do the following after motion stops
    ----See ref all home button and plc script for coroutine.create and coroutine.resume
    mc.mcCntlGcodeExecute(inst, "G1 X0.1 Y0.1 F30")
   --mc.mcCntlGcodeExecute(inst, "G1 X0.1 Y0.1 Z0.1 F30")
   coroutine.yield()
    wx.wxMessageBox('Referencing and Offset Completed')
end
Re: Home and limit switches
« Reply #2 on: August 07, 2018, 10:31:40 AM »
Why would this happen now after 3 days of working fine?????


Ireally don't know where to find the item you are reffering to.  Some of us are beginners and need to have things in step by step where to find and how to do instructions.


Re: Home and limit switches
« Reply #3 on: August 07, 2018, 11:14:38 AM »
Hi Ken,

Quote
Why would this happen now after 3 days of working fine?Huh?

Something has changed. The problem is that your machine is wherever you are and we are elsewhere. You are going to have to dig in
and find it.

I suspect the problem comes about because you have home switches and limit switches doing double duty. I realize that using a UC100
you have to combine them because you don't have enough inputs. If you had say, a UC300, which has many many inputs you wouldn't have
to do it and confusing faults such as you've come across  don't happen.

Turn Mach on but instead of referencing  using the <Ref All> button, go to the machine diagnostics page and using the buttons provided
reference each axis in turn. I'm guessing what is happening is that the Y axis is homing per normal but then as the machine goes to home the next axis in
queue the Y axis attempts to move and immediately limits out. By referencing each axis individually you may catch the machine doing something a bit weird
at a certain time and therefore give you an insight into whats changed.

I really want you to think about getting a controller with more inputs than the one you've got so you can wire switches individually. I can hear you moaning and
whineing from here! Guess what....I don't bloody care.....I've time and time again urged people to NOT combine home and limit switches so this sort of rubbish
doesn't happen. I've long since lost patience when it craps out for those who don't bother to listen.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Home and limit switches
« Reply #4 on: August 07, 2018, 12:46:38 PM »
Craig,
I greatly appreciate all your insperational help to those NOT AT YOUR LEVEL . We all have a bad day occasionally!!
No matter how bad my day is i always try to make someone elses better.

I will reaseach yuour suggestion about changing controllers and make my decision based on that! At the time you suggested that previously my machine would refference just fine, my thought is if it isn't broke don't fix it.

I will let you know what my result are!

Thanks again for all your insight


Ken
Re: Home and limit switches
« Reply #5 on: August 07, 2018, 02:42:57 PM »
Hi,
the UC100 will work....its just that the limited number of inputs requires you combine limits and home switches. It results in confusion
for you and small changes can break homing and limit functions. I suspect that whats happening to you.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Home and limit switches
« Reply #6 on: August 07, 2018, 02:49:43 PM »
You are probably right. I am trying to back track every step etc, has to be something i inadvertantly changed. big fingers small buttons


Searching
Ken
Re: Home and limit switches
« Reply #7 on: August 07, 2018, 03:08:22 PM »
 I was going through the changes and remembered i was experimenting with the different buttons and so on. I had set soft limits and homing and didn't realize that i had to activate the switch for the gui to have it all to work.


Ref all home 15 times turned switch of and back  to not working right. Sounds simple to me it just took me a long time to get there. Sometimes trial and error is how we get there. Hope it works.

On to trying to learn more about this. I learn someyhing new every day.


Ken
Re: Home and limit switches
« Reply #8 on: September 12, 2018, 12:44:54 PM »
Any last minute suggestions before i purchase the mach 4 license. I have things pretty well figured out i think and a want to do more kind of thing. Things seem to be running fine, very pleased with all of the help.



ken
Re: Home and limit switches
« Reply #9 on: July 18, 2019, 03:16:58 PM »
is coroutine.yields a std function that comes with mach 4 or does it need to be defined.  If it needs to be defined are there examples that can be obtained. 

I am looking to setup a wait until homing completes before executing a mc.mccntlexecute statement.  at the moment the script is trying to execute both mc.mccntlexecute before the homing completes.