Hello Guest it is March 28, 2024, 06:35:55 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 - keithorr

Pages: 1 2 »
1
MACH TOOL BOX / Re: Macro, Parameter Value Report
« on: August 04, 2009, 01:31:53 PM »

2
MACH TOOL BOX / Re: MACRO , Tool Table Report
« on: August 04, 2009, 01:20:17 PM »
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   

Wow. Other than adding tool wear diam,  wear length, and lpt printing, it's a verbatim lift of a post I made last year.   ::)

http://www.machsupport.com/forum/index.php/topic,4290.20.html

3
General Mach Discussion / Re: Surface grinding?
« on: May 16, 2008, 03:50:16 PM »
I don't think you need CAD/CAM at all for the surface grinding. I use canned cycles in Mach3 for surface grinding and wrote them longhand. If you can figure out how to build/modify a machine you'll just be doing the same thing over and over. Not like a job shop that needs fast flexible CAM post processing.

4
General Mach Discussion / Re: Surface grinding?
« on: May 15, 2008, 03:07:18 PM »
I suggested he consider sinker edm. Too easy to burn/warp stock this thin.

5
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:\Documents and Settings\All Users\Desktop\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)

If N <>"Empty" Then

objTextFile.WriteLine("Tool"& num &" "& N &" Diameter: "& D &" Length: "& L & Chr(13) & Chr(10))

Else

End If

Loop

objTextFile.Close

'End

6
This reads information from the tooldata file and overwrites a text file up to 100 tools
Stops writing with the first instance of "Empty" as a tool description

////'PLEASE BE SURE YOU UNDERSTAND WHAT YOU'RE DOING WITH THIS FILE OR ELSE JUST WALK AWAY/////

'Create a New Button on a Screen using the Mach3Screen.exe.
'(Load the screen set you usually use) I placed one on the Offsets Screen for my use. You may have a better location.

'Paste the text below into the VB window of the Button Properties Screen
'The new button will create and update a text file on your desktop showing tool information up to 100 tools.
'Useful to have when your CAD/CAM is on another PC.


' overwrite file = C:\Documents and Settings\All Users\Desktop\ToolInfo.txt

textFilePath = "C:\Documents and Settings\All Users\Desktop\ToolInfo.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(textFilePath)


Do Until num=100

num=num+1

N = GetToolDesc(num)
D = GetToolParam(num,1)
L = GetToolParam(num,2)

objTextFile.WriteLine("Tool"& num &" "& N &" Diameter: "& D &" Length: "& L & Chr(13) & Chr(10))

If N ="Empty" Then num = 100



Loop

objTextFile.Close

'End

7
Just a little add onto this thread:

' append to file = C:\Mach3\macros\toolinfo.txt
 
N = GetToolDesc(1)
D = GetToolParam(1,1)
L = GetToolParam(1,2)

textFilePath = "C:\mach3\macros\toolinfo.txt"

Const ForAppending = 8
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.opentextfile(textFilePath,ForAppending)

objTextFile.WriteLine("Tool1: " & N &" Diameter: "& D  &" Length: " & L)

objTextFile.Close

'End

'Now to learn how to scroll through the tool table (until there are no more descriptions) and overwrite the text file.

'Put it all in a button and I can "export" the info.

'I'm just wanting a tool information cheat sheet to take back to my desk while I fiddle with the CAM.

'All suggestions graciously accepted.

8
General Mach Discussion / Re: Update Tool Data using G10?
« on: February 29, 2008, 03:13:38 PM »
OK
I run the updated code in the debugger and it stops on line 15 with a comment on the mach3 comp run screen:
P value out of range with g10 l2

although it works fine running in mach3

I'm not sure what to think. If I were trying to make a script in the future and rec'd that message I wouldn't know whether to ignore or not.

Any pointers?
Thanks

9
General Mach Discussion / Re: Update Tool Data using G10?
« on: February 29, 2008, 01:11:31 PM »
Thanks for the patience, maybe I'll have something to give back one of these days.

Now't ???
I have more fun with google and wikipedia I may never get my work done.
http://en.wikipedia.org/wiki/Yorkshireisms

10
General Mach Discussion / Re: Update Tool Data using G10?
« on: February 28, 2008, 09:48:17 PM »
OH MY GOD!!!!
WHY DIDN'T ANYONE TELL ME??? THIS IS AMBROSIA!!!
 ;D ;D ;D
 Downloaded the full copy and placed my xml  and screen set in the folder, renamed and off I go. ;D
No, Tormach doesn't allow any configuration changes. The program is locked. They used to have the password in the Mach2 xml but deleted it from the latest version. Gee, a script editor and everything just like the grownups.
Boy Howdy!

Pages: 1 2 »