makino programme

78
1 Macro “ B ” Programming Makino Asia Pte Ltd Application Department

Upload: sdharanipathy

Post on 11-Apr-2015

3.879 views

Category:

Documents


56 download

TRANSCRIPT

Page 1: makino programme

1

Macro “ B ” Programming Makino Asia Pte Ltd

Application Department

Page 2: makino programme

2

Description This course is designed to enable the programmer to use the control’s powerful Macro programming feature on milling machines

Students will lean to read and write repetitive machining cycle

Will understand the components of the macro body and the meaning of the macro call command like G65, G66 and G67

Page 3: makino programme

3

Back to basic = Speed & Feed

The consideration for determining speeds and feed are changing

The charts provided are based on actual machining experience utilizing cutting techniques

Page 4: makino programme

4

Spee = orDia * π ( 3.1412 )

V * 1000V * 318Dia

End Feed = Speed * no of tooth * Feed per tooth

Drill Feed = Speed * Feed per Revolution

Tap Feed = Speed * Pitch

Page 5: makino programme

5

Chip ThicknessFeed per tooth

Depth of cut

Chip Thickness

Diameterof cutter

Chip Thickness depend onAd = depth of cut,Rd = width of cut,Sz = feed per tooth

Page 6: makino programme

6

Feed Per Tooth&

Feed Per Revolution

Page 7: makino programme

7

Calculation of Speed & FeedIf Ball nose = 10 mm ( 2 teeth )

Cutting speed = 200 m/min ( V )Feed per tooth = 0.1 mm ( Sz )Answer is

Speed = 200 * 318 / 10 = 6360 ( rpm )

Feed = 6360 * 2 * 0.1= 1272 mm/min

if feed reduce to 50% meanF636, Sz = 0.05

Page 8: makino programme

8

Up Cut & Down Cut

No Mirror Image

Page 9: makino programme

9

GROUP PROGRAMExample O3200 ( Main Program ) like O1000, O100O3201 ( Sub Program )O3202 ( Sub Program )O3203 ( Sub Program )

Use O3200,O3203 DeleteUse O3200,O3203 Punch

Page 10: makino programme

10

Statement ExampleAnswer

#1 = 123.#2 = #1#3 = #2 + 10G01 X10. F#3#4 = 123.4567G00 X#4G04 P#4G04 X#4G#3

123.

133.

F133.

123.457

123. sec

123.457 sec

133. alarm occur

Page 11: makino programme

11

Arithmetic ExpressionAnswer

if #1 = 8. # [ #1 ]if #1 = 10.# [ 100 + #1 ] = 123.# [ 10 + #110 ] = #1#100 = #133 + #110#[ #133 ] = #[ #100 ] + #1

#8

#110 = 123.

#133 = 10.#100 = 133.

#10 = 20.

Page 12: makino programme

12

Arithmetic Operation Commands I#1 = 123.#1 = #2 + 10.#1 = #2 - 10.#1 = #2 * 10.#1 = #2 / 10.#1 = SIN [ 90 ]#1 = COS [ 90 ]#1 = TAN [ 90 ]#1 = ATAN [ 1 ] / [ 1 ]

#1 = #2#1 = #2 + #3#1 = #2 - #3#1 = #2 * #3#1 = #2 / #3#1 = SIN [ #2 ]#1 = COS [ #2 ]#1 = TAN [ #2 ]#1 = ATAN [ #1 ] / [ #2 ]

Page 13: makino programme

13

#i = ATAN [b] / [a]

#1 = ATAN [1] / [1]

#2 = ATAN [-1] / [-1]

#2 = ATAN [-1] / [1]

#2 = ATAN [1] / [-1]

45. ( 0M-15M )

225. ( 0M ) -135. ( 15M )

315. ( 0M )-45. ( 15M )

135. ( 0M-15M )

X

Y

b

a

#1#2

( unit = degree )Differ Control For ATAN

Page 14: makino programme

