Hello Guest it is March 28, 2024, 03:47:05 PM

Author Topic: Home switch as input  (Read 3933 times)

0 Members and 1 Guest are viewing this topic.

Offline Sweep

*
  •  150 150
    • View Profile
    • pollz.co.uk
Home switch as input
« on: December 15, 2012, 10:46:35 AM »
I would like to utilise my Z home switch for the additional purpose of ensuring the Z axis is fully retracted during tool changes.
As when I am referencing the Z axis it moves off the switch by a small amount I have set "home off" to -0.25mm which allows the Z axis to move to machine coordinate Z 0.00 and have the switch become active. I am doing this because I have recently lost steps whilst raising the Z axis during toolchange which has damaged my carousel due to i not being correctly aligned. Whilst, I appreciate, this will not solve the problem of missing steps, which could be a whole host of stuff, it is an added safeguard against further damage.

I have already used my spindle Index for a similar purpose with great success, e.g. If IsActive (INDEX) then..., but it won't work using the command If IsActive (M3HOME) then....etc

Any ideas?

Thanks ...Sweep

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Home switch as input
« Reply #1 on: December 15, 2012, 01:12:30 PM »
Did you try to set up one of the Inputs using the same pin settings as the Z HOME Switch? Then you can use IsActive(Input1).
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Home switch as input
« Reply #2 on: December 15, 2012, 01:17:37 PM »
You could also look at the Home LED for the Z, ie If GetOemLED(36)
Hood

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Home switch as input
« Reply #3 on: December 15, 2012, 02:31:11 PM »
As Long as your Z does use the switch for limits as well you are ok. Do as Hood suggest and use the HomeLed as the reference.

Then if you are missing steps mach3 will not return to G28 home(ledoff)  OR it will crash through the switch(;-)

The option is to Refhome the Z at tool change time . Bring the Z close to home with a rapid move then refhome(Z)  That way you KNOW for sure that it is at position EVERY TIME you change tools (;-)

BUT the best thing is to FIX the missed steps problem.

(;-)TP

Offline Sweep

*
  •  150 150
    • View Profile
    • pollz.co.uk
Re: Home switch as input
« Reply #4 on: December 16, 2012, 12:22:14 PM »
Thanks Guys.
I will try Hood's suggestion as I was trying not to duplicate Inputs for the sake of it. I tried the duplicated set up yesterday evening and it worked fine but I have a MPG that needs wiring in that will eat up most of my spare inputs. The GetOemLed seems the obvious way to do it, it's just I didn't have the experience to realise it  :-[
I do have two separate over travel switches on each of the 3 axis that are my final defence against mechanical damage
Not sure why I have the missing steps problem but it was obvious when it happened as I heard the motor groan. I don't have a particularly  fast feed rate or rapid acceleration (v=1000mm/min & 20mm/sec^2) set but I suppose I could lower the acceleration further.

Thanks ...Sweep

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Home switch as input
« Reply #5 on: December 16, 2012, 01:07:11 PM »
That velocity and acceleration is very conservative which points to your motor choice being too small for the axis.
Hood

Offline Sweep

*
  •  150 150
    • View Profile
    • pollz.co.uk
Re: Home switch as input
« Reply #6 on: December 16, 2012, 03:24:20 PM »
Yep, I guess I'm not going to break any machining speed records with those V & A figures!
As far as the motors are concerned they are the standard figment to my machine when it left the Denford factory. I suppose I should ask whether stepper motors loose their performance (magnetism?) over time as my machine was built in 1994.

I have used the GetOemLed and it works fine  :)

...Sweep

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Home switch as input
« Reply #7 on: December 16, 2012, 03:29:01 PM »
I know the motors fitter to the stepper driven Bridgeports could get weaker as the years passed so likely the same with other steppers.
Hood

Offline Sweep

*
  •  150 150
    • View Profile
    • pollz.co.uk
Re: Home switch as input
« Reply #8 on: December 18, 2012, 04:05:45 PM »
Not sure what the problem was as I've re-run the program a few more times without a problem.
The missed steps occurred when the z was lifting up without any cut so was just lifting the self weight of the z axis. Very strange.
I'll see how things go

Many thanks ...Sweep