slide1
Download
Skip this Video
Download Presentation
6 System variables

Loading in 2 Seconds...

play fullscreen
1 / 115

6 System variables - PowerPoint PPT Presentation


  • 92 Views
  • Uploaded on

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.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '6 System variables' - salvador-stanton


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1
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

Access to current position

Access to modal information

slide2
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
Alarm number (100-255)

System variable

Alarm message (up to 26 char.)

Alarm Generation

We introduced alarm generation in lesson four

#3000 = 100 (DATA MISSING)

Printed on display screen:

MC100 DATA MISSING

alarm generation example
Alarm Generation Example

One example we gave was related to tool width

If the tool is too wide, an alarm 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
A Part Counter Example

Another application…

O0008 (Main program)

.

.

.

N445 G65 P1008 C250.

N450 M30

#500: Part counter (Starts at zero)

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
Stop With Message

You know the function of M00 program stop

M00: Program Stop

N140 M00 (TURN PART AROUND)

slide7
Message number (100-255)

System variable

Message (up to 26 char.)

Stop With Message

Stop with message is like M00, but a message will be displayed!

#3006 = 100 (REVERSE PART)

MS100 REVERSE PART

Same structure as alarm generation #3000

Operator can continue by pressing cycle start

timers
Timers

You can time events with custom macro!

#3001: milliseconds timer

#3002: hour timer

#3011: Year/month/day

#3012: Hour/minute/second

timers1
Timers

Accumulate the time a tool cuts:

.

.

#3001 = 0

G01 Z-0.5 F4.0

#501 = #501 + #3001

