Hello Guest it is April 19, 2024, 09:18:58 PM

Author Topic: need help ! three function on one button  (Read 3903 times)

0 Members and 1 Guest are viewing this topic.

need help ! three function on one button
« on: November 02, 2010, 10:53:21 PM »
dear sir,
how to make a button to "run,pause,continue" on one button(same button)
because my extend keypad only have 10 button

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: need help ! three function on one button
« Reply #1 on: November 04, 2010, 09:21:26 AM »
You can put the following code in your Macro pump,
you can also do this same thing in Brains if you wanted.
I will show you a macro pump example.
Since you didnt specify what your INPUT is, I am going to use INPUT4 as your trigger, change it to what you need.

'////////  Macro Pump code /////////////////////////////

Counter = GetUserDRO(2100)                               'interlock counter dro

If Not GetOEMLED(800) Then                                'if NOT currently estopped
  If IsActive(INPUT4) And Counter = 0 Then
    If GetOEMLED(804) Then                                  'if in a Run State
       DoOEMButton(1001)                                     'hit the pause button
    Else
       DoOEMButton(1000)                                     'hit the Start button ( or continue so to speak )
    End If
    SetUserDRO(2100, 1)
  End If

  If Not IsActive(INPUT4) And Counter = 1 Then
    SetUserDRO(2100, 0)                                      'reset your counter
  End If
End If

'Scott
fun times

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: need help ! three function on one button
« Reply #2 on: November 04, 2010, 10:35:41 AM »
I guess someone should remind you of the safety concerns of having GO and Stop run from the SAME button?????? surely there is another button on your setup that you could double up instead of start,hold????

(;-)TP

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: need help ! three function on one button
« Reply #3 on: November 04, 2010, 11:36:41 AM »
It's not stop, he's just using cycle start to pause. To resume, you still hit cycle start, so he's just getting rid of the pause button.
Gerry

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

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

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: need help ! three function on one button
« Reply #4 on: November 04, 2010, 12:16:19 PM »
Bad JUJU to have one button that controls stop and start. Safety 101

Hit it once the machine starts motion, hit it again it stops motion.

That is start / stop

(;-) TP
« Last Edit: November 04, 2010, 12:18:33 PM by BR549 »
Re: need help ! three function on one button
« Reply #5 on: November 05, 2010, 11:15:19 PM »
I'll try that.

Thanks for all the replies!

kkquek