Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: dbt3000files on May 26, 2011, 03:51:28 PM

Title: Possible to Enable Softlimit while Homing?
Post by: dbt3000files on May 26, 2011, 03:51:28 PM
I have a stepper motor driven linear actuator that I am using as my B axis.  When it occasionally gets jammed with something, I have no way of knowing until I check up on my machine.  What I would like to do is set my softlimits slightly beyond my homing switches.  When the machine tries to home the B axis but reaches a softlimit, it will essentially know that the axis is jammed and stop.  When I tried to implement this, Mach3 ignored the softlimits that I had set, because it turns them off when homing.  Does anyone know a way to override this?  This would be a HUGE help! Thanks!
Title: Re: Possible to Enable Softlimit while Homing?
Post by: andrewm on May 26, 2011, 03:58:45 PM
DoOEMButton(119) will Toggle Soft Limits in VB. You will need to edit the script behind the Ref All Home button(Operator>Edit Button Script>Ref All Home Button)
Title: Re: Possible to Enable Softlimit while Homing?
Post by: dbt3000files on May 26, 2011, 05:43:42 PM
Thanks, I think this is the right track but I still can't get it.  I need to run it as part of my program, so I created a macro that looked like this:
DoOEMButton( 119)
DoButton( 26 )

When I ran it, it just toggled off the soft limit and then homed B.  When I tried it without DoOEMButton( 119 ) it homed B and ignored the softlimit until was done homing.
Am I missing something?
Title: Re: Possible to Enable Softlimit while Homing?
Post by: BR549 on May 26, 2011, 09:00:30 PM
Personelly I would FIX the machine, BUT try this set your axis home switch as HOME and limit (same switch) Set the home position just OFF the home  switch position ( say .100" ) Then in your program send your axis HOME (G28) not rehome (G28.1) that way IF the axis has lost position it will overun the correct home position and trip it out on the limits.

The only other way is to use verify to confirm the home position.


Just Some thoughts, (;-) TP
Title: Re: Possible to Enable Softlimit while Homing?
Post by: Jeff_Birt on May 27, 2011, 05:36:54 AM
I don't think softlimits will work while homing. When you ask the machine to home you as saying, 'find out where each axis really is". Softlimits can only work after the machine is homed so it knows where it is.
Title: Re: Possible to Enable Softlimit while Homing?
Post by: dbt3000files on May 27, 2011, 01:08:19 PM
Thanks for all you guys help!  I think that there probably isn't a way to do what I wanted exactly.  However, I have it set up now to send the machine to where it thinks home should be, use GetOEMLED for my home switch, and if it doesn't return True, then I know something went wrong.  Basically BR549's same idea.
Thanks!