+ All Categories
Home > Documents > 6 System variables

6 System variables

Date post: 02-Jan-2016
Category:
Upload: salvador-stanton
View: 27 times
Download: 0 times
Share this document with a friend
Description:
Presentation links page for lesson six. 6 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. - PowerPoint PPT Presentation
Popular Tags:
115
6 System variables Access to special machine functions Access to offsets Access to current positio n Access to modal informati on Presentation links page for lesson six Alarm generat ion Stop with messa ge Timers Suppression of single block , feed hold , & feed override Machining center , Turning center Introduction
Transcript
Page 1: 6    System variables

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

Page 2: 6    System variables

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

Page 3: 6    System variables

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

Page 4: 6    System variables

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

Page 5: 6    System variables

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

Page 6: 6    System variables

Stop With Message

M00: Program Stop

N140 M00 (TURN PART AROUND)

You know the function of M00 program stop

Page 7: 6    System variables

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

Page 8: 6    System variables

Timers

#3001: milliseconds timer#3002: hour timer

#3011: Year/month/day#3012: Hour/minute/second

You can time events with custom macro!

Page 9: 6    System variables

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

Page 10: 6    System variables

Suppression Of Single Block

#3003 = 1 (Suppress single block)

#3003 = 0 (Enable single block)

You can actually disable single block!

Page 11: 6    System variables

Suppression Of Feed Hold

#3004 = 1 (Suppress feed hold)

#3004 = 0 (Enable feed hold)

You can also disable feed hold!

Page 12: 6    System variables

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)

Page 13: 6    System variables

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

Page 14: 6    System variables

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…

Page 15: 6    System variables

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

Page 16: 6    System variables

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

Page 17: 6    System variables

#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:

Page 18: 6    System variables

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)

Page 19: 6    System variables

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

Page 20: 6    System variables

#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

Page 21: 6    System variables

#101 = #2001

Sets variable #101 to the current value of offset one

Not possible by any other means!

Machining Center Tool Offsets

Page 22: 6    System variables

Implications:Testing offsets

Modifying compensation functionsInventing new compensation functions!

Machining Center Tool Offsets

We’ll show several

applications a little later!

Page 23: 6    System variables

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

Page 24: 6    System variables

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:

Page 25: 6    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:

Page 26: 6    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?

Page 27: 6    System variables

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

Page 28: 6    System variables

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…

Page 29: 6    System variables

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

Page 30: 6    System variables

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

Page 31: 6    System variables

Simulating Wear OffsetsYou know how to use wear offsets on turning centers

3.000

Measured: 3.004

Adjust wear offset by -0.004

Page 32: 6    System variables

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

Page 33: 6    System variables

Many machining centers don’t have wear offsets!

0.500

Actual: 0.498

Adjust by -0.002

Simulating Wear Offsets

Page 34: 6    System variables

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

Page 35: 6    System variables

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

Page 36: 6    System variables

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

Page 37: 6    System variables

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…

Page 38: 6    System variables

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…

Page 39: 6    System variables

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…

Page 40: 6    System variables

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…

Page 41: 6    System variables

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…

Page 42: 6    System variables

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…

Page 43: 6    System variables

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…

Page 44: 6    System variables

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?

Page 45: 6    System variables

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

Page 46: 6    System variables

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:

Page 47: 6    System variables

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

Page 48: 6    System variables

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

Page 49: 6    System variables

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

Page 50: 6    System variables

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

Page 51: 6    System variables

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

Page 52: 6    System variables

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

Page 53: 6    System variables

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

Page 54: 6    System variables

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)

Page 55: 6    System variables

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

Page 56: 6    System variables

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

Page 57: 6    System variables

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

Page 58: 6    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 OffsetsHere are the related system variables

Page 59: 6    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

Page 60: 6    System variables

#101 = #2001

Sets variable #101 to the current value of X wear offset one

Not possible by any other means!

Turning Center Wear Offsets

Page 61: 6    System variables

Implications:Testing offsets

Modifying compensation functionsInventing new compensation functions!

Turning Center Wear OffsetsAs with machining centers…

Page 62: 6    System variables

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

Page 63: 6    System variables

#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

Page 64: 6    System variables

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!

Page 65: 6    System variables

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:

Page 66: 6    System variables

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!

Page 67: 6    System variables

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:

Page 68: 6    System variables

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

Page 69: 6    System variables

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

Page 70: 6    System variables

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

Page 71: 6    System variables

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

Page 72: 6    System variables

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

Page 73: 6    System variables

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

Page 74: 6    System variables

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

Page 75: 6    System variables

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

Page 76: 6    System variables

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

Page 77: 6    System variables

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

Page 78: 6    System variables

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

Page 79: 6    System variables

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

Page 80: 6    System variables

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

Page 81: 6    System variables

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

Page 82: 6    System variables

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

Page 83: 6    System variables

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

Page 84: 6    System variables

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

Page 85: 6    System variables

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

Page 86: 6    System variables

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

Page 87: 6    System variables

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

Page 88: 6    System variables

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

Page 89: 6    System variables

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

Page 90: 6    System variables

Help With Tool Length Measuring

#5001-2-3 block

Another helpful application: Measuring tool lengths

Page 91: 6    System variables

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

Page 92: 6    System variables

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

Page 93: 6    System variables

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

Page 94: 6    System variables

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

Page 95: 6    System variables

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

Page 96: 6    System variables

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

Page 97: 6    System variables

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

Page 98: 6    System variables

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

Page 99: 6    System variables

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

Page 100: 6    System variables

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

Page 101: 6    System variables

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

Page 102: 6    System variables

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

Page 103: 6    System variables

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

Page 104: 6    System variables

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

Page 105: 6    System variables

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

Page 106: 6    System variables

Testing Machine Position

12”

32”

Maybe a fixture prohibits tool change while table is centered

Page 107: 6    System variables

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

Page 108: 6    System variables

Relative To Zero Return Position

Turning centers:

#5021: X position relative to zero return#5022: Z position relative to zero return

Read only!

Page 109: 6    System variables

Relative To Program Zero

Turning centers:

#5001: X position relative to program zero#5002: Z position relative to program zero

Read only!

Page 110: 6    System variables

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

Page 111: 6    System variables

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

Page 112: 6    System variables

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!

Page 113: 6    System variables

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

Page 114: 6    System variables

Modal G Codes

O1000#100 = #4003 (Retain abs/inc status)G91 . . ......#4003 = #100M99

An example

Page 115: 6    System variables

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


Recommended