Hello Guest it is September 19, 2021, 11:14:12 AM

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 - Kenneth

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 »
61
VB and the development of wizards / Re: Tool zeroing macro help
« on: September 23, 2014, 05:34:31 AM »
Thank YOU John for sharing this macro. should have used your name for credit.
right now i can only use it in sim.
you've put a lot of work into it. Thanks again !

62
VB and the development of wizards / Re: Tool zeroing macro help
« on: September 22, 2014, 12:22:31 PM »
not my work !
just to update this macro. there were some depreciated statements.
and i changed the z dro to 802. and set inches instead of mm.
have yet to try(waiting on electric for machine)so go slow.

'Tool Height Setting Macro - JLH v1.1 - 4 March 2013
'This version has a 2-phase approach, fast for speed & slow for precision.
CurrentAbsInc = GetOemLED (48) 'Copy current G90/G91 state
CurrentGMode = GetOemDRO (819) 'Copy current G0/G1 state
CurrentFeed = GetOemDRO (818) 'Copy current feedrate
Contact = 0 'Clear the contact flag
PlateThickness =2.178 'Touch Plate thickness is set here
ProbeFeed1 = 12 'Fast probing feedrate is set here
ProbeFeed2 = 3 'Slow probing feedrate is set here
SetVar (1, -2) 'Maximum probing distance is set here
SetVar (2, .75) 'Retract height is set here
Code "M5" 'Ensures spindle is not running
Code "G20" 'Ensure metric units are used
Zs = GetOemDRO (802) 'Copy current Z-Scale DRO
SetOEMDRO (802,1) 'Set Z-Scale DRO to 1
Sleep 2000
DoOemButton (1010) 'Zero Z-Axis DRO
Message "Setting Tool Zero" 'Message for status bar
While IsMoving () 'Wait until task has been completed
Wend
If GetOemLED (825) = 0 Then 'Check to see if touch plate is not already grounded
Code "G90 G31 Z #1 F" & ProbeFeed1 'Fast probing move
While IsMoving () 'Wait until task has been completed
Wend
If GetOemLED (825) = True Then 'Check to see if probe has touched plate
Contact = 1 'Set the contact flag
End If
DoOemButton (1003) 'Clear a possible feed-hold condition
ProbePos = GetVar (2002) 'Exact point probe touched
ProbePos = ProbePos + .25 'Displace probe position upwards by .25mm
Code "G0 Z" & ProbePos 'Lifts probe .25mm above fast feed endpoint
While IsMoving () 'Wait until task has been completed
Wend
Code "G90 G31 Z #1 F" & ProbeFeed2 'Slow probing move
While IsMoving () 'Wait until task has been completed
Wend
If GetOemLED (825) = True Then 'Check to see if probe has touched plate
Contact = 1 'Set the contact flag
End If
ProbePos = GetVar (2002) 'Exact point probe touched
Code "G0 Z" & ProbePos 'Lifts probe to exact touch position
While IsMoving () 'Wait until task has been completed
Wend
SetOEMDRO (802,PlateThickness) 'Set Z-Axis DRO to Touch Plate thickness
Code "G0 Z #2" 'Retract off Touch Plate to the set height
While IsMoving () 'Wait until task has been completed
Wend
Message "Z-Axis is now Zeroed." 'Message for status bar
Code "F" & CurrentFeed 'Restore feedrate to original setting
If Contact = 0 Then 'Probe reached max travel without touching
Message "ERROR - Probe did not touch." 'Message for status bar
Response = MsgBox ("ERROR - Probe did not touch.",37,"Auto Tool Zero")
End If
Else
Message "ERROR - Touch Plate is grounded." 'Message for status bar
Response = MsgBox ("ERROR - Touch Plate is grounded - Check connection.",16,"Auto Tool Zero")
End If
SetOemDRO (802,Zs) 'Restore Z-Scale DRO to original setting
If CurrentAbsInc = 0 Then 'If G91 was in effect before then return to it
Code "G90"
End If
If CurrentGMode = 0 Then 'If G0 was in effect before then return to it
Code "G00"
End If  
      

