Hello Guest it is April 21, 2024, 09:13:23 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - zealous

81
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: [Select]
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

82
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: [Select]
i=i+1
message "Macro Running #"&i

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


83
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.

84
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: [Select]
If ((InStr(linestring,"M6") >0 Or InStr(linestring,"M06")>0)) Then to M3 ;)

Code: [Select]
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

85
General Mach Discussion / Re: Mach3 Tool Path Screen
« on: January 07, 2010, 09:32:08 AM »
Great to hear it was a simple fix!

86
General Mach Discussion / Re: Mach3 Tool Path Screen
« on: January 06, 2010, 10:25:29 AM »
It might be the "Line from last to current" that he is seeing and the colors for G1?

If it is off you get dotted lines if it is on you will get line segment lines.

Config/Toolpath/Line from last to current

87
General Mach Discussion / Re: Wrong move when executing macro.
« on: December 29, 2009, 04:20:56 AM »
Try using
Code: [Select]
Sleep(wait) and see if that has anything to do with it for example:

Code: [Select]
code ("G0 Z0.00")

While ismoving()
Sleep(250)
wend

ActivateSignal(Output1)

SetUserLed (1001,1)

wait = GetUserDRO(1041)

Sleep(wait)

While ismoving()
Sleep(250)
wend

SetUserLed (1001,0)

Sleep(250)

While ismoving()
Sleep(250)
wend

88
Feature Requests / Re: Search function
« on: December 29, 2009, 03:58:13 AM »
this will look for M6/M06 but you can simply change it to look for whatever you want and it will highlight that line in the Gcode for you...but you will tell it what to do after that example: (RFH or SetNextLine)

Code: [Select]
Dim currentfile As String
Dim filesys, filetxt, lastline, oldline As String
Dim currentLine As String
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set filesys = CreateObject("Scripting.FileSystemObject")
currentLine = GetOEMDRO(816)
Found = False
currentfile = FileName
Set filetxt = filesys.OpenTextFile(currentfile, ForReading, True)
Dim i As Integer
i = 0
Do While filetxt.AtEndOfStream <> true
linestring = UCase(filetxt.ReadLine()) & " "
If linestring <> " " Then
i = i+1
If i > currentLine Then
If ((InStr(linestring,"M6") >0 Or InStr(linestring,"M06")>0)) Then
SetOEMDRO(816,i)
Found = True
MsgBox "File has been set to line:"& GetOEMDRO(816)&" Your next toolchange position.Your previous line was:"&currentLine
Exit Do
End If
End If
End If
Loop
If Found = False Then
MsgBox "No M6/M06 Found after LINE:"& currentLine
End If
filetxt.Close
Set filesys = Nothing
Set filetxt = Nothing

thanks,
Jason Blake

89
Feature Requests / Re: Find tool command for running gcode.
« on: December 29, 2009, 03:46:31 AM »
Great thing about Mach is you can do about anything you want!

Always take precaution when running code and attempt to break it so later it doesn’t happen unexpectedly!!!

1.Place this code on a button or Macro.
2.Make sure you are in a "Stop" condition
3.Run script

The script finds the next M6/M06 from your "Currently Line" after which YOU WILL NEED TO either HIT RUN FROM HERE or SET NEXT LINE. Depending on your needs I did not want to add that in.

Recap this script should only be run when in a stop condition and will only find the next M6/M06 from your current position in the file.

If you find any issues let me know, but use at your own discretion.

Code: [Select]
Dim currentfile As String
Dim filesys, filetxt, lastline, oldline As String
Dim currentLine As String
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set filesys = CreateObject("Scripting.FileSystemObject")
currentLine = GetOEMDRO(816)
Found = False
currentfile = FileName
Set filetxt = filesys.OpenTextFile(currentfile, ForReading, True)
Dim i As Integer
i = 0
Do While filetxt.AtEndOfStream <> true
linestring = UCase(filetxt.ReadLine()) & " "
If linestring <> " " Then
i = i+1
If i > currentLine Then
If ((InStr(linestring,"M6") >0 Or InStr(linestring,"M06")>0)) Then
SetOEMDRO(816,i)
Found = True
MsgBox "File has been set to line:"& GetOEMDRO(816)&" Your next toolchange position.Your previous line was:"&currentLine
Exit Do
End If
End If
End If
Loop
If Found = False Then
MsgBox "No M6/M06 Found after LINE:"& currentLine
End If
filetxt.Close
Set filesys = Nothing
Set filetxt = Nothing

Have fun!
Thanks Jason Blake

90
It is undocumented but:
G-Code is Loaded LED 172