14

#1 = SQRT [ #2 ]

#1 = ABS [ #2 ]

#1 = ROUND [#2]

#1 = FIX [#2]

#1 = FUP [#2]

#2 = 2

#2 = -1.23

#2 = 1.234#2 = 1.5436

#2 = 1.234#2 = -1.634

#2 = 1.234#2 = -1.634

#1 = 1.4142

#1 = 1.23

#1 = 1.0#1 = 2.0

#1 = 1.0#1 = - 1.0

#1 = 2.0

#1 = - 2.0

Arithmetic Operation Commands IIAnswerIf

Page 15: makino programme

15

Case function of “ROUND”

Case #10 = 12.3758 #12 = 5.1236 G91 G00 X#10 X#12 X[ #10 + #12 ]

If #1 = 12.3456

X[ ROUND[#1] ] orX#1Answer is Axis move X12.346

Answer

= 12.376= 5.124

= 17.499

12.3758 + 5.1236 = 17.4994

Page 16: makino programme

16

Example function of “ROUND”Example#10 = 12.3758 #12 = 5.1236

X-[ ROUND[#10] + ROUND[#12] ]or

#10 = ROUND [ #10 * 1000 ] / 1000 #12 = ROUND [ #12 * 1000 ] / 1000 X-[ #10 + #12 ] X -17.50

X -17.50

Answer

Page 17: makino programme

17

Learning Activity If #100 = 11. #101 = 25. #102 = -1.2345 #103 = 2.3456#104 = ABS [#102]#105 = ROUND [#103]#106 = FIX [#102]#107 = FUP [#102]#108 = #100 + #101#109 = #101 - #102G91 G00 X#102X#103X- [#102 + #103]

Answer= 1.2345= 2.0= - 1.0= - 2.0= 36.0= 26.2345move X-1.234move X 2.346move X-1.111

Page 18: makino programme

18

Empty Variable “ #0 ““ #0 ” mean Empty or Vacant

“ 0 ” is a Value

Example :-

#100 = #0

#102 = 0

G90 G1 X#100 F500

G90 G1 X#102 F500

Answer

Axis no move

Axis move X0

Page 19: makino programme

19

Repeat Function ( IF )

IF / GOTO Statement

N1 IF [ #1 GT #2 ] GOTO 2Not OK

#1 = #1 + 1

GOTO 1N2 M99

Condition

EQ NE GT

GE LT LE

OK

Page 20: makino programme

20

Repeat Function ( WHILE )

WHILE / DO / END Statement

WHILE [ #1 LT #2 ] DO1OK

#1 = #1 + 1

END1M99

Not OK

Page 21: makino programme

21

Rules For DO and END

DO 1

GOTO 10

END 1

N 10

GOTO 1

DO 1

N1

END 1

DO 1

DO 2

END 2

END 1

Use Do / END without condition

Page 22: makino programme

22

Exercises 1 ( IF condition )#1 = 1

N1 IF [ #1 10 ] GOTO 2

Process

#1 = #1 + 1 GOTO 1 N2 M30

Answer GTwhat happenGE

Page 23: makino programme

23

Exercises 2 ( WHILE condition )

#1 = 0WHILE [ #1 10 ] DO 2

Process

#1 = #1 + 1END 2M30

AnswerLT

Page 24: makino programme

24

Exercises 3 ( Clear by IF )%O100 ( IF )

#1 = 100. ( START )#2 = 110. ( END )

N3 IF [ #1 GT #2 ] GOTO 7# [ #1 ] = #0#1 = #1 +1GOTO 3

N7 M30%

#100 = #0#101 = #0#102 = #0#103 = #0#104 = #0#105 = #0#106 = #0#107 = #0#108 = #0#109 = #0#110 = #0

Page 25: makino programme

25

Exercises 4 ( Clear by WHILE )%O100 ( WHILE )#1 = 100. ( START )#2 = 110. ( END )WHILE [ #1 LE #2 ] DO1# [ #1 ] = #0#1 = #1 +1END1M30

%

#100 = #0#101 = #0#102 = #0#103 = #0#104 = #0#105 = #0#106 = #0#107 = #0#108 = #0#109 = #0#110 = #0

Page 26: makino programme

26

Exercises 5 ( Rewrite Tool Pot )O100 ( REWRITE TOOL POT NUMBER )/ M57 ( TOOL NUMBER WRITR)/ T00 ( CLEARING TOOL NUMBER )/ M30

M57 #1 = 1WHILE [ #1 LT 60 ] DO1T#1#1 = #1 + 1END1M30

Pot 1 = T1Pot 2 = T2Pot 3 = T3Pot 4 = T4.....Pot 60 = T60

Page 27: makino programme

27

Exercises 6#101 = 1.000 ( 1 )#102 = 1.414 ( 2 )#103 = 1.732 ( 3 )#104 = 2.000 ( 4 )#105 = 2.236 ( 5 )#106 = 2.449 ( 6 )#107 = 2.646 ( 7 )#108 = 2.828 ( 8 )#109 = 3.000 ( 9 )#110 = 3.162 ( 10 )

Using WHILE condition and ROUND + SQRT command

Page 28: makino programme

28

Exercises 6 ( ROUND + SQRT )O100 ( SQRT )#1 = 101. ( START )#2 = 110. ( END )#3 = 1. ( SQRT [ #3 ] )WHILE [ #1 LE #2 ] DO1# [ #1 ] = ROUND [ SQRT [#3] * 1000 ] / 1000#1 = #1 + 1#3 = #3 + 1END1M30

#101 = 1.000 (1)#102 = 1.414 (2)#103 = 1.732 (3)#104 = 2.000 (4)#105 = 2.236 (5)#106 = 2.449 (6)#107 = 2.646 (7)#108 = 2.828 (8)#109 = 3.000 (9)#110 = 3.162 (10)

Page 29: makino programme

29

Exercise 7 ( Positioning )O800 ( MAIN PROGRAM )G90 G0 G54 X0 Y0G43 H1 Z50. S1200 M3G81 Z-1.5 R2. F100 L0 K0M98 P801G80G91 G0 G28 Z0M30

O801 ( LINE BOLT HOLE )

M99

Page 30: makino programme

30

Illustration ( Positioning cycle )

#5 ( Y )

#4 ( X )

#1#21* #

30

O801 ( LINER BOLT HOLE )#24 = 50. ( X Position )#25 = 30. ( Y Position )#1 = 30. ( Angle )#21 = 20. ( Distance )#11 = 4. ( No Of Hole )#30 = 0 ( Counter )WHILE [ #30 LT #11 ] DO1#4 = [#21* #30] * COS [#1] + #24#5 = [#21* #30] * SIN [#1] + #25G90 X#4 Y#5#30 = #30 +1END1M99

Page 31: makino programme

31

Exercise 8 ( Drill Depth Cycle )

Z0R point

Depth Z

Q

d

d = 1mm

O800 ( MAIN PROGRAM )G90 G0 G54 X0 Y0G43 H1 Z50. S1200 M3G0 X10. Y-10.M98 P803 G91 G0 G28 Z0M30

O803 ( DRILL DEPTH CYCLE )

M99

Page 32: makino programme

32

Illustration ( Drill Depth Cycle )O803 ( DRILL DEPTH CYCLE )#26 = 20. ( Z = Depth )#18 = 2. ( R = R Point )#9 = 100. ( F = Feed Rate )#17 = 1.5 ( Q = Depth Of Cut )#33=0 ( Set )G90 G0 Z#18DO1#33 = #33 + ABS[#17]IF [ #33 LT ABS[#26] ] GOTO 11

N11 G90 G1 Z-#33 F#9G0 Z#18

G0 Z [ 1-#33 ] END1

#33 = ABS[#26]

IF [ #33 EQ #26 ] GOTO99

N99 M99

Z0R point

Depth Z

Q

d

Page 33: makino programme

33

Type System VariableTool Compensation #2001 ~ #2200Work Offset #5201 ~ #5328Macro Alarm #3000Clock Information #3001, #3002Auto operation control #3003, #3004Model Information #4000 ~ #4120Position Information #5001 ~ #5065

Page 34: makino programme

34

Tool Offset ( Type A )Offset Variable No > 200

1 #2001 - #100012 #2002 - #10002

99 #2099 - #10099200 #2200 - #10200

If Tool Number > 200 Use #10000 + offset no

Page 35: makino programme

35

Example Tool Offset ( A )

Offset PageH16H17

H31 10.0H32 5.2

Use “ D “ Offset

G90 G10 P31 R10.

same

#2032 = 5.2

Page 36: makino programme

36

Tool Offset ( Type C )Offset H D

Geometry Wear Geometry Wear1 #2001 #2201 #2401 #26012 #2002 #2202 #2402 #2602

200 #2200 #2400 #2600 #2800999 #10999 #11999 #12999 #13999

( H ) G90 G10 L10 P2 R5. same #2002 = 5.( D ) G90 G10 L11 P2 R4. same #2402 = 4.

Page 37: makino programme

37

Work Zero OffsetG54 ( P1 ) #5221 ~ #5226 X, Y, Z, 4, 5, 6G55 ( P2 ) #5241 ~ #5246 X, Y, Z, 4, 5, 6G56 ( P3 ) #5261 ~ #5266 X, Y, Z, 4, 5, 6G57 ( P4 ) #5281 ~ #5286 X, Y, Z, 4, 5, 6G58 ( P5 ) #5301 ~ #5306 X, Y, Z, 4, 5, 6G59 ( P6 ) #5321 ~ #5326 X, Y, Z, 4, 5, 6

External ( P0 ) #5201 ~ #5206 X, Y, Z, 4, 5, 6

Page 38: makino programme

38

Example Work Offset

P0 X 0.000Y 0.000Z 0.000

P1 X - 230.000Y - 452.032Z - 450.123

G90 G10 L2 P1 X- 230.0 Y- 452.032 Z- 450.123same#5221 = - 230.0 ( X )#5222 = - 452.032 ( Y )#5223 = - 450.123 ( Z )

P1=G54, P2=G55, P3=G56P4=G57, P5=G58, P6=G59

Page 39: makino programme

39

Model InformationVariable Code Variable Code#4000~21 G code #4113 M code#4102 B code #4114 Sequence no#4107 D code #4115 Program no#4108 E code #4119 S code#4109 F code #4120 T code#4111 H code #4130 G54.1 P1~48Refer to Manual

Page 40: makino programme

40

G Code List

Code Group VariableG00, G01, G02, G03 01 #4001G90, G91 03 #4003G54, G55, G56 ~G59 14 #4014G73, G76, G81~G89 09 #4009G98, G99 10 #4010

Example : #27 = #4003 ( store G90/G91 Group 03 )= 90 or 91

Refer to Manual

Page 41: makino programme

41

Position Information #5001 ~ #5066

#5001~

#5006

#5021~

#5026

#5041~

#5046

#5061~

#5066

ABSIO

End block pos

ABSMT

Current pos

ABSOT

Current pos

Skip Signal

G31

Work coord.

System

Machine coord.

System

Work coord.

System

Work coord.

System

Possible

Impossible

Impossible

Possible

Read during movement

Refer to Manual

Page 42: makino programme

42

Example Machine Position

G54 Machine Position#5221 = #5021 ( X )#5222 = #5022 ( Y )#5223 = #5023 ( Z )

Machine PositionX - 230.000Y - 452.032Z - 450.123

Transfer Machine Position Into Work Offset G54 WCS

Page 43: makino programme

43

Alarm Message #3000

#100 = #0IF [ #100 NE #0 ] GOTO 100#3000 = 140 ( DATA ERROR )N100 M99

Less than 26 charactern = 1 ~ 999

Page 44: makino programme

44

Clock #3001~#3002Clock 1 #3001 1 msec. ( unit )Clock 2 #3002 1 hour ( unit )

Example 2O1000#3002 = 0 ( initial )G0 X10. Y10.G1 X100 F500

#100 = #3002 * 60 ( min )M99

Example 1G65 P9010 T20.

O9010#3001 = 0 ( initial )#20 = #20 * 1000WHILE [ #3001 LE #20 ] DO1END1M99

Page 45: makino programme

45

Date / Time #3011~#3012#3011 Year / Month / Day#3012 Hour / Minute / Second

Example

Date : 1987.5.20

#3011 = 19870520

Time : 4 : 17 : 05 PM

#3012 = 161705

Page 46: makino programme

46

Parts Counting #3901~#3902#3901 Total number of parts#3902 Required number of parts

O1000 #3902 = 50. ( required parts )IF [ #3901 EQ #3902 ] GOTO 3000

GOTO 99N3000 #3000 = 140 ( PART FINISH )N99 M30

( Initial Total part = 0 and the counter execution when M30 occurs )

Page 47: makino programme

47

Single Block #3003#3003 Single block Function

0 Not suppressed Awaited1 Suppressed Awaited2 Not suppressed Not Awaited3 Suppressed Not Awaited

#3003 = 1 ----- Deactivate single block stop control on panelG0 X10. Y10.G1 X100 F500#3003 = 0 ----- Reactivate single block stop control on panelM99

Page 48: makino programme
Page 49: makino programme

49

Mirror Image #3007IF [ #3007 EQ 0 ] GOTO 1000G91 G0 G28 Z0G0 X0 Y0M23N1000 M99

M21 #3007 = 1M22 #3007 = 2M21, M22 #3007 = 3M23 #3007 = 0

Page 50: makino programme

50

Local Variable Assignment I#1 A #8 E #15 - #22 V #29 -#2 B #9 F #16 - #23 W #30 -#3 C #10 - #17 Q #24 X #31 -#4 I #11 H #18 R #25 Y #32 -#5 J #12 - #19 S #26 Z #33 -#6 K #13 M #20 T #27#7 D #14 - #21 U #28

Like G, L, N, O, P can not be use become Space “-”and command I, J, K Must be in order

Page 51: makino programme

51

Local Variable Assignment II#1 A #8 J2 #15 K4 #22 I7 #29 J9#2 B #9 K2 #16 I5 #23 J7 #30 K9

#3 C #10 I3 #17 J5 #24 K7 #31 I10#4 I1 #11 J3 #18 K5 #25 I8 #32 J10#5 J1 #12 K3 #19 I6 #26 J8 #33 K10

#6 K1 #13 I4 #20 J6 #27 K8#7 I2 #14 J4 #21 K6 #28 I9

Note: Command I, J, K Must be in order

Page 52: makino programme

52

Common Variable#1 - #33 ( Local Variable )

#100 - #149 ( up to #199 option ) Non holding type ( power off )#6001.6 ( CCV ) = hold the value #6000.5 ( SBM ) = single block

#500 - #531 ( up to #999 option ) Holding type ( until battery off )

Page 53: makino programme

53

Simple Call ( G65 ) O1000 ( MAIN PROGRAM )G90 G54 G0 X0 Y0G43 H1 Z50. S1000 M3G0 Z5.G1 Z-5. F100G65 P1001 X50. Y20. F1000G91 G0 G28 Z0M30

O1001 ( SUB MACRO )G91 G1 X#24 F#9Y #25X- #24Y- #25G90 M99

Page 54: makino programme

54

Multi Macro Call

O0001#100 = 123.G65 P2 A10.--M30

O0002X #1; ( X10. )G65 P3 A-20.X #1; ( X10. )-M99

Macro Sub 1

Level 1#1 = 10.

O0003X #1; (-20. )---M99

Macro Sub 2

Level 2#1 = -20.0

Main

Level 0

Up To Level 4

Page 55: makino programme
Page 56: makino programme

56

Model Call A ( G66, G67 ) O1000 ( MAIN PROGRAM )G90 G54 G0 X0 Y0G43 H1 Z50. S1000 M3G0 Z5.G66 P1001 X80. Y60. Z5. F500G0 X-150. Y35.G0 X100. Y70. G0 X-30. Y-140.G67G91 G0 G28 Z0M30

X-150. Y35.

80

605

Page 57: makino programme

57

Sequence of G66, G67 G66 P1001 X80. Y60. Z5. F500G0 X-150. Y35.G0 X100. Y70. G0 X-30. Y-140.G67

#1 #17#2 #18#3 #19#4 #20#5 #21#6 #22#7 #23#8 #24 80.#9 500. #25 60.#10 #26 5.#11 #27#12 #28#13 #29#14 #30#15 #31#16 #32

2 - move position G0 X-150. Y35.3 - call macro program O10014 - back to and move G0 X100. Y70.5 - call macro program O10016 - back to and move G0 X-30. Y-140.7 - call macro program O10018 - back to G67 cancelled macro

1 - read variable G66 P1001 X Y Z F

Page 58: makino programme

58

Sample for Macro Body O1001 ( SUB MACRO )IF [ #24 * #25 * #9 * #26 NE 0 ] GOTO 10#3000 = 140 ( DATA ERROR )N10 #31 = #4003 ( G90,G91 )G90 G1 Z - [ ABS [ #26 ] ] F#9G91 G1 X #24

Y #25X- #24Y- #25

G90 G0 Z5.G#31 M99

Page 59: makino programme

59

Macro Call with “G” codeSet parameterO9010 -- #6050O9011 -- #6051 -- 102O9012 -- #6052O9013 -- #6053O9014 -- #6054 O9015 -- #6055O9016 -- #6056O9017 -- #6057O9018 -- #6058O9019 -- #6059

☯ G65 P9011 X10. Y10. Z5. F500

same

☯ G102 X10. Y10. Z5. F500

Page 60: makino programme

60

Macro call with “M” codeSet parameterO9020 -- #6080 -- 6O9021 -- #6081 -- 90O9022 -- #6082 -- 91O9023 -- #6083 -- 60O9024 -- #6084 O9025 -- #6085O9026 -- #6086O9027 -- #6087O9028 -- #6088O9029 -- #6089

Create O9020 program

and use M6 to call tool

change program

☯ G65 P9021 X10. Y10. M8.

same

☯ M90 X10. Y10. M8.

Page 61: makino programme

61

External Output CommandPOPEN ( connection to I/O )BPRNT ( output binary )DPRNT ( output EIA or ISO codes )PCLOS ( disconnection from I/O )Command format

POPENDPRNT [ a #b [ c d ] ...]PCLOS No of digits below decimal point

No of digits above decimal pointVariableCharacter

Refer to Manual

Page 62: makino programme

62

Printout Layout

--- MAKINO ---

CIRCLE NO 12

+X 0.123 -X 0.321+Y 0.213 -Y 0.132

--- OK ---

When #18 = 12

#120 = 0.123#121 = 0.123#122 = 0.213#123 = 0.132

when #120 LE #1

Page 63: makino programme

63

Printout ProgramPOPENDPRNT [ --- MAKINO --- ]DPRNT [ * ]DPRNT [ *** CIRCLE *** NO #18 [40]]DPRNT [ * ]DPRNT [*** +X * #120[43] *** -X * #121[43]]DPRNT [*** +Y * #122[43] *** -Y * #123[43]]DPRNT [ * ]IF [#120 LE #1 ] GOTO1DPRNT [ *** -- NOT OK -- *** ]GOTO2N1 DPRNT [ *** -- OK -- *** ]N2 PCLOS

--- MAKINO ---

CIRCLE NO 12

+X 0.123 -X 0.321+Y 0.213 -Y 0.132

--- OK ---

When #18 = 12

#120 = 0.123#121 = 0.123#122 = 0.213#123 = 0.132

when #120 LE #1

Page 64: makino programme

64

Create M90 for Tool ApproachO9021 ( M90 TOOL APPROACH )( M90 X Y Z M )M9G91 G0 G28 Z0 M5G49IF [#26 NE #0] GOTO 10#26 = 100. ( Z )N10 IF [#24 NE #0] GOTO 11#24 = 0 ( X )N11 IF [#25 NE #0]GOTO 12 #25 = 0 ( Y )

N12 IF [#13 NE #0] GOTO13#13 = 8 ( M )N13G90 G0 G#4014 X#24 Y#25G43 H#4111 Z#26 M1M3 M#13G98 M99

Page 65: makino programme

65

Create M91 for Tool HomeO9022 ( M91 TOOL HOME #6082 )G80 G40 M5G91 G0 G28 Z0 M9G49G90 G0 G53 X-320.0 Y0M99

Page 66: makino programme

66

Create M6 for Tool ChangeO9020 ( M6 TOOL CHANGE #6080 )G80 G40 M5 G91 G0 G28 Z0 M9G49 G90M464 ( read spindle tool number )G04 P1IF [ #1032 EQ #4120 ] GOTO99T#4120G90 G0 G53 X-600.0 Y0 M1M6N99 M99

Page 67: makino programme

67

Program LayoutT3 M6G54 H3 S500 T1 ( TAP M6 )M90M135 S500 ( Rigid Tap )G84 Z-8. R7. F500 L0 K0M98 P1001

M91M30

O1001 ( Sub-Program )X50. Y50.X-50. Y-50.M99

O1000 ( Main Program )T1 M6G54 H1 S1000 T2 ( CEN DR )M90G81 Z-1.5 R2. F100 L0 K0M98 P1001

T2 M6G54 H2 S1500 T3 ( DR 5 )M90G83 Z-15. R2. Q1.5 F100 L0 K0M98 P1001

Q = Dia * 0.3 or 0.15

Page 68: makino programme

68

Learning Activity ( 1 )O1000 ( MANUAL SET WCS )#110 = #5021 ( X1 )M00#111 = #5021 ( X2 )M00

M30

Touc

h se

nsor

X1

Y4

Y3

X2

G54

Page 69: makino programme

69

Answer ( 1 ) O1000 ( MANUAL SET WCS )#110 = #5021 ( X1 )M00#111 = #5021 ( X2 )M00#112 = #5022 ( Y3 )M00#113 = #5022 ( Y4 )#5221 = [ #110 + #111 ] / 2#5222 = [ #112 + #113 ] / 2M30

X1

Y4

Y3

X2

G54

If G54 change to G55 or G59 How to mark the program better

Page 70: makino programme

70

Answer ( 1.1 )O1000 ( MANUAL SET WCS )#100 = 55. ( WCS )

#110 = #5021 ( X1 )M00#111 = #5021 ( X2 )M00#112 = #5022 ( Y3 )M00#113 = #5022 ( Y4 )

#4 = 5221. ( M/C X )

#5 = 5222. ( M/C Y )

#8 = 20.

#10 = #100 - 54.

#[ #4 + #8 * #10 ] = [#110+#112] / 2

#[ #5 + #8 * #10 ] = [#112+#113] / 2

G91 G0 Z100.

G90 G#100 X0 Y0

M30

Page 71: makino programme

71

DIAGRAM - II

Q

T

Sub-Program

R Point

ProfileB

Repeat Depth CycleG65 P7000 T B S - Q RT ( #2O ) = TopB ( #2 ) = BottomS ( #19 ) = Sub-Program

Q ( #17 ) = Depth Of CutR ( #18 ) = R Point

Page 72: makino programme

72

Program LayoutO1001 ( SUB-PROGRAM )G0 X40. Y-40.Z#33G1 G41 Y-25. D32 F1000

X-25.Y 25.X 25.Y -40.

G1 G40 X40. Y-40.M99

O1000 ( MAIN PROGRAM )T1 M6G54 H1 S1000 ( END 10 )M90#2032 = 5.5G65 P7000 T0 B-8.2 S1001. Q2.

T2 M6G54 H2 S1500 ( END 8 )M90#2032 = 4.G65 P7000 T0 B-8.2 S1001.M91M30

Page 73: makino programme

73

Macro Program ( Repeat Cycle )O7004 ( REPEAT CYCLE )( G65 P7000 T B S -- Q R )#27 = #4003 ( G90, G91 )#26 = ABS [#26] ( Z )IF [ #19 NE #0 ] GOTO 10#3000 = 10 ( S MISSING )N10 IF [ #17 NE #0 ] GOTO 11#17 = 1000. ( Q )N11 #33 = #20 ( T )

DO1#33 = #33 - ABS[#17]IF [ #33 GT #2 ] GOTO 21

N21 M98 P#19

END1

#33 = #2

IF [ #33 EQ #2 ] GOTO 98

N98 IF [ #18 NE #0 ] GOTO 99#18 = 50. ( R ) N99 G90 G0 Z [ ABS [ #18 ] ]G#27 M99

Page 74: makino programme

74

Learning Activity ( 2 )O800 ( MAIN PROGRAM )G54 H1 S2000 F140M90G66 P805 T10. Z10. D5. R2. A2000. B140. I1400. J98. X10. Y-10.X-10. Y10.G67M91M30

O805 ( STEP DRILL CYCLE )

M99

R point

ZZ0

T

A = RPMB = Feed rate

I = RPMJ = Feed rate

D

1

23

Page 75: makino programme

75

Answer 2O805 ( DRILL DEPTH CYCLE )IF [#1*#2*#4*#5*#7*#18*#20*#26 NE 0 ] GOTO111#3000 = 140 ( DATA ERROR )N111 #33 = #4003G90 G0 Z#18 S#1 M3G1 Z-[ #26+#20+1 ] F#2S#4G1 Z-[ #26+#20+#7 ] F#5G0 Z#18G#33 M99 R point

ZZ0

T

A = RPMB = Feed rate

I = RPMJ = Feed rate

D

1

23

A = #1,, B = #2,, I = #4,, J = #5D = #7,,R = #18,, T = #20,,Z = #26

Page 76: makino programme

76

O1000 ( MAIN PROGRAM )T1 M6G54 H1 S2000 F140M90G65 P8001 U54. V56. S1001.G65 P8001 U57. V59. S1001. K21.

M91M30

Learning Activity ( 3 )

U = Start WCSV = End WCSS = Sub ProgramK = Mirror 21 or 22Z = Refer Point 100.

Page 77: makino programme
Page 78: makino programme

78

Change ParameterPSR NE9 NE8

#7 #6 #5 #4 #3 #2 #1 #0

#32021 1

MDIOFFSET SETTING* SETTINGPARAMETER WRITE = 1INPUT ( display alarm 100 )SYSTEM* PARAKey in 3202 * NO SCH ( change if necessary NE9 )OFFSET SETTING* SETTINGPARAMETER WRITE = 0INPUTRESET (alarm clear)

( *soft key )#3104.6 = 1 ( DAL )#3202.0 = 0 ( NE8 )#3202.4 = 1 ( NE9 )#3402.6 = 1 ( CLR )#3406.3 = 1 ( C03 )#3407.6 = 1 ( C14 )#3409.7 = 1 ( CFH )#6001.6 = 1 ( CCV )#6080 = 6 #6081 = 90#6082 = 91#6083 = 60