Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: kkquek 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
-
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
-
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
-
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.
-
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
-
I'll try that.
Thanks for all the replies!
kkquek