Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 01:02:10 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach Screens
| | |-+  DoButton syntax
Pages: 1   Go Down
Print
Author Topic: DoButton syntax  (Read 2339 times)
0 Members and 1 Guest are viewing this topic.
ScrappyScooter
Active Member

Offline Offline

Posts: 34


View Profile
« on: June 04, 2007, 12:25:36 PM »

On the Program Run screen, the button script for the "Ref All Home" button has a syntax of  'DoButton (22)' etc...

Where can I find a list of all the 'DoButtons' ?

Thanks
Logged
zealous
Active Member

Offline Offline

Posts: 486



View Profile WWW
« Reply #1 on: June 04, 2007, 01:31:07 PM »

Check the Wiki is has the total list you just grab the OEM number, but here is a list that I have aready, sorry about all the code inbetween, I'm to lazy to remove i and just have the button code  Grin but if you look at the list you'll see the name of the function and the DOOEMButton(*********)
Remeber there is two ways of doing buttons DoOEMButton or DOButton so if the number you found in the wikki isn't working than try the other sntax to call on a button.

I'd do your robot with a Flash screen, there is alot more you can do...let me know if you need any help.

http://www.artsoftcontrols.com/MachCustomizeWiki/index.php?title=Main_Page



Decleare Audio(has to be along side each code) Example:

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

sndPlaySound "Bitmaps\Machwave\MaleVoice\LoadGCode.wav", &H1

DoOEMButton (216)

--------------------------Start of Code-------------------------------------------------------


-----------------------------------------------------------------------------Estop:

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\ResetSwitch.wav", &H1
   
    DoButton (21)
     

-------------------------------------------------------------------------OFFLINE ON LINE:

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(178)
sndPlaySound "C:\WINDOWS\Media\Machwave\Online.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(178)
sndPlaySound "C:\WINDOWS\Media\Machwave\Offline.wav", &H1
End If

------------------------------------------------------------------------REFER HOME

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
DoButton( 24 )
    sndPlaySound "C:\WINDOWS\Media\Machwave\Homing.wav", &H1
DoButton( 23 )
    sndPlaySound "C:\WINDOWS\Media\Machwave\Homing.wav", &H1
DoButton( 22 )
    sndPlaySound "C:\WINDOWS\Media\Machwave\Homing.wav", &H1
DoButton( 25 )


-------------------------------------------------------------------------LOAD GCODE

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\LoadGCode", &H1
   
    DoOEMButton (216)

---------------------------------------------------------------------------------Close GCODE

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\CloseGCode", &H1
   
    DoOEMButton (169)


-----------------------------------------------------------------------------------Edit GCODE

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\EditGcode.wav", &H1
   
    DoOEMButton (115)


--------------------------------------------------------------------------------START PROGRAM

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\Play.wav", &H1
   
    DoButton (0)

--------------------------------------------------------------------------------STOP PROGRAM

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\Stop.wav", &H1
   
    DoButton (3)

---------------------------------------------------------------------------------REWIND

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\MEDIA\Machwave\Rew.wav", &H1

DoButton (2)

--------------------------------------------------------------------------------HOLD PROGRAM

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\MEDIA\Machwave\Hold.wav", &H1
DoButton (1) 


------------------------------------------------------------------------------REGEN

value = GetParam("Boundry")
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If  value = 1 Then
'SetButtonText " Job "
SetParam "Boundry" , 0
 sndPlaySound "C:\WINDOWS\Media\Machwave\JobDisplay.wav", &H1
 Else
SetParam "Boundry" , 1
'SetButtonText "Machine"
sndPlaySound "C:\WINDOWS\Media\Machwave\TableDisplay", &H1
End If
   

-----------------------------------------------------------------------------------CHANGE PAGE

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\ClicksoundScreen 2.wav", &H1
DoOEMButton (1)

----------------------------------------------------------------------------------ZERO ALL AXIS

   
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\ZeroAllAxis.wav", &H1
   
DoButton (Cool
DoButton (9)
DoButton (10)


-------------------------------------------------------------------MACHINE/SOFTWEAR POSITIONING

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(256)
sndPlaySound "C:\WINDOWS\Media\Machwave\MachineCoordinetsOn.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(256)
sndPlaySound "C:\WINDOWS\Media\Machwave\MachineCoordinetsOff.wav", &H1
End If


------------------------------------------------------------------------------JOG MODE

DoOEMButton (245)


-----------------------------------------------------------------LAUCH PROGRA< (ONSCREEN KEYBOARD)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\LaunchKeyboard.wav", &H1
   
Dim stAppName As String

    Dim filePath As String

 

    stAppName = "C:\Program Files\Click-N-Type\Click-N-Type.exe"

    Call Shell(stAppName,1)

---------------------------------------------------------------------------------JOG ON/OFF

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(103)
sndPlaySound "C:\WINDOWS\Media\Machwave\JogModeOff.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(103)
sndPlaySound "C:\WINDOWS\Media\Machwave\JogModeOn.wav", &H1
End If


----------------------------------------------------------------------------------INCREASE FEED

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\FeedMore.wav", &H1
DoOEMButton (108)

------------------------------------------------------------------------------------DECREASE FEED

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long


    sndPlaySound "C:\WINDOWS\Media\Machwave\FeedLess.wav", &H1
DoOEMButton (109)
 

-------------------------------------------------------------------------------------SOFTLIMITS

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(119)
sndPlaySound "C:\WINDOWS\Media\Machwave\SoftwearLimitsOff.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(119)
sndPlaySound "C:\WINDOWS\Media\Machwave\SoftwearLimitsOn.wav", &H1
End If


------------------------------------------------------------------------------RAPID ACTIVE/DEACTIVE

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(287)
sndPlaySound "C:\WINDOWS\Media\Machwave\RapidActive.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(287)
sndPlaySound "C:\WINDOWS\Media\Machwave\RapidDeactivated.wav", &H1
End If


------------------------------------------------------------------------------AUTO LIMIT OVERRIDE

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(149)
sndPlaySound "C:\WINDOWS\Media\Machwave\AutoLimitOverRide.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(149)
sndPlaySound "C:\WINDOWS\Media\Machwave\AutoLimitOverRideOff.wav", &H1
End If
   

---------------------------------------------------------------------------------TOOLCHANGER ON/OFF

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(168)
sndPlaySound "C:\WINDOWS\Media\Machwave\ToolChangedeActive.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(168)
sndPlaySound "C:\WINDOWS\Media\Machwave\ToolChangeActive.wav", &H1
End If
     
--------------------------------------------------------------------------------MANUAL OVERRIDE

value = GetVar(1)

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

If value= 1 Then
Call SetVar(1, 0)
DoOEMButton(150)
sndPlaySound "C:\WINDOWS\Media\Machwave\ManualOverRide.wav", &H1

Else
Call SetVar(1, 1)
DoOEMButton(150)
sndPlaySound "C:\WINDOWS\Media\Machwave\ManualOverRideOff.wav", &H1
End If


-Check out http://AlphagraphicDesigns.com
for more Graphics and screens
« Last Edit: June 04, 2007, 01:36:29 PM by zealous » Logged

Regards, Jason Blake

www.Fusioncnc.com
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!