63
Brains Development / Re: Brains in Mach4?
« on: September 19, 2014, 05:34:58 AM »
Will there be brains in mach4 ?
Thanks

64
Mach SDK plugin questions and answers. / Re: Test Speak
« on: September 15, 2014, 07:13:18 AM »
i found that if i uncheck "Allow Speak" then close mach3(3.043.066).
reopen and check "Allow Speak", it works only the first time.
i have a button that uses Speak. but only that first time,
after that nothing.
Thanks

65
MACH TOOL BOX / Re: MACRO , Tool Table Report
« on: September 04, 2014, 10:21:39 AM »
i updated the macro for win7. it doesn't printer to printer but brings up Write.exe
hope this helps someone.

'Macro ToolTable Report
'newer version will poll up To 225 tools And skip Any tool With a description of "empty"
' overwrite file = C:\Documents and Settings\All Users\Desktop\ToolInfo.txt
textFilePath = "C:\mach3\ToolInfo.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(textFilePath)
Do Until num=225
num=num+1
N = GetToolDesc(num)
D = GetToolParam(num,1)
L = GetToolParam(num,2)
WD= Gettoolparam(num,3)
WL= Gettoolparam(num,4)
If N <>"Empty" Then
objTextFile.WriteLine("*Tool"& num &"  * "& N &" *Diameter: "& D &" *Length: "& L &" *Wear Diam"&WD &" *WearLength"&WL & Chr(13) & Chr(10))
Else
End If
Loop
objTextFile.Close
Dim sCOMMAND As String
 sCOMMAND="print c:\mach3\toolinfo.txt"
 Shell("c:\Windows\System32\write.exe /c" & sCOMMAND)
End  


Here is a macro to scan the tool table file and print it out to the local printer. It also write a file copy to the Mach directory called ToolTableReport that can be read from notebook.

You can run it from a button or the MDI

Code Example:

'Macro ToolTable Report
'newer version will poll up To 225 tools And skip Any tool With a description of "empty"
' overwrite file = C:\Documents and Settings\All Users\Desktop\ToolInfo.txt
textFilePath = "C:\mach3\ToolInfo.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(textFilePath)
Do Until num=225
num=num+1
N = GetToolDesc(num)
D = GetToolParam(num,1)
L = GetToolParam(num,2)
WD= Gettoolparam(num,3)
WL= Gettoolparam(num,4)
If N <>"Empty" Then
objTextFile.WriteLine("*Tool"& num &"  * "& N &" *Diameter: "& D &" *Length: "& L &" *Wear Diam"&WD &" *WearLength"&WL & Chr(13) & Chr(10))
Else
End If
Loop
objTextFile.Close
Dim sCOMMAND As String
 sCOMMAND="print c:\mach3\toolinfo.txt"
 Shell("c:\winnt2\system32\cmd.exe /c" & sCOMMAND)
End  

66
General Mach Discussion / Re: - fixture save...
« on: September 04, 2014, 08:52:49 AM »
Sorry. Thanks Gerry !

67
General Mach Discussion / Re: - fixture save...
« on: September 04, 2014, 08:21:30 AM »
Please don't tell me i can't get help cause i don't like M4 ?

68
General Mach Discussion / Re: - fixture save...
« on: September 03, 2014, 11:04:16 AM »
am i asking REALLY dumb questions ?
BESIDES this one.

69
General Mach Discussion / Re: - fixture save...
« on: August 28, 2014, 12:10:42 PM »
i fixed it by deleting the xml file and reopening mach3 and then loading my set file.
it ask to save fixture but doesn't really save position. is there something else i can
do ?  Thanks !

70
General Mach Discussion / Re: - fixture save...
« on: August 28, 2014, 10:59:49 AM »
still having the problem. what do i look for in the xml file ?
did i attach the correct file ? should i START from scratch
or is it also part of machscreen(1.60) ?
Thanks for any help !

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 »