Date post: | 02-Jan-2016 |
Category: |
Documents |
Upload: | salvador-stanton |
View: | 27 times |
Download: | 0 times |
6 System variables
Access to special machine functions
Access to offsets
Access to current positionAccess to modal information
Presentation links page for lesson six
Alarm generation Stop with message TimersSuppression of single block, feed hold, & feed override
Machining center, Turning center
Introduction
Introduction to system variables
Most CNC-related features of parametric programming are
accessed with system variablesSystem variable numbering is
preset – and varies slightly from one control model to another
System variables range from #1000 through about #6000
Alarm Generation
#3000 = 100 (DATA MISSING)
MC100 DATA MISSING
System variable
Alarm number (100-255)
Alarm message (up to 26 char.)
Printed on display screen:
We introduced alarm generation in lesson four
Alarm Generation Example
G65 P1000 W0.25 T0.125 D0.25 . . ...IF [#20 LE #23] GOTO 5#3000 = 100 (TOOL TOO WIDE)N5. . ....
One example we gave was related to tool widthIf the tool is too wide, an alarm is sounded
A Part Counter Example
#500: Part counter (Starts at zero)
O0008 (Main program)...N445 G65 P1008 C250.N450 M30
O1008#500 = #500 +1IF[#500 LT #3] GOTO 99#500 = 0#3000 = 100 (PART COUNT ACHIEVED)N99 M99
Another application…
Invoke part counter (C is number of parts to make)Alarm will sound after
part count is achieved
Stop With Message
M00: Program Stop
N140 M00 (TURN PART AROUND)
You know the function of M00 program stop
Stop with message is like M00, but a message will be displayed!
#3006 = 100 (REVERSE PART)
MS100 REVERSE PART
System variable
Message number (100-255)
Message (up to 26 char.)
Stop With Message
Same structure as alarm generation #3000Operator can continue by pressing cycle start
Timers
#3001: milliseconds timer#3002: hour timer
#3011: Year/month/day#3012: Hour/minute/second
You can time events with custom macro!
Timers
#3001 = 0 (Reset ms timer)..#3001 = 0G01 Z-0.5 F4.0#501 = #501 + #3001IF [#501 GT 20000] GOTO 98..GOTO 99N98 #501 = 0 (Reset accumulator)#3000 = 100 (TOOL EXHAUSTED)N99 M30
#501: Accumulator
Accumulate the time a tool cuts:
After twenty seconds of cutting, alarm will sound
Suppression Of Single Block
#3003 = 1 (Suppress single block)
#3003 = 0 (Enable single block)
You can actually disable single block!
Suppression Of Feed Hold
#3004 = 1 (Suppress feed hold)
#3004 = 0 (Enable feed hold)
You can also disable feed hold!
Suppression Of Feedrate Override
#3004 = 2 (Suppress feedrate override)
#3004 = 0 (Enable feedrate override)
#3004 = 3 (Suppress FH & FO)
As well as feedrate override!
Suppresses both feed hold and feedrate override
#3004 = 0 (enables both feedrate override and feed hold)
Tapping Example
G65 P1000 R.2 Z-1.0 F0.0625#18
#9
#26
O1000 (Tapping program)G00 X0 Z#18#3003 = 1 (Disable single block)#3004 = 2 (Disable feed hold & feed override)G01 Z#26 F#9M04Z#18#3003 = 0 (Enable single block)#3004 = 0 (Enable feed hold & feed override)M99
Suppresses single block, feed hold, and feedrate override during tapping
Call to tapping custom macro
One value per offset:
001 00.0000002 00.0000003 00.0000004 00.0000005 00.0000006 00.0000007 00.0000008 00.0000
OFFSETS009 00.0000010 00.0000011 00.0000012 00.0000013 00.0000014 00.0000015 00.0000016 00.0000
#2001 - #2199: Offsets 1 - 199
Machining Center Tool OffsetsMachining centers offset tables vary…
Machining Center Tool Offsets
Two values per offset:
#2001 - #2199: H offsets 1 - 199#2401 - #2599: D offsets 1 - 199
001 00.0000 00.0000002 00.0000 00.0000003 00.0000 00.0000004 00.0000 00.0000005 00.0000 00.0000006 00.0000 00.0000007 00.0000 00.0000008 00.0000 00.0000
OFFSETS
009 00.0000 00.0000 010 00.0000 00.0000011 00.0000 00.0000012 00.0000 00.0000013 00.0000 00.0000014 00.0000 00.0000015 00.0000 00.0000016 00.0000 00.0000
DH DH
If you have geometry & wear offsets:
#2001 - #2199: H geom offsets 1 - 199#2401 - #2599: D geom offsets 1 - 199
001 00.0000 00.0000002 00.0000 00.0000003 00.0000 00.0000004 00.0000 00.0000005 00.0000 00.0000006 00.0000 00.0000007 00.0000 00.0000008 00.0000 00.0000
GEOMETRY OFFSETS
009 00.0000 00.0000 010 00.0000 00.0000011 00.0000 00.0000012 00.0000 00.0000013 00.0000 00.0000014 00.0000 00.0000015 00.0000 00.0000016 00.0000 00.0000
DH DH
Machining Center Tool Offsets
#2201 - #2399: H wear offsets 1 - 199#2601 - #2799: D wear offsets 1 - 199
001 00.0000 00.0000002 00.0000 00.0000003 00.0000 00.0000004 00.0000 00.0000005 00.0000 00.0000006 00.0000 00.0000007 00.0000 00.0000008 00.0000 00.0000
WEAR OFFSETS
009 00.0000 00.0000 010 00.0000 00.0000011 00.0000 00.0000012 00.0000 00.0000013 00.0000 00.0000014 00.0000 00.0000015 00.0000 00.0000016 00.0000 00.0000
DH DH
Machining Center Tool Offsets
If you have geometry & wear 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
All offsets are accessible
through custom macro!
(Read and Write)
Most common:
001 00.0000002 00.0000003 00.0000004 00.0000005 00.0000006 00.0000007 00.0000008 00.0000
OFFSETS009 00.0000010 00.0000011 00.0000012 00.0000013 00.0000014 00.0000015 00.0000016 00.0000
#2001 - #2199: Offsets 1 - 199
Machining Center Tool Offsets
The most common offset
configuration is but one
value per offset!
We’ll assume this for
our examples
#2001 = 3.4563Sets offset one to 3.4563
#2001 = #2001 + 0.004Increases 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 functionsInventing new compensation functions!
Machining Center Tool Offsets
We’ll show several
applications a little later!
Machining Center Fixture OffsetsFANUC 15M
POSITION PROGRAM OFFSET PRG_CHK +EDIT *** STOP **** *** *** *** *** ****
WORK ZERO OFFSET O0040 N00000
NO. 00 (COMMON)X 00.0000Y 00.0000Z 00.0000
NO. 02 (G55)X 00.0000Y 00.0000Z 00.0000
NO. 01 (G54)X 00.0000Y 00.0000Z 00.0000
NO. 03 (G56)X 00.0000Y 00.0000Z 00.0000
You also have access to fixture offsets
Common (#0)X: #5201Y: #5202Z: #5203
4th: #5204Offset #1 (G54)
X: #5221Y: #5222Z: #5223
4th: #5224
Offset #2 (G55)X: #5241Y: #5242Z: #5243
4th: #5244Offset #3 (G56)
X: #5261Y: #5262Z: #5263
4th: #5264
Machining Center Fixture Offsets
Related system variables:
Offset #4 (G57)X: #5281Y: #5282Z: #5283
4th: #5284Offset #5 (G58)
X: #5301Y: #5302Z: #5303
4th: #5304
Offset #6 (G59)X: #5321Y: #5322Z: #5323
4th: #5324
Machining Center Fixture Offsets
Related system variables:
They’re accessed by the #7000 series system variables
48 fixture offsets? (G54.1)
Machining Center Fixture Offsets
Do you have the additional fixture offset option?
Simulating Cutter Radius Comp.
Z
H
Y
T
D
O0001N005 G54 G90 S300 M03N010 G00 X0 Y0N015 G43 H01 Z0.1N020 G65 P1000 X0 Y0 Z0 H2. T1. D1.0 F4.N025 G91 G28 Z0 M19N030 M01..
X
F - Feedrate D specifies tool diameter
First example: We’ve specified the cutter size in the calling command
Z
H
T
O1000G00 X[#24-#7/2] Y[#25-#7/2 -.1]Z[#26 - #20 -.05]G01 Y[#25 + #11 + #7/2] F#9G00 Z[#26 + 0.1]M99Y
D
#11
#26
#9
#25
#7
#20
F - FeedrateX#24
Simulating Cutter Radius Comp.We’ve referenced cutter size in the custom macro…
Z
H
Y
T
O0001N005 G54 G90 S300 M03N010 G00 X0 Y0N015 G43 H01 Z0.1N020 G65 P1000 X0 Y0 Z0 H2. T1. D31. F4.N025 G91 G28 Z0 M19N030 M01..
X
F - Feedrate
D: Offset #
Simulating Cutter Radius Comp.
Now D specifies cutter comp offset number!
But maybe you want the call statement to include the cutter compensation offset number
Z
H
T
O1000#101= #[2000 + #7]G00X[#24-#101] Y[#25-#101 -.1]Z[#26 - #20 -.05]G01 Y[#25 + #11 + #101] F#9G00 Z[#26 + 0.1]M99
Y
D
#11
#26
#9
#25
#7
#20
F - FeedrateX#24
Simulating Cutter Radius Comp.Store value of offset in #101
Reference offset value
Simulating Wear OffsetsYou know how to use wear offsets on turning centers
3.000
Measured: 3.004
Adjust wear offset by -0.004
In custom macro B:FANUC 15T
POSITION PROGRAM OFFSET PRG_CHK +EDIT *** STOP **** *** *** *** *** ****
WEAR OFFSETS O0040 N00000
001 -00.0040 00.0000 00.0000 0002 00.0000 00.0000 00.0000 0003 00.0000 00.0000 00.0000 0004 00.0000 00.0000 00.0000 0005 00.0000 00.0000 00.0000 0006 00.0000 00.0000 00.0000 0007 00.0000 00.0000 00.0000 0
X Z R T
Simulating Wear Offsets
Many machining centers don’t have wear offsets!
0.500
Actual: 0.498
Adjust by -0.002
Simulating Wear Offsets
FANUC 15M
POSITION PROGRAM OFFSET PRG_CHK +EDIT *** STOP **** *** *** *** *** ****
TOOL OFFSETS O0040 N00000
001 05.5836 002 04.5456003 08.4736 004 05.3421 005 08.4733 006 06.5947 007 07.4432 008 06.5543
009 00.0000 010 00.0000011 00.0000 012 00.0000 013 00.0000 014 00.0000 015 00.0000 016 00.0000
Simulating Wear OffsetsThe tool length compensation offset must be adjusted
FANUC 15M
POSITION PROGRAM OFFSET PRG_CHK +EDIT *** STOP **** *** *** *** *** ****
TOOL OFFSETS O0040 N00000
084 00.0000 095 00.0000086 00.0000 087 00.0000 088 00.0000 089 00.0000 090 00.0000 091 00.0000
092 00.0000 093 00.0000094 00.0000 095 00.0000 096 00.0000 097 00.0000 098 00.0000 099 00.0000
Simulating Wear OffsetsPick a secondary offset to use as the wear offset
FANUC 15M
POSITION PROGRAM OFFSET PRG_CHK +EDIT *** STOP **** *** *** *** *** ****
TOOL OFFSETS O0040 N00000
084 00.0000 095 00.0000086 00.0000 087 00.0000 088 00.0000 089 00.0000 090 00.0000 091 00.0000
092 00.0000 093 00.0000094 00.0000 095 00.0000 096 00.0000 097 00.0000 098 00.0000 099 -00.0020
Simulating Wear OffsetsStore the deviation in this offset
O0001N005 T01 M06N010 G54 G90 S600 M03 T02N015 G00 X3.0 Y2.0N020 G43 Z0.1N025 G01 Z-[0.5 - #2099] F4.0N030 X4.5N035 . . . ..
Simulating Wear OffsetsIn the program…
O0001N005 T01 M06N010 G54 G90 S600 M03 T02N015 G00 X3.0 Y2.0N020 G43 Z0.1N025 G01 Z-[0.5 - #2099] F4.0N030 X4.5N035 . . . ..
Simulating Wear OffsetsIn the program…
O0001N005 T01 M06N010 G54 G90 S600 M03 T02N015 G00 X3.0 Y2.0N020 G43 Z0.1N025 G01 Z-[0.5 - #2099] F4.0N030 X4.5N035 . . . ..
Simulating Wear OffsetsIn the program…
O0001N005 T01 M06N010 G54 G90 S600 M03 T02N015 G00 X3.0 Y2.0N020 G43 Z0.1N025 G01 Z-[0.5 - #2099] F4.0N030 X4.5N035 . . . ..
Simulating Wear OffsetsIn the program…
O0001N005 T01 M06N010 G54 G90 S600 M03 T02N015 G00 X3.0 Y2.0N020 G43 Z0.1N025 G01 Z-[0.5 - #2099] F4.0N030 X4.5N035 . . . ..
Simulating Wear OffsetsIn the program…
O0001N005 T01 M06N010 G54 G90 S600 M03 T02N015 G00 X3.0 Y2.0N020 G43 Z0.1N025 G01 Z-[0.5 - #2099] F4.0N030 X4.5N035 . . . ..
Simulating Wear OffsetsIn the program…
O0001N005 T01 M06N010 G54 G90 S600 M03 T02N015 G00 X3.0 Y2.0N020 G43 Z0.1N025 G01 Z-[0.5 - #2099] F4.0N030 X4.5N035 . . . ..
Subtract the value of offset 99 from the programmed Z position
Simulating Wear OffsetsIn the program…
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 CorrectnessHere’s how you can!
O0001 (Main program)/ N005 G65 P1000 B1. E12. S3. H11.N010 T01 M06N015 G54 G90 S500 M03...
#2 #19
#11#8
B: Beginning offset to testE: Ending offset to testS: Shortest acceptable lengthH: Longest acceptable length
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
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 CorrectnessIf 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
If any tool is too short or
too long, an appropriate
alarm will sound!
End of custom macro
Turning Center Wear Offsets
In custom macro B:FANUC 15T
POSITION PROGRAM OFFSET PRG_CHK +EDIT *** STOP **** *** *** *** *** ****
WEAR OFFSETS O0040 N00000
001 00.0000 00.0000 00.0000 0002 00.0000 00.0000 00.0000 0003 00.0000 00.0000 00.0000 0004 00.0000 00.0000 00.0000 0005 00.0000 00.0000 00.0000 0006 00.0000 00.0000 00.0000 0007 00.0000 00.0000 00.0000 0008 00.0000 00.0000 00.0000 0
X Z R T
#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 OffsetsHere are the related system variables
#2001 = 0.005Sets X wear offset one to 0.005
#2001 = #2001 + 0.004Increases 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
Implications:Testing offsets
Modifying compensation functionsInventing new compensation functions!
Turning Center Wear OffsetsAs with machining centers…
Turning Center Geometry Offsets
In custom macro B:FANUC 15T
POSITION PROGRAM OFFSET PRG_CHK +EDIT *** STOP **** *** *** *** *** ****
GEOMETRY OFFSETS O0040 N00000
001 00.0000 00.0000 00.0000 0002 00.0000 00.0000 00.0000 0003 00.0000 00.0000 00.0000 0004 00.0000 00.0000 00.0000 0005 00.0000 00.0000 00.0000 0006 00.0000 00.0000 00.0000 0007 00.0000 00.0000 00.0000 0008 00.0000 00.0000 00.0000 0
X Z R T
#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
Turning Center Geometry OffsetsSystem variables related to geometry offsets
Does anyone still use G50? If so …
Offset 21: X10.3375 Z8.3487
N005 G50 X#2021 Z#2121N101 T0101...N065 G00 X#2021 Z#2121 T0100
Improving G50 Commands
At least you can separate
program zero assignment
values from the program!
Attaining Machine Position
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!
For machining centers:
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
Anything you can do with a full probing system can be done with an edge finder!
Uses conductivity-type edge finderRadius stored in #500Length stored in #501
An application:
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
First position the edge finder 0.5 in from the corner
Example
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Program number
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Move into position to touch left side in X
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Stop with message
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Manually, using handwheel, touch left sideBack in auto mode, press cycle start
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Set X fixture offset
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Move away in X
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Come forward in Y
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Move over in X, now ready to touch in Y
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Stop with message
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Manually touch Y surface – then back to auto mode and press cycle start
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Set Y of fixture offset
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Move forward in Y
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Move up in Z
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Move forward in Y, ready to touch in Z
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Stop with message
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Manually, touch in ZBack in auto mode, press cycle start
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Set fixture offset Z
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Move up in Z
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
Invoke coordinate system just set, move to XY zero
Attaining Machine PositionO0015G91 G01 Y0.75 Z-0.75 F30.#3006 = 101 (TOUCH LEFT SIDE)#5221=#5021 +#500G91 G01 X-0.2Y-0.75X0.55#3006 = 102 (TOUCH FRONT SIDE)#5222 = #5022 +#500G91 G01 Y-0.2Z0.75Y0.55#3006 =103 (TOUCH TOP)#5223=#5023 - #501G91 G01 Z0.5G90 G54 X0 Y0M30
End of program
Anything you can do with a spindle probe is possible with
these techniques!
Attaining Machine Position
The only difference is that each surface must be
manually touched
Help With Tool Length Measuring
#5001-2-3 block
Another helpful application: Measuring tool lengths
Help With Tool Length MeasuringO0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Help With Tool Length MeasuringO0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Program number
O0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Help With Tool Length Measuring
Set #100 to first tool station number to measure
O0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Help With Tool Length Measuring
Set #101 to last tool station number to measure
O0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Help With Tool Length Measuring
Initialize counter to first station
O0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Help With Tool Length Measuring
Test if finished
O0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Help With Tool Length Measuring
Go to tool change position
O0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Help With Tool Length Measuring
Place current tool in spindle
O0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Help With Tool Length Measuring
Stop with message, manually touch tool tip to block
O0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Help With Tool Length Measuring
Set current tool length compensation offset value
O0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Help With Tool Length Measuring
Retract 0.5 inch in Z
O0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Help With Tool Length Measuring
Step counter
O0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Help With Tool Length Measuring
Go back to test
O0014#100 = 1 (FIRST TOOL NUMBER)#101 = 15 (LAST TOOL NUMBER)#102 = #100N1 IF[#102 GT #101] GOTO 99G91 G28 Z0 M19T#102 M06#3006 = 100 (TOUCH TOOL TIP TO BLOCK)#[2000 + #102] = #500 - ABS[#5023]G91 G01 Z0.5 F30.0#102 = #102 + 1GOTO 1N99 M30
Help With Tool Length Measuring
End of custom macro
Testing Machine Position
O0001IF [#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. . ..
If machine is not at zero return position, an alarm will sound
Testing Machine Position
12”
32”
Maybe a fixture prohibits tool change while table is centered
O9001IF[#5021 GT [0-12.0] ] GOTO 10IF[#5021 LT [0-32.0] ] GOTO 10#3000 = 100 (BAD TOOL CHANGE POSITION)N10 M06M99
Testing Machine PositionIf a tool change will cause a crash, an alarm will sound
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
.
.
.N015 G00 X3.2 Z-1.0N020 G65 P1000 D0.18 C0.03 F0.005.
0.1
Tool must be in this position when custom macro is
called!
This technique will allow you to minimize input arguments
O1000#100 = #5001#101 = #5002G01 X[#100 - 0.2 - #7 *2] F#9...
Current Position Is Start Point#100 and #101 are set to tool’s current position in X and Z
Improving G50 CommandsCombine this with what you know
about accessing offset values
Offset 21: X10.3375 Z8.3487N005 G50 X[#2021+#5021] Z[#2121+#5022]N101 T0101...N065 G00 X6.5 Z5.0 T0100
The machine can no
longer be out of position!
Modal G Codes
G code groups:Group 1: G00, G01, G02 & G03Group 2: G17, G18, & G19Group 3: G90 & G91Group 4: G22 & G23Group 5: G94 & G95Group 6: G20 & G21Group 7: G40, G41, & G42Group 8: G43, G44, G49
#4001#4002#4003#4004#4005#4006#4007#4008
#100 = #4003
You have access to modal states
Modal G Codes
O1000#100 = #4003 (Retain abs/inc status)G91 . . ......#4003 = #100M99
An example
Current Value Of CNC Addresses
#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
You also have access to current letter address values