Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(EOD).Mechatronics.pdf
Скачиваний:
81
Добавлен:
23.08.2013
Размер:
5.07 Mб
Скачать

page 805

dirn_flag = 1; a direction flag

n=10 ; number of passes to cut the surface step=1.0/n ; step sizes for u and v directions start=step/2 ; the start offset in the u and v directions [xp,yp,zp] = p(start,start) ; calculate the start position

print(“G00 X”,xp,” Y”,yp,” Z”,zp+0.2) ; move the tool to above the start position for i=0 to (n-1) ; will increment in the u direction

for j=0 to (n-1) ; will increment in the v direction ; calculate next point

if dirn_flag=-1 then [xp,yp,zp]=p(start+i*step,start+j*step)

if dirn_flag=1 then [xp,yp,zp]=p(start+i*step,start+(n-j)*step) print(“G01 X”,xp,” Y”,yp,” Z”,zp) ; issue instruction to cut to next point next j ; make next step in v direction until done

dirn_flag = -dirn_flag ; reverse direction to cut in opposite direction next i ; move to next cut line in the u direction

print(“G00 Z”,zp+0.2) ; move the tool to above the end position

44.6 NC CONTROLLERS

• NC control programs are essentially quite simple. The source code for a basic controller is given below.

********** Add in C-code for AMP project

44.7 PRACTICE PROBLEMS

1. Examine the part below. It is set up so that the origin is at the bottom left. The cutting tool has a diameter of 1/2”, and the material is 1/8” thick.

page 806

T

 

 

 

 

 

R2.000”

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2.500”

2.000”

5.500” 2.000”

a) Write the equations needed to find the tangency point on the top left of the piece.

ans.

( xT

– 5.5)

2

+ ( yT

– 4.5)

2

= 2

2

 

 

 

 

 

 

 

 

 

 

 

LAT

 

2

2

= 2

2

+

(

5.5

2

2

2

 

= xT

+ yT

 

 

+ 4.5 )

 

b) Develop an NC program to mill the part. The program should be complete and include all instructions required. If necessary, assume a location for the tangency point.

ans. N10 G70 G90 T01 M06 N20 F20 S2000 M03

N30 G00 X-0.0 Y-0.25

N40 G01 Z-0.25

N50 G01 X5.75

N60 G01 Y1.75

N70 G01 X7.75

N80 G01 Y4.5

N90 G02 X___ Y___ I5.5 J4.5

N100 G01 X___ Y-0.25

N110 G00 Z0.2

N120 M05 M00

2. Examine the part below. It is set up so that the origin is at the bottom left corner. The cutting tool has a diameter of 1/2”, and the material is 1/8” thick. Develop an NC program to mill the part. The program should be complete and include all instructions required.

page 807

T

 

 

 

R2.000”

 

 

 

 

 

 

2.500”

 

2.000”

5.500”

2.000”

3.

Соседние файлы в предмете Электротехника