Hello Guest it is March 28, 2024, 02:17:38 PM

Author Topic: Turning on soft limit with home button  (Read 3988 times)

0 Members and 1 Guest are viewing this topic.

Turning on soft limit with home button
« on: September 08, 2011, 04:41:47 PM »
What line of script do I have to add to the home button to turn soft limits on when it's done homing?

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Turning on soft limit with home button
« Reply #1 on: September 08, 2011, 04:48:12 PM »
DoOemButton(119)

(;-) TP
Re: Turning on soft limit with home button
« Reply #2 on: September 08, 2011, 05:29:34 PM »
Ok, I though it was that easy at first, I tried that (added that line to the end of the script) and though it didn't work but here is what is happening: when I first power it up and hit home I see the soft limit button flash right as it starts homing but it doesn't come on...the machine homes itself as usual. If I click it again it re-homes and the soft limits come on, if I click it again does the same and soft limits go off.

So now the script looks like this:

DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )

DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)
 
DoOEMButton(119)

- what else do I have to add to not only wait for the wait for the homing to be complete, but to check if the soft limits were on and leave them that way and not turn them off. I want the soft limits to be on every time the machine is homed.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Turning on soft limit with home button
« Reply #3 on: September 08, 2011, 05:59:19 PM »
OOPS just looked at your code. I am not sure exactly what you are trying to do.

SoftLimimits can only be turned on AFTER you REFHOME the machine.

(;-) TP
« Last Edit: September 08, 2011, 06:04:23 PM by BR549 »
Re: Turning on soft limit with home button
« Reply #4 on: September 08, 2011, 06:28:16 PM »
I want to click one button to home the machine and turn soft limits on. I need the soft limit command to wait until the homing part of the script is complete.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Turning on soft limit with home button
« Reply #5 on: September 08, 2011, 07:06:36 PM »
Try It this way.

DoButton( 24 )
While Ismoving()
Wend
DoButton( 23 )
While Ismoving()
Wend
DoButton( 22 )
While Ismoving()
Wend
DoButton( 25 )
While Ismoving()
Wend
DoOEMButton(133)
While Ismoving()
Wend
DoOEMButton(134)
While Ismoving()
Wend
DoOEMButton(135)
While Ismoving()
Wend
DoOEMButton(119)
While Ismoving()
Sleep(1000)
Wend
Re: Turning on soft limit with home button
« Reply #6 on: September 08, 2011, 07:31:27 PM »
Ok, got it working, wierd thing is that now soft limits are on when I power up and during the homing process, the never go off unless I click them off. Here is what the script looks like now:


DoButton( 24 )
While Ismoving()
Wend
DoButton( 23 )
While Ismoving()
Wend
DoButton( 22 )
While Ismoving()
Wend
DoButton( 25 )
While Ismoving()
Wend
DoOEMButton(133)
While Ismoving()
Wend
DoOEMButton(134)
While Ismoving()
Wend
DoOEMButton(135)
While Ismoving()
Wend
If GetOEMled (23) Then
DoOEMButton(119)
End If
DoOEMButton(119)
While Ismoving()
Sleep(1000)
Wend
Re: Turning on soft limit with home button
« Reply #7 on: September 08, 2011, 07:32:35 PM »
Thanks for the help, much appreciated.