Hello Guest it is March 28, 2024, 08:38: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 - titchener

Pages: 1 2 3 4 5 6 7 8 9 »
1
General Mach Discussion / Re: Mach3 tool offset problem
« on: June 10, 2014, 01:54:18 PM »
Ger21, thanks for the suggestion.

I've looked at my macros and unless I'm missing something I can't figure out how the tool offset is getting turned off when tool 0 is selected manually and the Autozero button is used on it, here's the macros I'm using:

Auto Tool Zero Macro:

' Macro to set tool offset for currently selected tool
' Assumes tool has been touched down on reference height
' Note tool zero has no offset, used to set zero height.
' All offsets are thus calculated relative to length of tool zero.

Tool_Num = GetDRO (24)

GaugeBlockThick = GetOEMDRO(1002)

XDRO = 0
YDRO = 1
ZDRO = 2

While IsMoving ()
Wend

If Tool_Num <> 0 Then

Z_Offset = GetOEMDRO ( 49 )
Axis_Pos = GetOEMDRO(85)
Tool_Offset = Axis_Pos - Z_Offset - GaugeBlockThick
Call setOEMDRO(42, Tool_Offset)

Else

' G92.2 cancels any applied offset mode
Code "G92.2"
Call SetDRO(ZDRO, GaugeBlockThick)

End if


m6Start.m1s

'Macro for changing tools, this one runs first, M6End.m1s then runs after button tool change button push.
'
'User DRO range from OEM codes 1000 to 1245, grid precision uses 1100, change locs use 1200,1201,1202
'This macro moves the machine to the machine coordinate change location first in Z and then in X.

'Dim Msg1, Msg2

tool = GetSelectedTool()

'Msg1 = "Selected Tool = " & Str(tool)
'MsgBox Msg1

currenttool = GetCurrentTool()

'Msg2 = "Current Tool = " & Str(currenttool)
'MsgBox Msg2

If currenttool = tool Then Stop

xorig = GetToolChangeStart( 0 )

yorig = GetToolChangeStart( 1 )

zorig = GetToolChangeStart( 2 )

xchange = GetUserDRO(1200)

ychange = GetUserDRO(1201)

zchange = GetUserDRO(1202)

MoveYonToolChangeLed = 1104

Code "G00 G53 Z" & zchange

While IsMoving ()
Sleep(10)
Wend

' X move taken out for now
' Code "G00 G53 X" & xchange

' Y move
If GetOEMLED (MoveYonToolChangeLed) Then
   Code "G00 G53 Y" & ychange
End If

While IsMoving ()
Sleep(10)
Wend

SetCurrentTool( tool )


m6End.m1s

'Macro for changing tools, this is second M6End.m1s one that runs after button tool change button push.
'
'User DRO range from OEM codes 1000 to 1245, grid precision uses 1100, change locs use 1200,1201,1202
'This macro moves the x and y of the table back to the original position.

xorig = GetToolChangeStart( 0 )

yorig = GetToolChangeStart( 1 )

zorig = GetToolChangeStart( 2 )

MoveYonToolChangeLed = 1104


' X move taken out for now
' Code "G00 X" & xorig
   
' Y move
If GetOEMLED (MoveYonToolChangeLed) Then
   Code "G00 Y" & yorig
End If

While IsMoving ()
Sleep(10)
Wend

2
General Mach Discussion / Mach3 tool offset problem
« on: June 09, 2014, 11:28:26 PM »
I'm running Mach 3.042.040 on a 3 axis mill.

I was having a scary situation where sometimes tool offsets I had set weren't getting applied properly and I figured out what is going on.

If you manually use a screen button select to Tool 0 to set its zero reference, tool offsets are turned off as you can see in the Offsets page.

Clicking on the Auto Tool Zero button when another tool is selected by either a button or in a program will then turn Tool Offsets back on.

However if the tool change is selected in the program and offsets are off from previously manually selecting tool 0, they won't be turned back on by the program selection of a tool so a previously set offset for this tool won't be used.

Is this a bug or was it done by design for some reason?

Was it fixed in later Mach versions and is there a more stable Mach 3 version than the one I'm running?

3
General Mach Discussion / Re: Tool Offsets being turned off
« on: May 01, 2013, 09:23:26 PM »
Your code appears to be correct to me, single step thru it to make sure.

4
General Mach Discussion / Re: Tool Offsets being turned off
« on: May 01, 2013, 09:01:29 PM »
Does your g code issue a G49 during the initialization?

This turns off any current tool offsets.

Paul T.
www.springtest.com

5
General Mach Discussion / Re: How to make Lathe G83 peck run faster
« on: April 05, 2013, 09:36:24 PM »
Alex, your revised version fixed the issue for me, thanks a ton for sharing that. I owe you a cold one (or hot one, whatever you prefer).

Paul T.

6
General Mach Discussion / Re: How to make Lathe G83 peck run faster
« on: April 05, 2013, 12:46:04 PM »
Hi Rich-

Thanks for the suggestions. Unfortunately I've got a lot macros I wrote for a previously lathe that use "standard" G83 calls and I was hoping to be able to run those without hacking them up. They do run correctly, just slower than heck because of the slow feed down during the pecks.