IF [#501 GT 20000] GOTO 98

.

.

GOTO 99

N98 #501 = 0 (Reset accumulator)

#3000 = 100 (TOOL EXHAUSTED)

N99 M30

#3001 = 0 (Reset ms timer)

#501: Accumulator

After twenty seconds of cutting, alarm will sound

suppression of single block
Suppression Of Single Block

You can actually disable single block!

#3003 = 1 (Suppress single block)

#3003 = 0 (Enable single block)

suppression of feed hold
Suppression Of Feed Hold

You can also disable feed hold!

#3004 = 1 (Suppress feed hold)

#3004 = 0 (Enable feed hold)

suppression of feedrate override
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
#18

#26

G65 P1000 R.2 Z-1.0 F0.0625

#9

Tapping Example

Call to tapping custom macro

O1000 (Tapping program)

G00 X0 Z#18

#3003 = 1 (Disable single block)

#3004 = 2 (Disable feed hold & feed override)

G01 Z#26 F#9

M04

Z#18

#3003 = 0 (Enable single block)

#3004 = 0 (Enable feed hold & feed override)

M99

Suppresses single block, feed hold, and feedrate override during tapping

slide14
OFFSETS

001 00.0000

002 00.0000

003 00.0000

004 00.0000

005 00.0000

006 00.0000

007 00.0000

008 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

Machining Center Tool Offsets

Machining centers offset tables vary…

One value per offset:

#2001 - #2199: Offsets 1 - 199

machining center tool offsets
OFFSETS

H

D

H

D

001 00.0000 00.0000

002 00.0000 00.0000

003 00.0000 00.0000

004 00.0000 00.0000

005 00.0000 00.0000

006 00.0000 00.0000

007 00.0000 00.0000

008 00.0000 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 00.0000

Machining Center Tool Offsets

Two values per offset:

#2001 - #2199: H offsets 1 - 199

#2401 - #2599: D offsets 1 - 199

slide16
GEOMETRY OFFSETS

H

D

H

D

001 00.0000 00.0000

002 00.0000 00.0000

003 00.0000 00.0000

004 00.0000 00.0000

005 00.0000 00.0000

006 00.0000 00.0000

007 00.0000 00.0000

008 00.0000 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 00.0000

Machining Center Tool Offsets

If you have geometry & wear offsets:

#2001 - #2199: H geom offsets 1 - 199

#2401 - #2599: D geom offsets 1 - 199

slide17
WEAR OFFSETS

H

D

H

D

001 00.0000 00.0000

002 00.0000 00.0000

003 00.0000 00.0000

004 00.0000 00.0000

005 00.0000 00.0000

006 00.0000 00.0000

007 00.0000 00.0000

008 00.0000 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 00.0000

Machining Center Tool Offsets

If you have geometry & wear offsets:

#2201 - #2399: H wear offsets 1 - 199

#2601 - #2799: D wear offsets 1 - 199

slide18
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

All offsets are accessible through custom macro! (Read and Write)

You must reference your control manual!

slide19
OFFSETS

001 00.0000

002 00.0000

003 00.0000

004 00.0000

005 00.0000

006 00.0000

007 00.0000

008 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

Machining Center Tool Offsets

Most common:

The most common offset configuration is but one value per offset!

We’ll assume this for our examples

#2001 - #2199: Offsets 1 - 199

slide20
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

slide21
Machining Center Tool Offsets

#101 = #2001

Sets variable #101 to the current value of offset one

Not possible by any other means!

slide22
Machining Center Tool Offsets

Implications:

We’ll show several applications a little later!

  • Testing offsets
  • Modifying compensation functions
  • Inventing new compensation functions!
machining center fixture offsets
15M

FANUC

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

EDIT *** STOP **** *** *** *** *** ****

+

POSITION

PROGRAM

OFFSET

PRG_CHK

Machining Center Fixture Offsets

You also have access to fixture offsets

slide24
Offset #1 (G54)

Offset #2 (G55)

Offset #3 (G56)

Common (#0)

X: #5201

Y: #5202

Z: #5203

4th: #5204

X: #5221

Y: #5222

Z: #5223

4th: #5224

X: #5241

Y: #5242

Z: #5243

4th: #5244

X: #5261

Y: #5262

Z: #5263

4th: #5264

Machining Center Fixture Offsets

Related system variables:

slide25
Offset #4 (G57)

Offset #5 (G58)

Offset #6 (G59)

X: #5281

Y: #5282

Z: #5283

4th: #5284

X: #5301

Y: #5302

Z: #5303

4th: #5304

X: #5321

Y: #5322

Z: #5323

4th: #5324

Machining Center Fixture Offsets

Related system variables:

slide26
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
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

H

Y

X

F - Feedrate

Z

T

Simulating Cutter Radius Comp.

We’ve specified the cutter size in the calling command

First example:

D specifies tool diameter

slide28
D

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

Simulating Cutter Radius Comp.

We’ve referenced cutter size in the custom macro…

#11

H

Y

#25

X

#24

#7

#9

F - Feedrate

Z

T

#26

#20

slide29
O0001

N005 G54 G90 S300 M03

N010 G00 X0 Y0

N015 G43 H01 Z0.1

N020 G65 P1000 X0 Y0 Z0 H2.

T1. D31. F4.

N025 G91 G28 Z0 M19

N030 M01

.

.

Simulating Cutter Radius Comp.

But maybe you want the call statement to include the cutter compensation offset number

H

Y

X

Now D specifies cutter comp offset number!

F - Feedrate

Z

T

D: Offset #

slide30
D

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

Simulating Cutter Radius Comp.

Store value of offset in #101

#11

H

Y

#25

X

#24

#7

Reference offset value

#9

F - Feedrate

Z

T

#26

#20

simulating wear offsets
3.000Simulating Wear Offsets

You know how to use wear offsets on turning centers

Measured: 3.004

Adjust wear offset by -0.004

slide32
FANUC

Simulating Wear Offsets

15T

In custom macro B:

WEAR OFFSETS

O0040 N00000

X

Z

R

T

001 -00.0040 00.0000 00.0000 0

002 00.0000 00.0000 00.0000 0

003 00.0000 00.0000 00.0000 0

004 00.0000 00.0000 00.0000 0

005 00.0000 00.0000 00.0000 0

006 00.0000 00.0000 00.0000 0

007 00.0000 00.0000 00.0000 0

EDIT *** STOP **** *** *** *** *** ****

+

POSITION

PROGRAM

OFFSET

PRG_CHK

slide33
0.500

Simulating Wear Offsets

Many machining centers don’t have wear offsets!

Actual: 0.498

Adjust by -0.002

slide34
FANUC

Simulating Wear Offsets

The tool length compensation offset must be adjusted

15M

TOOL OFFSETS

O0040 N00000

001 05.5836

002 04.5456

003 08.4736

004 05.3421

005 08.4733

006 06.5947

007 07.4432

008 06.5543

009 00.0000

010 00.0000

011 00.0000

012 00.0000

013 00.0000

014 00.0000

015 00.0000

016 00.0000

EDIT *** STOP **** *** *** *** *** ****

+

POSITION

PROGRAM

OFFSET

PRG_CHK

slide35
FANUC

Simulating Wear Offsets

Pick a secondary offset to use as the wear offset

15M

TOOL OFFSETS

O0040 N00000

084 00.0000

095 00.0000

086 00.0000

087 00.0000

088 00.0000

089 00.0000

090 00.0000

091 00.0000

092 00.0000

093 00.0000

094 00.0000

095 00.0000

096 00.0000

097 00.0000

098 00.0000

099 00.0000

EDIT *** STOP **** *** *** *** *** ****

+

POSITION

PROGRAM

OFFSET

PRG_CHK

slide36
FANUC

Simulating Wear Offsets

Store the deviation in this offset

15M

TOOL OFFSETS

O0040 N00000

084 00.0000

095 00.0000

086 00.0000

087 00.0000

088 00.0000

089 00.0000

090 00.0000

091 00.0000

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

slide37
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 . . .

.

.

slide38
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 . . .

.

.

slide39
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 . . .

.

.

slide40
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 . . .

.

.

slide41
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 . . .

.

.

slide42
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 . . .

.

.

slide43
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 . . .

.

.

Subtract the value of offset 99 from the programmed Z position

slide44
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
#8

#11

#2

#19

Checking Offsets For Correctness

Here’s how you can!

O0001 (Main program)

/ N005 G65 P1000 B1. E12. S3. H11.

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

slide46
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

slide47
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

slide48
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

slide49
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

slide50
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

slide51
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

slide52
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

slide53
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

slide54
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

slide55
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

slide56
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

If any tool is too short or too long, an appropriate alarm will sound!

turning center wear offsets
FANUC

15T

WEAR OFFSETS

O0040 N00000

X

Z

R

T

001 00.0000 00.0000 00.0000 0

002 00.0000 00.0000 00.0000 0

003 00.0000 00.0000 00.0000 0

004 00.0000 00.0000 00.0000 0

005 00.0000 00.0000 00.0000 0

006 00.0000 00.0000 00.0000 0

007 00.0000 00.0000 00.0000 0

008 00.0000 00.0000 00.0000 0

EDIT *** STOP **** *** *** *** *** ****

+

POSITION

PROGRAM

OFFSET

PRG_CHK

Turning Center Wear Offsets

In custom macro B:

slide58
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

slide59
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

slide60
Turning Center Wear Offsets

#101 = #2001

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

Not possible by any other means!

slide61
Turning Center Wear Offsets

As with machining centers…

Implications:

  • Testing offsets
  • Modifying compensation functions
  • Inventing new compensation functions!
turning center geometry offsets
15T

FANUC

GEOMETRY OFFSETS

O0040 N00000

X

Z

R

T

001 00.0000 00.0000 00.0000 0

002 00.0000 00.0000 00.0000 0

003 00.0000 00.0000 00.0000 0

004 00.0000 00.0000 00.0000 0

005 00.0000 00.0000 00.0000 0

006 00.0000 00.0000 00.0000 0

007 00.0000 00.0000 00.0000 0

008 00.0000 00.0000 00.0000 0

EDIT *** STOP **** *** *** *** *** ****

+

POSITION

PROGRAM

OFFSET

PRG_CHK

Turning Center Geometry Offsets

In custom macro B:

slide63
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

slide64
Improving G50 Commands

Does anyone still use G50? If so …

Offset 21: X10.3375 Z8.3487

At least you can separate program zero assignment values from the program!

N005 G50 X#2021 Z#2121

N101 T0101

.

.

.

N065 G00 X#2021 Z#2121 T0100

attaining machine position
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 position1
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 position2
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

slide68
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

M30

Attaining Machine Position

Example

First position the edge finder 0.5 in from the corner

slide69
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

M30

Attaining Machine Position

Program number

slide70
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

M30

Attaining Machine Position

Move into position to touch left side in X

slide71
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

M30

Attaining Machine Position

Stop with message

slide72
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

M30

Attaining Machine Position

Manually, using handwheel, touch left side

Back in auto mode, press cycle start

slide73
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

M30

Attaining Machine Position

Set X fixture offset

slide74
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

M30

Attaining Machine Position

Move away in X

slide75
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

M30

Attaining Machine Position

Come forward in Y

slide76
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

M30

Attaining Machine Position

Move over in X, now ready to touch in Y

slide77
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

M30

Attaining Machine Position

Stop with message

slide78
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

M30

Attaining Machine Position

Manually touch Y surface – then back to auto mode and press cycle start

slide79
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

M30

Attaining Machine Position

Set Y of fixture offset

slide80
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

M30

Attaining Machine Position

Move forward in Y

slide81
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

M30

Attaining Machine Position

Move up in Z

slide82
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

M30

Attaining Machine Position

Move forward in Y, ready to touch in Z

slide83
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

M30

Attaining Machine Position

Stop with message

slide84
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

M30

Attaining Machine Position

Manually, touch in Z

Back in auto mode, press cycle start

slide85
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

M30

Attaining Machine Position

Set fixture offset Z

slide86
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

M30

Attaining Machine Position

Move up in Z

slide87
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

M30

Attaining Machine Position

Invoke coordinate system just set, move to XY zero

slide88
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

M30

Attaining Machine Position

End of program

slide89
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
1-2-3 block

#500

Help With Tool Length Measuring

Another helpful application: Measuring tool lengths

help with tool length measuring1
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

slide92
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

Program number

slide93
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

Set #100 to first tool station number to measure

slide94
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

Set #101 to last tool station number to measure

slide95
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

Initialize counter to first station

slide96
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

Test if finished

slide97
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

Go to tool change position

slide98
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

Place current tool in spindle

slide99
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

Stop with message, manually touch tool tip to block

slide100
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

Set current tool length compensation offset value

slide101
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

Retract 0.5 inch in Z

slide102
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

Step counter

slide103
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

Go back to test

slide104
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

End of custom macro

testing machine position
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 position1
32”

12”

Testing Machine Position

Maybe a fixture prohibits tool change while table is centered

slide107
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
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
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
0.1Current Position Is Start Point

This technique will allow you to minimize input arguments

Tool must be in this position when custom macro is called!

.

.

.

N015 G00 X3.2 Z-1.0

N020 G65 P1000 D0.18 C0.03 F0.005

.

slide111
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

.

.

.

slide112
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

The machine can no longer be out of position!

modal g codes
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

Modal G Codes

You have access to modal states

#4001

#4002

#4003

#4004

#4005

#4006

#4007

#4008

#100 = #4003

modal g codes1
Modal G Codes

An example

O1000

#100 = #4003 (Retain abs/inc status)

G91 . . .

.

.

.

.

.

#4003 = #100

M99

current value of cnc addresses
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

ad