Offset - eLearningZoom

Download Report

Transcript Offset - eLearningZoom

6
Presentation links page for lesson six
System variables
Introduction
Access to special machine functions
Alarm generation Stop with message
Timers
Suppression of single block, feed hold, & feed override
Access to offsets
Machining center,
Turning center
Access to current position
Access to modal information
Introduction to system variables
Most CNC-related features of
parametric programming are
accessed with system variables
System variable numbering is
preset – and varies slightly from
one control model to another
System variables range from
#1000 through about #6000
Alarm Generation
We introduced alarm generation in lesson four
Alarm number (100-255)
#3000 = 100 (DATA MISSING)
System variable
Alarm message (up to 26 char.)
Printed on display screen:
MC100 DATA MISSING
Alarm Generation Example
One
example
wewide,
gave an
wasalarm
related
to tool width
If the
tool is too
is sounded
G65 P1000 W0.25 T0.125 D0.25 . . .
.
.
IF [#20 LE #23] GOTO 5
#3000 = 100 (TOOL TOO WIDE)
N5. . .
.
.
.
A Part Counter Example
Another application…
O0008 (Main program)
#500: Part counter
.
.
(Starts at zero)
.
N445 G65 P1008 C250.
N450 M30
Invoke part counter (C is
number of parts
to make)
Alarm
will sound after
part count is achieved
O1008
#500 = #500 +1
IF[#500 LT #3] GOTO 99
#500 = 0
#3000 = 100 (PART COUNT ACHIEVED)
N99 M99
Stop With Message
You know the function of
M00 program stop
M00: Program Stop
N140 M00 (TURN PART AROUND)
Stop With Message
Stop with message is like M00,
but a message will be displayed!
Message number (100-255)
#3006 = 100 (REVERSE PART)
System variable
Message (up to 26 char.)
MS100 REVERSE PART
Same
structure
as alarmby
generation
#3000start
Operator
can continue
pressing cycle
Timers
You can time events with custom macro!
#3001: milliseconds timer
#3002: hour timer
#3011: Year/month/day
#3012: Hour/minute/second
Timers
Accumulate the time a tool cuts:
.
#3001 = 0 (Reset ms timer)
.
#3001 = 0
#501: Accumulator
G01 Z-0.5 F4.0
#501 = #501 + #3001
IF [#501 GT 20000] GOTO 98
. After twenty seconds of cutting, alarm will sound
.
GOTO 99
N98 #501 = 0 (Reset accumulator)
#3000 = 100 (TOOL EXHAUSTED)
N99 M30
Suppression Of Single Block
You can actually disable single block!
#3003 = 1 (Suppress single block)
#3003 = 0 (Enable single block)
Suppression Of Feed Hold
You can also disable feed hold!
#3004 = 1 (Suppress feed hold)
#3004 = 0 (Enable feed hold)
Suppression Of Feedrate Override
As well as feedrate override!
#3004 = 2 (Suppress feedrate override)
#3004 = 0 (Enable feedrate override)
#3004 = 3 (Suppress FH & FO)
Suppresses both feed hold and feedrate override
#3004 = 0 (enables both feedrate override and
feed hold)
Tapping Example
Call to tapping custom macro
#18
#26
G65 P1000 R.2 Z-1.0 F0.0625
#9
O1000 (Tapping program)
G00 X0 Z#18
#3003 = 1 (Disable single block)
#3004 = 2 (Disable feed hold & feed override)
G01 Z#26 F#9
Suppresses single block, feed hold, and
M04
feedrate override during tapping
Z#18
#3003 = 0 (Enable single block)
#3004 = 0 (Enable feed hold & feed override)
M99
Machining Center Tool Offsets
Machining centers offset tables vary…
One value per offset:
001
002
003
004
005
006
007
008
OFFSETS
00.0000
009
00.0000
010
00.0000
011
00.0000
012
00.0000
013
00.0000
014
00.0000
015
00.0000
016
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
#2001 - #2199: Offsets 1 - 199
Machining Center Tool Offsets
Two values per offset:
OFFSETS
001
002
003
004
005
006
007
008
H
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
D
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
009
010
011
012
013
014
015
016
H
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
D
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
#2001 - #2199: H offsets 1 - 199
#2401 - #2599: D offsets 1 - 199
Machining Center Tool Offsets
If you have geometry & wear offsets:
001
002
003
004
005
006
007
008
GEOMETRY OFFSETS
H
H
D
00.0000 00.0000 009 00.0000
00.0000 00.0000 010 00.0000
00.0000 00.0000 011 00.0000
00.0000 00.0000 012 00.0000
00.0000 00.0000 013 00.0000
00.0000 00.0000 014 00.0000
00.0000 00.0000 015 00.0000
00.0000 00.0000 016 00.0000
D
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
#2001 - #2199: H geom offsets 1 - 199
#2401 - #2599: D geom offsets 1 - 199
Machining Center Tool Offsets
If you have geometry & wear offsets:
001
002
003
004
005
006
007
008
H
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
WEAR OFFSETS
H
D
00.0000 009 00.0000
00.0000 010 00.0000
00.0000 011 00.0000
00.0000 012 00.0000
00.0000 013 00.0000
00.0000 014 00.0000
00.0000 015 00.0000
00.0000 016 00.0000
D
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
#2201 - #2399: H wear offsets 1 - 199
#2601 - #2799: D wear offsets 1 - 199
Machining Center Tool Offsets
If you have over 200 offsets:
#10001 - #10999: H geom offsets 1-999
#12001 - #12999: D geom offsets 1-199
#11001 - #11999: H wear offsets 1-999
#13001 - #13999: D wear offsets 1-999
You must reference your control manual!
Machining Center Tool Offsets
Most common:
001
002
003
004
005
006
007
008
OFFSETS
00.0000
009
00.0000
010
00.0000
011
00.0000
012
00.0000
013
00.0000
014
00.0000
015
00.0000
016
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
#2001 - #2199: Offsets 1 - 199
Machining Center Tool Offsets
#2001 = 3.4563
Sets offset one to 3.4563
#2001 = #2001 + 0.004
Increases offset one by 0.004
Remember, G10 allows offset entry
Machining Center Tool Offsets
#101 = #2001
Sets variable #101 to the
current value of offset one
Not possible by any other means!
Machining Center Tool Offsets
Implications:
Testing offsets
Modifying compensation functions
Inventing new compensation functions!
Machining Center Fixture Offsets
You also have access to fixture offsets
FANUC
15M
WORK ZERO OFFSET
O0040 N00000
NO. 00 (COMMON)
X
00.0000
Y
00.0000
Z
00.0000
NO. 02 (G55)
X
00.0000
Y
00.0000
Z
00.0000
NO. 01 (G54)
X
00.0000
Y
00.0000
Z
00.0000
NO. 03 (G56)
X
00.0000
Y
00.0000
Z
00.0000
EDIT *** STOP **** *** *** *** *** ****
POSITION PROGRAM OFFSET
PRG_CHK
+
Machining Center Fixture Offsets
Related system variables:
Common (#0)
X: #5201
Y: #5202
Z: #5203
4th: #5204
Offset #1 (G54)
X: #5221
Y: #5222
Z: #5223
4th: #5224
Offset #2 (G55)
X: #5241
Y: #5242
Z: #5243
4th: #5244
Offset #3 (G56)
X: #5261
Y: #5262
Z: #5263
4th: #5264
Machining Center Fixture Offsets
Related system variables:
Offset #4 (G57)
X: #5281
Y: #5282
Z: #5283
4th: #5284
Offset #5 (G58)
X: #5301
Y: #5302
Z: #5303
4th: #5304
Offset #6 (G59)
X: #5321
Y: #5322
Z: #5323
4th: #5324
Machining Center Fixture Offsets
Do you have the additional fixture offset option?
48 fixture offsets? (G54.1)
They’re accessed by
the #7000 series
system variables
Simulating Cutter Radius Comp.
First example:
H
Y
X
D
F - Feedrate
Z
We’ve specified the cutter size
in the calling command
O0001
N005 G54 G90 S300 M03
N010 G00 X0 Y0
N015 G43 H01 Z0.1
N020 G65 P1000 X0 Y0 Z0 H2.
T1. D1.0 F4.
N025 G91 G28 Z0 M19
N030 M01
.
D specifies tool diameter
.
T
Simulating Cutter Radius Comp.
We’ve referenced cutter
size in the custom macro…
#11
H
Y#25
O1000
G00 X[#24-#7/2] Y[#25-#7/2 -.1]
Z[#26 - #20 -.05]
G01 Y[#25 + #11 + #7/2] F#9
G00 Z[#26 + 0.1]
M99
X #24 D
#7
#9
F - Feedrate
Z#26
T #20
Simulating Cutter Radius Comp.
But maybe you want the call statement to
include the cutter compensation offset number
O0001
N005 G54 G90 S300 M03
N010 G00 X0 Y0
H
N015 G43 H01 Z0.1
N020 G65 P1000 X0 Y0 Z0 H2.
Y
T1. D31. F4.
N025 G91 G28 Z0 M19
X
N030 M01
Now
D
specifies
cutter
.
F - Feedrate .
comp offset number!
Z
T
D: Offset #
Simulating Cutter Radius Comp.
Store value of offset in #101
#11
H
Y#25
O1000
#101= #[2000 + #7]
G00X[#24-#101] Y[#25-#101 -.1]
Z[#26 - #20 -.05]
G01 Y[#25 + #11 + #101] F#9
G00 Z[#26 + 0.1]
M99
D#7
Reference offset value
X #24
#9
F - Feedrate
Z#26
T #20
Simulating Wear Offsets
You know how to use wear
offsets on turning centers
Measured: 3.004
3.000
Adjust wear offset by -0.004
Simulating Wear Offsets
15T
FANUC
In custom
macro
B:
WEAR OFFSETS
X
001 -00.0040
002 00.0000
003 00.0000
004 00.0000
005 00.0000
006 00.0000
007 00.0000
Z
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
O0040 N00000
R
T
00.0000 0
00.0000 0
00.0000 0
00.0000 0
00.0000 0
00.0000 0
00.0000 0
EDIT *** STOP **** *** *** *** *** ****
POSITION PROGRAM OFFSET
PRG_CHK
+
Simulating Wear Offsets
Many machining centers don’t have wear offsets!
Actual: 0.498
0.500
Adjust by -0.002
Simulating Wear Offsets
The tool length compensation offset must be adjusted
15M
FANUC
TOOL OFFSETS
001
002
003
004
005
006
007
008
05.5836
04.5456
08.4736
05.3421
08.4733
06.5947
07.4432
06.5543
O0040 N00000
009
010
011
012
013
014
015
016
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
EDIT *** STOP **** *** *** *** *** ****
POSITION PROGRAM OFFSET
PRG_CHK
+
Simulating Wear Offsets
Pick a secondary offset to use as the wear offset
15M
FANUC
TOOL OFFSETS
084
095
086
087
088
089
090
091
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
O0040 N00000
092
093
094
095
096
097
098
099
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
EDIT *** STOP **** *** *** *** *** ****
POSITION PROGRAM OFFSET
PRG_CHK
+
Simulating Wear Offsets
Store the deviation in this offset
15M
FANUC
TOOL OFFSETS
084
095
086
087
088
089
090
091
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
O0040 N00000
092 00.0000
093 00.0000
094 00.0000
095 00.0000
096 00.0000
097 00.0000
098 00.0000
099 -00.0020
EDIT *** STOP **** *** *** *** *** ****
POSITION PROGRAM OFFSET
PRG_CHK
+
Simulating Wear Offsets
In the program…
O0001
N005 T01 M06
N010 G54 G90 S600 M03 T02
N015 G00 X3.0 Y2.0
N020 G43 Z0.1
N025 G01 Z-[0.5 - #2099] F4.0
N030 X4.5
N035 . . .
.
.
Simulating Wear Offsets
In the program…
O0001
N005 T01 M06
N010 G54 G90 S600 M03 T02
N015 G00 X3.0 Y2.0
N020 G43 Z0.1
N025 G01 Z-[0.5 - #2099] F4.0
N030 X4.5
N035 . . .
.
.
Simulating Wear Offsets
In the program…
O0001
N005 T01 M06
N010 G54 G90 S600 M03 T02
N015 G00 X3.0 Y2.0
N020 G43 Z0.1
N025 G01 Z-[0.5 - #2099] F4.0
N030 X4.5
N035 . . .
.
.
Simulating Wear Offsets
In the program…
O0001
N005 T01 M06
N010 G54 G90 S600 M03 T02
N015 G00 X3.0 Y2.0
N020 G43 Z0.1
N025 G01 Z-[0.5 - #2099] F4.0
N030 X4.5
N035 . . .
.
.
Simulating Wear Offsets
In the program…
O0001
N005 T01 M06
N010 G54 G90 S600 M03 T02
N015 G00 X3.0 Y2.0
N020 G43 Z0.1
N025 G01 Z-[0.5 - #2099] F4.0
N030 X4.5
N035 . . .
.
.
Simulating Wear Offsets
In the program…
O0001
N005 T01 M06
N010 G54 G90 S600 M03 T02
N015 G00 X3.0 Y2.0
N020 G43 Z0.1
N025 G01 Z-[0.5 - #2099] F4.0
N030 X4.5
N035 . . .
.
.
Simulating Wear Offsets
In the program…
O0001
N005 T01 M06
N010 G54 G90 S600 M03 T02
N015 G00 X3.0 Y2.0
N020 G43 Z0.1
N025 G01 Z-[0.5 - #2099] F4.0
N030 X4.5
N035the
. . value
.
Subtract
of offset 99 from
.
the programmed
Z position
.
Checking Offsets For Correctness
Have you ever wished you could
test the operator’s entry of tool
offsets to confirm that they are in
an acceptable range?
Checking Offsets For Correctness
Here’s how you can!
O0001 (Main program) #8
#11
/ N005 G65 P1000 B1. E12. S3. H11.
#2
#19
N010 T01 M06
N015 G54 G90 S500 M03
.
B:
Beginning
offset
to
test
.
E: Ending offset to test
.
S: Shortest acceptable length
H: Longest acceptable length
Checking Offsets For Correctness
Here’s the testing custom macro:
O1000 (Offset tester)
#101 = #2 (Counter, also offset number)
N1 IF[#101 GT #8] GOTO 99 (Test if finished)
IF[#[2000 + #101] GE #19] GOTO 5 (Ok so far)
#3000 = 100 (TOOL TOO SHORT)
N5 IF[#[2000 + #101] LE #11] GOTO 6 (Tool ok)
#3000 = 101 (TOOL TOO LONG)
N6 #101 = #101 +1 (Step counter/offset number)
GOTO 1 (Go back to the loop test)
N99 M99
Checking Offsets For Correctness
Program number
O1000 (Offset tester)
#101 = #2 (Counter, also offset number)
N1 IF[#101 GT #8] GOTO 99 (Test if finished)
IF[#[2000 + #101] GE #19] GOTO 5 (Ok so far)
#3000 = 100 (TOOL TOO SHORT)
N5 IF[#[2000 + #101] LE #11] GOTO 6 (Tool ok)
#3000 = 101 (TOOL TOO LONG)
N6 #101 = #101 +1 (Step counter/offset number)
GOTO 1 (Go back to the loop test)
N99 M99
Checking Offsets For Correctness
Initialize the counter to the first
offset to tes
O1000 (Offset tester)
#101 = #2 (Counter, also offset number)
N1 IF[#101 GT #8] GOTO 99 (Test if finished)
IF[#[2000 + #101] GE #19] GOTO 5 (Ok so far)
#3000 = 100 (TOOL TOO SHORT)
N5 IF[#[2000 + #101] LE #11] GOTO 6 (Tool ok)
#3000 = 101 (TOOL TOO LONG)
N6 #101 = #101 +1 (Step counter/offset number)
GOTO 1 (Go back to the loop test)
N99 M99
Checking Offsets For Correctness
Test if current offset number is greater
than last offset number to test
O1000 (Offset tester)
#101 = #2 (Counter, also offset number)
N1 IF[#101 GT #8] GOTO 99 (Test if finished)
IF[#[2000 + #101] GE #19] GOTO 5 (Ok so far)
#3000 = 100 (TOOL TOO SHORT)
N5 IF[#[2000 + #101] LE #11] GOTO 6 (Tool ok)
#3000 = 101 (TOOL TOO LONG)
N6 #101 = #101 +1 (Step counter/offset number)
GOTO 1 (Go back to the loop test)
N99 M99
Checking Offsets For Correctness
If offset value is larger than shortest acceptable
value, offset is okay so far – GOTO next test
O1000 (Offset tester)
#101 = #2 (Counter, also offset number)
N1 IF[#101 GT #8] GOTO 99 (Test if finished)
IF[#[2000 + #101] GE #19] GOTO 5 (Ok so far)
#3000 = 100 (TOOL TOO SHORT)
N5 IF[#[2000 + #101] LE #11] GOTO 6 (Tool ok)
#3000 = 101 (TOOL TOO LONG)
N6 #101 = #101 +1 (Step counter/offset number)
GOTO 1 (Go back to the loop test)
N99 M99
Checking Offsets For Correctness
If not, generate a specific alarm
O1000 (Offset tester)
#101 = #2 (Counter, also offset number)
N1 IF[#101 GT #8] GOTO 99 (Test if finished)
IF[#[2000 + #101] GE #19] GOTO 5 (Ok so far)
#3000 = 100 (TOOL TOO SHORT)
N5 IF[#[2000 + #101] LE #11] GOTO 6 (Tool ok)
#3000 = 101 (TOOL TOO LONG)
N6 #101 = #101 +1 (Step counter/offset number)
GOTO 1 (Go back to the loop test)
N99 M99
Checking Offsets For Correctness
If the offset value is less than the largest acceptable
value, the offset is okay – GOTO a command to step
counter
O1000 (Offset tester)
#101 = #2 (Counter, also offset number)
N1 IF[#101 GT #8] GOTO 99 (Test if finished)
IF[#[2000 + #101] GE #19] GOTO 5 (Ok so far)
#3000 = 100 (TOOL TOO SHORT)
N5 IF[#[2000 + #101] LE #11] GOTO 6 (Tool ok)
#3000 = 101 (TOOL TOO LONG)
N6 #101 = #101 +1 (Step counter/offset number)
GOTO 1 (Go back to the loop test)
N99 M99
Checking Offsets For Correctness
If not, generate a specific alarm
O1000 (Offset tester)
#101 = #2 (Counter, also offset number)
N1 IF[#101 GT #8] GOTO 99 (Test if finished)
IF[#[2000 + #101] GE #19] GOTO 5 (Ok so far)
#3000 = 100 (TOOL TOO SHORT)
N5 IF[#[2000 + #101] LE #11] GOTO 6 (Tool ok)
#3000 = 101 (TOOL TOO LONG)
N6 #101 = #101 +1 (Step counter/offset number)
GOTO 1 (Go back to the loop test)
N99 M99
Checking Offsets For Correctness
Step the counter (proceed to next offset)
O1000 (Offset tester)
#101 = #2 (Counter, also offset number)
N1 IF[#101 GT #8] GOTO 99 (Test if finished)
IF[#[2000 + #101] GE #19] GOTO 5 (Ok so far)
#3000 = 100 (TOOL TOO SHORT)
N5 IF[#[2000 + #101] LE #11] GOTO 6 (Tool ok)
#3000 = 101 (TOOL TOO LONG)
N6 #101 = #101 +1 (Step counter/offset number)
GOTO 1 (Go back to the loop test)
N99 M99
Checking Offsets For Correctness
Go back to the next test
O1000 (Offset tester)
#101 = #2 (Counter, also offset number)
N1 IF[#101 GT #8] GOTO 99 (Test if finished)
IF[#[2000 + #101] GE #19] GOTO 5 (Ok so far)
#3000 = 100 (TOOL TOO SHORT)
N5 IF[#[2000 + #101] LE #11] GOTO 6 (Tool ok)
#3000 = 101 (TOOL TOO LONG)
N6 #101 = #101 +1 (Step counter/offset number)
GOTO 1 (Go back to the loop test)
N99 M99
Checking Offsets For Correctness
End of custom macro
O1000 (Offset tester)
#101 = #2 (Counter, also offset number)
N1 IF[#101 GT #8] GOTO 99 (Test if finished)
IF[#[2000 + #101] GE #19] GOTO 5 (Ok so far)
#3000 = 100 (TOOL TOO SHORT)
N5 IF[#[2000 + #101] LE #11] GOTO 6 (Tool ok)
#3000 = 101 (TOOL TOO LONG)
N6 #101 = #101 +1 (Step counter/offset number)
GOTO 1 (Go back to the loop test)
N99 M99
Turning Center Wear Offsets
FANUC
15T
WEAR OFFSETS
O0040 N00000
In custom macro B:
001
002
003
004
005
006
007
008
X
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
Z
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
R
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
T
0
0
0
0
0
0
0
0
EDIT *** STOP **** *** *** *** *** ****
POSITION PROGRAM OFFSET
PRG_CHK
+
Turning Center Wear Offsets
Here are the related system variables
#2001-#2064: X wear offset 1-64
#2101-#2164: Z wear offset 1-64
#2201-#2264: R wear offset 1-64
#2301-#2364: T wear offset 1-64
Turning Center Wear Offsets
#2001 = 0.005
Sets X wear offset one to 0.005
#2001 = #2001 + 0.004
Increases X wear offset one by 0.004
Again, G10 allows offset changes
Turning Center Wear Offsets
#101 = #2001
Sets variable #101 to the current
value of X wear offset one
Not possible by any other means!
Turning Center Wear Offsets
As with machining centers…
Implications:
Testing offsets
Modifying compensation functions
Inventing new compensation functions!
Turning Center Geometry Offsets
15T
FANUC
In custom macro B:
GEOMETRY OFFSETS
001
002
003
004
005
006
007
008
X
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
O0040 N00000
Z
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
R
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
00.0000
T
0
0
0
0
0
0
0
0
EDIT *** STOP **** *** *** *** *** ****
POSITION PROGRAM OFFSET
PRG_CHK
+
Turning Center Geometry Offsets
System variables related to geometry offsets
#2401-#2464: X geom offset 1-64
#2501-#2564: Z geom offset 1-64
#2601-#2664: R geom offset 1-64
#2701-#2764: T geom offset 1-64
Improving G50 Commands
Does anyone still use G50? If so …
Offset 21: X10.3375 Z8.3487
N005 G50 X#2021 Z#2121
N101 T0101
.
.
.
N065 G00 X#2021 Z#2121 T0100
Attaining Machine Position
For machining centers:
Relative to the zero return position
#5021: X position relative to zero return
#5022: Y position relative to zero return
#5023: Z position relative to zero return
#5024: 4th position relative to zero return
Read only!
Attaining Machine Position
Relative to the zero return position
#5001: X position relative to program zero
#5002: Y position relative to program zero
#5003: Z position relative to program zero
#5004: 4th position relative to prog. zero
Read only!
Attaining Machine Position
An application:
Anything you can do with a full probing
system can be done with an edge finder!
Uses conductivity-type edge finder
Radius stored in #500
Length stored in #501
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Example
First position the
edge finder 0.5 in
from the corner
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Program number
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Move into
position to touch
left side in X
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Stop with message
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
Manually, using
#5221=#5021 +#500
Back
in
auto
mode,
handwheel, touch
G91 G01 X-0.2
press
cycle
start
left side
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Set X fixture offset
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Move away in X
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Come forward in Y
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Move over in X,
now ready to touch
in Y
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Stop with message
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Manually touch Y
surface – then back
to auto mode and
press cycle start
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Set Y of fixture
offset
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Move forward in Y
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Move up in Z
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Move forward in Y,
ready to touch in Z
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Stop with message
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
Manually,
touch
in
#5221=#5021 +#500
Back in auto
mode,
Zpress cycle start
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Set fixture offset Z
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Move up in Z
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
Invoke coordinate
system just set,
move to XY zero
O0015
G91 G01 Y0.75 Z-0.75 F30.
#3006 = 101 (TOUCH LEFT SIDE)
#5221=#5021 +#500
G91 G01 X-0.2
Y-0.75
X0.55
#3006 = 102 (TOUCH FRONT SIDE)
#5222 = #5022 +#500
G91 G01 Y-0.2
Z0.75
Y0.55
#3006 =103 (TOUCH TOP)
#5223=#5023 - #501
G91 G01 Z0.5
G90 G54 X0 Y0
Attaining Machine Position
End of program
Attaining Machine Position
Anything you can do with a
spindle probe is possible with
these techniques!
The only difference is that
each surface must be
manually touched
Help With Tool Length Measuring
Another helpful application: Measuring tool lengths
1-2-3 block
#500
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0
#102 = #102 + 1
GOTO 1
N99 M30
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0 Program number
#102 = #102 + 1
GOTO 1
N99 M30
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0 Set #100 to first tool
#102 = #102 + 1
station number to
GOTO 1
measure
N99 M30
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0 Set #101 to last tool
#102 = #102 + 1
station number to
GOTO 1
measure
N99 M30
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0 Initialize counter to first
#102 = #102 + 1
station
GOTO 1
N99 M30
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0 Test if finished
#102 = #102 + 1
GOTO 1
N99 M30
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0 Go to tool change
#102 = #102 + 1
position
GOTO 1
N99 M30
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0 Place current tool in
#102 = #102 + 1
spindle
GOTO 1
N99 M30
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0 Stop with message,
#102 = #102 + 1
manually touch tool tip to
GOTO 1
block
N99 M30
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0 Set current tool length
#102 = #102 + 1
compensation offset
GOTO 1
value
N99 M30
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0 Retract 0.5 inch in Z
#102 = #102 + 1
GOTO 1
N99 M30
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0 Step counter
#102 = #102 + 1
GOTO 1
N99 M30
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0 Go back to test
#102 = #102 + 1
GOTO 1
N99 M30
Help With Tool Length Measuring
O0014
#100 = 1 (FIRST TOOL NUMBER)
#101 = 15 (LAST TOOL NUMBER)
#102 = #100
N1 IF[#102 GT #101] GOTO 99
G91 G28 Z0 M19
T#102 M06
#3006 = 100 (TOUCH TOOL TIP TO BLOCK)
#[2000 + #102] = #500 - ABS[#5023]
G91 G01 Z0.5 F30.0 End of custom macro
#102 = #102 + 1
GOTO 1
N99 M30
Testing Machine Position
If machine is not at zero return
position, an alarm will sound
O0001
IF [#5021 EQ 0] GOTO 5
#3000 = 101 (X NOT HOME)
N5 IF[#5022 EQ 0] GOTO 6
#3000 = 102 (Y NOT HOME)
N6 IF[#5023 NE 0] GOTO 7
#3000 = 103 (Z NOT HOME)
N7. . .
.
Testing Machine Position
Maybe a fixture prohibits tool
change while table is centered
32”
12”
Testing Machine Position
If a tool change will cause a
crash, an alarm will sound
O9001
IF[#5021 GT [0-12.0] ] GOTO 10
IF[#5021 LT [0-32.0] ] GOTO 10
#3000 = 100 (BAD TOOL CHANGE POSITION)
N10 M06
M99
Relative To Zero Return Position
Turning centers:
#5021: X position relative to zero return
#5022: Z position relative to zero return
Read only!
Relative To Program Zero
Turning centers:
#5001: X position relative to program zero
#5002: Z position relative to program zero
Read only!
Current Position Is Start Point
This technique will allow you to minimize input arguments
Tool must be in
this position when
custom macro is
. called!
0.1
.
.
N015 G00 X3.2 Z-1.0
N020 G65 P1000 D0.18 C0.03 F0.005
.
Current Position Is Start Point
#100 and #101 are set to tool’s
current position in X and Z
O1000
#100 = #5001
#101 = #5002
G01 X[#100 - 0.2 - #7 *2] F#9
.
.
.
Improving G50 Commands
Combine this with what you know
about accessing offset values
Offset 21: X10.3375 Z8.3487
N005 G50 X[#2021+#5021] Z[#2121+#5022]
N101 T0101
.
.
.
N065 G00 X6.5 Z5.0 T0100
Modal G Codes
You have access to modal states
#4001
#4002
#4003
#4004
#4005
#4006
#4007
#4008
G code groups:
Group 1: G00, G01, G02 & G03
Group 2: G17, G18, & G19
Group 3: G90 & G91
Group 4: G22 & G23
Group 5: G94 & G95
Group 6: G20 & G21
Group 7: G40, G41, & G42
Group 8: G43, G44, G49
#100 = #4003
Modal G Codes
An example
O1000
#100 = #4003 (Retain abs/inc status)
G91 . . .
.
.
.
.
.
#4003 = #100
M99
Current Value Of CNC Addresses
You also have access to current letter address values
#4000: Main program number (O value)
#4102: B value
#4107: D value
#4109: F value
#4111: H value
#4113: M value
#4114: N value
#4119: S value
#4120: T value