Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2013, 06:09:10 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 »
71  Mach Discussion / General Mach Discussion / Re: m30 question on: February 04, 2010, 09:33:52 AM
You would need to use: M1030.m1s to detect a M30 call.  Wink
72  Mach Discussion / General Mach Discussion / Re: Interfacing Mach3 with my App on: January 23, 2010, 03:25:58 AM
Code:
DoOEMButton(706)
73  Mach Discussion / VB and the development of wizards / Re: MacroPump Doesnt Run on: January 17, 2010, 09:47:43 PM
Great to hear!
I wasn't sure that was what you wanted, but you can make changes and maybe have it force it back to MM mode or something Smiley
74  Mach Discussion / VB and the development of wizards / Re: MacroPump Doesnt Run on: January 17, 2010, 05:34:59 PM
I give the user 2 seconds to change it to MM after the estop is hit or it estops the sytem again.

Code:
Dim Inch_mode As Boolean
Dim Estopped As Boolean

Estopped = GetOEMLED(800)
Inch_mode = GetOEMLED(801)

If(Inch_mode)Then

'Is the sytem estopped already
If Not(Estopped)Then
'Estop system
DoOEMButton(1021)

End If

While(GetOEMLED(800))
MESSAGE "Went Into Inch Mode:"&i
sleep(250)
Wend

'Give the user time to change to mm?
Sleep(2000)

End If
75  Mach Discussion / VB and the development of wizards / Re: MacroPump Doesnt Run on: January 17, 2010, 01:50:06 PM
Hi Phil,

Let me get a better idea of sequence of events.

If the machine goes into Inch mode, no matter what it is doing Estop(reset) the system, send a message about being in Inch mode and wait for a "reset" before removing the message?
Are you using the VB popup message display or the Mach label message display?
Jason
76  Mach Discussion / VB and the development of wizards / Re: MacroPump Doesnt Run on: January 16, 2010, 05:47:17 PM
Great,

You can put a sleep in there to clear the message.

Code:
Dim Inch_LED_boolean As Boolean
Inch_LED_boolean = GetOEMLED(801)
If(Inch_LED_boolean = True)Then
MESSAGE " Went Into Inch Mode"
Sleep(2000)'2 seconds
MESSAGE ""
End If


...you might want to use a userlabel or ticker as well as well.

In Screen4 you'll want to drop a Userlabel or ticker:

Code:
SetUserLabel 12, "You must enter a whole number of holes"
SetTicker 205, "This is a very long error message because you seem to have done something very silly"

77  Mach Discussion / VB and the development of wizards / Re: MacroPump Doesnt Run on: January 15, 2010, 12:21:01 PM
You'll need to use "GetOEMLED"... but more important use "True/False":

Code:
Dim Inch_LED_boolean As Boolean
Dim Inch_LED_interger As Integer

Inch_LED_boolean = GetOEMLED(801)
Inch_LED_interger = GetOEMLED(801)

MsgBox "boolan "&Inch_LED_boolean
MsgBox "Number "&Inch_LED_interger

'Number way
If(Inch_LED_interger = -1)Then
MsgBox "Number lookup"
End If

'Boolean way
If(Inch_LED_boolean = True)Then
MsgBox "boolean lookup"
End If

'Boolean way with out  ==
If(Inch_LED_boolean)Then
End If

'Boolean way with out  ==
If Not(Inch_LED_boolean)Then
End If
78  Mach Discussion / VB and the development of wizards / Re: MacroPump Doesnt Run on: January 15, 2010, 10:57:40 AM
Put this in the Macropump to check:


Code:
i=i+1
message "Macro Running #"&i

 it will show you in Mach’s statues line how many times the macro has ran.

79  Mach Discussion / VB and the development of wizards / Re: MacroPump Doesnt Run on: January 14, 2010, 08:37:22 PM
Make sure it is the same folder as your profile name:

If you load "myprofile" it will be in:
C:\Mach3\macros\myprofile\macropump.m1s

Also you have to restart Mach after checking the macropump box.
80  Mach Discussion / Feature Requests / Re: Search function on: January 12, 2010, 09:39:34 PM
sorry I did not know you posted...

this will save the positions of the M6's to a text file located in the Mach3 directory, then open it if it finds M6,listing the line number and content on those lines.
Just change the
Code:
If ((InStr(linestring,"M6") >0 Or InStr(linestring,"M06")>0)) Then
to M3 Wink

Code:
Dim currentfile As String
Dim filesys, filetxt, lastline, oldline As String
Dim currentLine As String
Dim dTaskID As Double, path As String, StoreFilePath As String
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set filesys = CreateObject("Scripting.FileSystemObject")
StoreFilePath = CurDir & "\StoredM6.txt"
path = "C:\WINDOWS\notepad.exe"
Set objTextFile = filesys.CreateTextFile(StoreFilePath)
currentLine = GetOEMDRO(816)
Found = False
currentfile = FileName
Set filetxt = filesys.OpenTextFile(currentfile, ForReading, True)
Dim i As Integer
i = -1
j=0
Do While filetxt.AtEndOfStream <> true
linestring = UCase(filetxt.ReadLine()) & " "
If linestring <> " " Then
i = i+1
If ((InStr(linestring,"M6") >0 Or InStr(linestring,"M06")>0)) Then
j = j+1
objTextFile.WriteLine(j & " " & "Line# " & i & " " & linestring)
Found = True
End If
End If
Loop
If Found = True Then
dTaskID = Shell(path + " " + StoreFilePath, vbNormalFocus)
Else
MsgBox "No M6/M06 Found"
End If
filetxt.Close
Set filesys = Nothing
Set filetxt = Nothing
objTextFile.Close
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!