I could have sworn a while ago I saw a mention in a forum post that this feed down characteristic can be set with a Mach setting.

Did I imagine this or does this setting really exist? Perhaps (and unfortunately) its only accessible in the mill configurations.

Thanks,

Paul T.

7
General Mach Discussion / How to make Lathe G83 peck run faster
« on: April 02, 2013, 01:03:57 PM »
I've just brought up a lathe using the 0.057 version of Mach and overall its working well.

One issue I'm having though, with the G83 peck drill command I typically set the peck increment to the drill diameter and the retract height to just above the hole so I can clear all the chips and relube the bit, so typically with a 1/2" drill something like the below:

G83 Z-2.0 Q0.5 R0.2

But unlike my Mach mill, the lathe pecks the hole correctly and rapids out to the retract height but then it feeds back down to restart drilling at the current feed rate, rather than rapiding down to just above the restart depth and then going into feed rate. For deep holes this makes drilling pretty slow.

I saw a mention in a forum posting that there is a Mach config setting for this but I can't find it anywhere, is there a way to turn on rapid moves during the peck re-entry?

Thanks,

Paul T.

8
General Mach Discussion / Re: #variable use in Mach3
« on: March 31, 2013, 05:24:49 PM »
Below is G code program that makes heavy use of parameters.

It doesn't use any "conditionals" but see my previous example in this thread in how to use the subroutine loop argument to conditionally execute code.

(Filename: SpotAndDrillAndTap.tap)
(Spots and then Drills a pecked hole at the current X, Y location and then taps to the specified depth)
(Assumes 120 degree spot drill, Z must be set at zero on workpiece top)
(If desired drill depth can be compensated for tip length)

G20 (Units: Inches)
G40 G90 G94

(Set Editable Parameters)
#1=0.2      (Set Spot and Drill Diameter)
#2=0.3      (Set Drill Depth)
#20=0.34   (Set Tap Depth)
#22=40.0   (Set Thread Pitch in Turns Per Inch)
#3=1.0      (Set to 1.0 to add tip length comp, 0.0 not to)
#4=0.1      (Set Peck Increment)
#5=0.1      (Set Retract Height)
#6=1400      (Set Drill RPM)
#21=160      (Set Tap RPM)
#7=1.0       (Set Drill Feed Rate)
#8=0.125   (Set Rapid Height)

(Internal Parameters)
#10=[[#1/-1] * 0.3]        (Spot Drilling Depth)
#11=[[#2/-1] - #3 * #1 * 0.3]   (Final Drilling Depth)
#103=0.91         (Underfeed, 0.91 -> 9 %)
#104=[#103 * 1.0/#22]      (feed rate adjusted for under feed)

S#6 F#7      (Set RPM, Feed Rate)

T11 M06 G43 H11 (118 degree Spot Drill D = Diam x .300)

(Make any required X,Y move)
(G0 Z#8)
(G0 X0 Y0)

G0 Z0.02   (Rapid to just above workpiece)
M3 M8       (Spindle On, Coolant On)
G1 Z#10      (Spot Drill)
G0 Z#8      (Raise to Rapid Height)
M5 M9       (Spindle, Coolant Off)

T111 M06 G43 H111 (Final Drill in Jacobs Chuck)

M3 M8          (Spindle On, Coolant On)
G83 Z#11 Q#4 R#5   (Peck Drill)
G0 Z#8         (Raise to Rapid Height)
M5 M9          (Spindle, Coolant off)

T200 M06 G43 H200 (Tap in Floating Holder)

M98 P1025 L1 (Call Tap subroutine)

M30          (Program End)

O1025 (Subroutine to Tap)
G95 F#104      (Set to ipr mode and set feed rate)
M3 S#21 M8      (Start Spindle and coolant)
G1 Z[#103 * #20/-1]   (Tap down to compensated depth)
M5         (Stop Spindle)
M4         (Start Spindle in Reverse)
G1 Z#8         (Raise spindle at feed rate to rapid height)
M5 M9         (Turn off spindle and coolant)
G94         (Go back to ipm mode)
M99          (Subroutine Return)

9
General Mach Discussion / Re: #variable use in Mach3
« on: March 30, 2013, 08:34:54 PM »
A few tips-

Regarding assigning parameters to negated values-

#1 = -#2 (Doesn't work)

#1 = [-#2] (Doesn't work)

#1 = [#2/-1] (Works)

Although there are no conditionals, to get conditional processing I often use L param in subroutine calls to conditionally execute code based on a variable being zero or non-zero. Its a hack but it works, see below.

This runs the subroutine one time if #106 is non-zero, doesn't run if #106 is zero.

M98 P1351 L[ROUND[[#106 + 0.00001]/[#106 + 0.00003]]]

10
Thanks for the suggestions fellas. I ended up making an M macro that takes a P parameter that has the tool number, so I can call it like- M700 P#101. Then in the macro I construct the T*********x command and execute it with "Call Code" call, its working well.

Paul T.


Pages: 1 2 3 4 5 6 7 8 9 »