Рефераты
 

Технологическая реализация системы подготовки обработки детали станка с числовым программным управлением

p align="left">W_Str('Y='+w_r(Yst[i],9,3)+' '+w_r(SM_Y[i],9,3));

W_Str('Z='+w_r(Zst[i],9,3)+' '+w_r(SM_Z[i],9,3));

W_Str('A='+w_r(Ast[i],9,3)+' '+w_r(POV_A[i],9,3));

W_Str('B='+w_r(Bst[i],9,3)+' '+w_r(POV_B[i],9,3));

W_Str('C='+w_r(Cst[i],9,3)+' '+w_r(SM_C[i],9,3));

end;

W_Str('**********************');

str(N_Act:1,s);

W_Str('Время оп.'+s+' :'+w_i(trunc(PosTime[N_Act]),1)+''''+

w_r(frac(PosTime[N_Act])*60,2,0)+'"');

TotTime:=0;

for j:=1 to N_op do

TotTime:=TotTime+PosTime[j];

W_Str('Время общее:'+w_r(TotTime,2,3));

Form1.Memo1.Visible:=true;

end;

procedure Move(Os:char;len:real;part_name:string); //создание структуры кадра

begin

writeln(ff1,'(position_pa :part_assembly :start ','"',part_name,'" ',

':select_done :translate :dir_len :',Os,' :len ',len:8:6,' :done ',

':pos_dynamic :dynamo-done)');

writeln(ff1,'(redraw_vp "vport1")');

end;

procedure Rotate(Os:char;angle:real;part_name:string);

begin

writeln(ff1,'(position_pa :part_assembly :start ','"',part_name,'" ',

':select_done :rotate :axis :',Os,' :rotation_angle ',angle:8:6,' :done ',

':pos_dynamic :dynamo-done)');

writeln(ff1,'(redraw_vp "vport1")');

end;

procedure XX(len:real);

begin

Move('x',len,'/CIP6/N_S');

end;

procedure YY(len:real);

begin

Move('y',len,'/CIP6/Krug');

end;

procedure ZZ(len:real);

begin

Move('z',len,'/CIP6/Krug');

end;

procedure AA(ang:real);

begin

writeln(ff1,'(current_wp "/CIP6/N_S/V_S/C_Sys/Det/w_A")');

Rotate('w',ang,'/CIP6/N_S/V_S/C_Sys/Det');

end;

procedure BB(ang:real);

begin

writeln(ff1,'(current_wp "/CIP6/N_S/V_S/w_B")');

Rotate('w',ang,'/CIP6/N_S/V_S');

end;

procedure CC(len:real);

begin

writeln(ff1,'(current_wp "/CIP6/N_S/V_S/w_C")');

Move('w',len,'/CIP6/N_S/V_S/C_Sys');

end;

procedure AddToFile(Fn:string;N_Pos:integer);

begin

AssignFile(ff1,Fn); //запись файла связи с 3D пакетом

Append(ff1);

Nt[N_Pos]:=F;

writeln(ff1,'(dotimes ( n ',Nt[N_Pos]:2,')');

if abs(SM_X[N_Pos])>=0.001 then

begin

XX(SM_X[N_Pos]/Nt[N_Pos]);

Xst[N_Pos]:=Xst[N_Pos-1]+SM_X[N_Pos];

end;

if abs(SM_Y[N_Pos])>=0.001 then

begin

YY(SM_Y[N_Pos]/Nt[N_Pos]);

Yst[N_Pos]:=Yst[N_Pos-1]+SM_Y[N_Pos];

end;

if abs(SM_Z[N_Pos])>=0.001 then

begin

ZZ(-SM_Z[N_Pos]/Nt[N_Pos]);

Zst[N_Pos]:=Zst[N_Pos-1]+SM_Z[N_Pos];

end;

if abs(POV_B[N_Pos])>=0.001 then

begin

BB(POV_B[N_Pos]/Nt[N_Pos]);

Bst[N_Pos]:=Bst[N_Pos-1]+POV_B[N_Pos];

end;

if abs(Pov_A[N_Pos])>=0.001 then

begin

AA(POV_A[N_Pos]/Nt[N_Pos]);

Ast[N_Pos]:=Ast[N_Pos-1]+POV_A[N_Pos];

end;

if abs(SM_C[N_Pos])>=0.001 then

begin

CC(SM_C[N_Pos]/Nt[N_Pos]);

Cst[N_Pos]:=Cst[N_Pos-1]+SM_C[N_Pos];

end;

writeln(ff1,')');

Flush(ff1);

CloseFile(ff1);

end;

procedure G90;

begin

ABS_OTN:='G90';

X:=Xst[N_Pos[N_Act]];

Y:=Yst[N_Pos[N_Act]];

Z:=Zst[N_Pos[N_Act]];

A:=Ast[N_Pos[N_Act]];

B:=Bst[N_Pos[N_Act]];

C:=Cst[N_Pos[N_Act]];

end;

procedure G91;

begin

ABS_OTN:='G91';

X:=0; Y:=0; Z:=0;

A:=0; B:=0; C:=0;

end;

procedure G01;

var

ss,ss1:string;

begin

inc(N_Pos[N_Act]);

PosTime[N_Act]:=PosTime[N_Act]+abs(FTime);

FTime:=0;

OutMet[N_Pos[N_Act]]:=Obr;

Obr:=0;

Str_Rel[N_Pos[N_Act]]:=ABS_OTN;

if pos('G91',ABS_OTN)>0 then

begin

SM_X[N_Pos[N_Act]]:=X;

SM_Y[N_Pos[N_Act]]:=Y;

SM_Z[N_Pos[N_Act]]:=Z;

POV_B[N_Pos[N_Act]]:=B;

POV_A[N_Pos[N_Act]]:=A;

SM_C[N_Pos[N_Act]]:=C;

end;

if pos('G90',ABS_OTN)>0 then

begin

SM_X[N_Pos[N_Act]]:=X-Xst[N_Pos[N_Act]-1];

SM_Y[N_Pos[N_Act]]:=Y-Yst[N_Pos[N_Act]-1];

SM_Z[N_Pos[N_Act]]:=Z-Zst[N_Pos[N_Act]-1];

POV_B[N_Pos[N_Act]]:=B-Bst[N_Pos[N_Act]-1];

POV_A[N_Pos[N_Act]]:=A-Ast[N_Pos[N_Act]-1];

SM_C[N_Pos[N_Act]]:=C-Cst[N_Pos[N_Act]-1];

end;

Xst[N_Pos[N_Act]]:=Xst[N_Pos[N_Act]-1];

Yst[N_Pos[N_Act]]:=Yst[N_Pos[N_Act]-1];

Zst[N_Pos[N_Act]]:=Zst[N_Pos[N_Act]-1];

Ast[N_Pos[N_Act]]:=Ast[N_Pos[N_Act]-1];

Bst[N_Pos[N_Act]]:=Bst[N_Pos[N_Act]-1];

Cst[N_Pos[N_Act]]:=Cst[N_Pos[N_Act]-1];

str(N_Pos[N_Act]:1,ss);

if NC_ACt=0 then

begin

str(N_Pos[N_Act]:1,ss1);

Form1.CheckListBox1.Items.Add(ss+':'+Com[N_Pos[N_Act]]);

if N_Pos[N_Act]>1 then

Form1.CheckListBox1.State[N_Pos[N_Act]-1]:=cbUnChecked;

Form1.CheckListBox1.State[N_Pos[N_Act]]:=cbChecked;

AddToFile(Path+'LSP\Hod.lsp',N_Pos[N_Act]);

end;

end;

procedure Profile;

var

RF:real;

ff:textfile;

X3,Y3,Z3,X31,Y31,Z31,X32,Y32,Z32,Mu_YZ,Mu_YZ1,Mu_YX,Mu_XZ:real;

Xin,Yin,Zin,Xex,Yex,Zex,Muin,Muex:real;

Xin1,Yin1,Zin1,Xex1,Yex1,Zex1,Muin1,Muex1:real;

Ang,Rs,Rd,Ksi,Ksi1,Xc,Yc,Zc1,Xc1,Yc1,F0,F1,Ficx:real;

N_Uch,N_Point,Np1,i,j,N_Half:integer;

dTeta,R_Limit1,R_Limit2,xL1,yL1,zL1,xL2,yL2,zL2,xL3,yL3,zL3,

fex,Alf1,Alf2,Alf3,L1,L2,L3,Step:real;

xL1f,yL1f,zL1f,xL2f,yL2f,zL2f,xL3f,yL3f,zL3f:real;

N_Break:array [1..2,0..4,0..100] of integer;

N_SpL:integer;

//LtrR,LtrP:extended;

fiA{,fiAmax},Vfi,fit_max,dX,dY,dZ:real;

Xv03,Yv03,Zv03:real;

K_Razb:real;

Fex_Min,Fex_Max:array [1..3] of real;

fit0,{fit_st,fit_fin,}dS_Min:real;

Empt:array [1..12] of integer;

a1_p,an_p,Sn_p,r_p,Ltr_Pfin:real;

NSect:integer;

procedure Sil(N_Tr:integer);

var

i:integer;

ff1:textfile;

fixX,fixY,fixZ:real;

fixX1,fixY1,fixZ1:real;

fixX2,fixY2,fixZ2:real;

procedure Vint(N_Tr,N_Half,N_Uch,j:integer);

begin

XvT[N_Tr,N_Half,N_Uch,j]:=Xv[N_Tr,N_Half,N_Uch,j];

YvT[N_Tr,N_Half,N_Uch,j]:=Yv[N_Tr,N_Half,N_Uch,j]*cos({FiA}0)+

Zv[N_Tr,N_Half,N_Uch,j]*sin({FiA}0);

ZvT[N_Tr,N_Half,N_Uch,j]:=-Yv[N_Tr,N_Half,N_Uch,j]*sin({FiA}0)+

Zv[N_Tr,N_Half,N_Uch,j]*cos({FiA}0);

fixX:=XvT[N_Tr,N_Half,N_Uch,j];

fixY:=YvT[N_Tr,N_Half,N_Uch,j];

fixZ:=ZvT[N_Tr,N_Half,N_Uch,j];

writeln(ff1,XvT[N_Tr,N_Half,N_Uch,j]:8:5,',',

YvT[N_Tr,N_Half,N_Uch,j]:1:5,',',

ZvT[N_Tr,N_Half,N_Uch,j]:1:5);

end;

procedure Create_Bspline(N_Tr,N_Sp,N_Uch,N_Half:integer);

var

j:integer;

x3,y3,z3:real;

begin

inc(N_Spl);

case N_Sp of

begin

writeln(ff1,'(create_curve_on_surface :wire_part "/Sil_',N_Tr:1,'.',N_Spl:1,'" ',

':start :selected_part "/a1/Krug" :face_3d :by_feature ',

':full_name :start_name "/a1/Krug" :feature "feat1" ',

':end_name :select_done ');

for j:=0 to N_Razb[N_Act] do

if (N_Break[N_Half,N_Uch,j]=0) then

begin

Empt[N_Sp]:=1;

Vint(N_Tr,N_Half,N_Uch,j);

if (N_Spl=4) and (j=N_Razb[N_Act]) then

Vint(N_Tr,1,1,j);

if (N_Spl=6) and (j=N_Razb[N_Act]) then

Vint(N_Tr,1,3,j);

end;

writeln(ff1,')');

writeln(ff1,'(remove_from_vp_drawlist "vport1" :with-wp ',

' "/Sil_',N_Tr:1,'.',N_Spl:1,'")');

end;

begin

{ Vint(N_Tr,1,1,N_Razb[N_Act]);

fixX1:=fixX; fixY1:=fixY; fixZ1:=fixZ;

Vint(N_Tr,1,3,N_Razb[N_Act]);

fixX2:=fixX; fixY2:=fixY; fixZ2:=fixZ;

x3:=(fixX1+fixX2)/2;

z3:=(fixZ1+fixZ2)/2;

y3:=(fixY1+fixY2)/2+Ddet;

writeln(ff1,'(create_bspline :wire_part "/Sil_',N_Tr:1,'.',N_Spl:1,'" ',

':input_mode :control ');

Vint(N_Tr,1,1,N_Razb[N_Act]);

writeln(ff1,x3:8:8,',',y3:1:8,',',z3:1:8);

Vint(N_Tr,1,3,N_Razb[N_Act]);}

writeln(ff1,'(create_bspline :wire_part "/Sil_',N_Tr:1,'.',N_Spl:1,'" ',

':start_condition :edge :cv_edge ',

':start :selected_part "/Sil_',N_Tr:1,'.',1:1,'" :edge_3d :by_vertex_3d');

Empt[N_Sp]:=1;

Vint(N_Tr,1,1,N_Razb[N_Act]);

writeln(ff1,':select_done ');

Vint(N_Tr,1,1,N_Razb[N_Act]);

writeln(ff1,':tangent 0.2 :accept ',

':end_condition :edge :cv_edge ',

':start :selected_part "/Sil_',N_Tr:1,'.',3:1,'" :edge_3d :by_vertex_3d');

Vint(N_Tr,1,3,N_Razb[N_Act]);

writeln(ff1,':select_done ');

Vint(N_Tr,1,3,N_Razb[N_Act]);

writeln(ff1,':tangent 0.2 :accept ');

writeln(ff1,')');

writeln(ff1,'(remove_from_vp_drawlist "vport1" :with-wp ',

' "/Sil_',N_Tr:1,'.',N_Spl:1,'")');

end;

begin

writeln(ff1,'(create_bspline :wire_part "/Sil_',N_Tr:1,'.',N_Spl:1,'" ',

':start_condition :edge :cv_edge ',

':start :selected_part "/Sil_',N_Tr:1,'.',5:1,'" :edge_3d :by_vertex_3d ');

Empt[N_Sp]:=1;

Vint(N_Tr,2,1,N_Razb[N_Act]);

fixX1:=fixX; fixY1:=fixY; fixZ1:=fixZ;

writeln(ff1,':select_done ');

Vint(N_Tr,2,1,N_Razb[N_Act]);

writeln(ff1,':accept ',

':end_condition :edge :cv_edge ',

':start :selected_part "/Sil_',N_Tr:1,'.',7:1,'" :edge_3d :by_vertex_3d ');

Vint(N_Tr,2,3,N_Razb[N_Act]);

fixX2:=fixX; fixY2:=fixY; fixZ2:=fixZ;

writeln(ff1,':select_done ');

Vint(N_Tr,2,3,N_Razb[N_Act]);

writeln(ff1,':accept )');

writeln(ff1,'(modify_bspline :curve :start :selected_part "/Sil_',N_Tr:1,'.8" ',

':all_3d :select_done ',

':insert_point ',fixX1:8:5,',',

fixY1:1:5,',',

fixZ1:1:5,' ',

(fixX1+fixX2)/2:8:5,',',

(fixY1+fixY2)/2:1:5,',',

(fixZ1+fixZ2)/2:1:5,' ');

writeln(ff1,')');

end;

end;

end;

begin

for i:=1 to 10 do

Empt[i]:=0;

AssignFile(ff1,Path+'LSP\Sil.lsp');

Append(ff1);

N_Spl:=0;

writeln(ff1,'(position_pa :part_assembly :start "/a1/Krug" :select_done ',

':translate :x ',dX:8:5,')');

writeln(ff1,'(position_pa :part_assembly :start "/a1/Krug" :select_done ',

':translate :y ',dY:8:5,')');

writeln(ff1,'(position_pa :part_assembly :start "/a1/Krug" :select_done ',

':translate :z ',dZ:8:5,')');

{ if N_Tr=N_Sech[N_Act] then

writeln(ff1,'(position_pa :part_assembly :start "/a1/Krug.1" :select_done ',

':rotate :axis :x :rotation_angle ',-fiA/pi*180:8:5,' :done :translate :x ',

-dX:8:5,')');

}

{ if N_Tr=N_Sech[N_Act] then

begin

writeln(ff1,'(create_multiple_pa :copy :source "/a1/surf1" :owner "/" )');

writeln(ff1,'(create_multiple_pa :copy :source "/a1/surf2" :owner "/" )');

writeln(ff1,'(create_multiple_pa :copy :source "/a1/surf3" :owner "/" )');

end; }

Create_Bspline(N_Tr,1,1,1);

Create_Bspline(N_Tr,2,2,1);

Create_Bspline(N_Tr,3,3,1);

Create_Bspline(N_Tr,4,1,3);

for i:=1 to N_Spl do

writeln(ff1,'(position_pa :part_assembly :start "/Sil_',N_Tr:1,'.',i:1,'" ',

':select_done ',

':rotate :axis :x :rotation_angle ',(fiAmax-fiA)/pi*180:8:5,')');

if N_Tr<N_Sech[N_Act] then

begin

// writeln(ff1,'(position_pa :part_assembly :start "/a1/Krug" :select_done ',

// ':rotate :axis :x :rotation_angle ',fiA/pi*180:8:5,')');

writeln(ff1,'(position_pa :part_assembly :start "/a1/Krug" :select_done ',

':translate :x ',-dX:8:5,')');

writeln(ff1,'(position_pa :part_assembly :start "/a1/Krug" :select_done ',

':translate :y ',-dY:8:5,')');

writeln(ff1,'(position_pa :part_assembly :start "/a1/Krug" :select_done ',

':translate :z ',-dZ:8:5,')');

end;

//W_Str1('N_spl='+w_i(N_Spl,1));

Flush(ff1);

CloseFile(ff1);

end;

Приложение Б

Параметры проекта Delphi:

-$A8

-$B-

-$C+

-$D+

-$E-

-$F-

-$G+

-$H+

-$I+

-$J-

-$K-

-$L+

-$M-

-$N+

-$O+

-$P+

-$Q-

-$R-

-$S-

-$T-

-$U-

-$V+

-$W-

-$X+

-$YD

-$Z1

-cg

-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;

-H+

-W+

-M

-$M16384,1048576

-K$00400000

-LE"c:\program files\borland\delphi7\Projects\Bpl"

-LN"c:\program files\borland\delphi7\Projects\Bpl"

-w-UNSAFE_TYPE

-w-UNSAFE_CODE

-w-UNSAFE_CAST

[FileVersion]

Version=7.0 //версия файла

[Compiler]

A=8 //начальные параметры

B=0

C=1

D=1

E=0

F=0

G=1

H=1

I=1

J=0

K=0

L=1

M=0

N=1

O=1

P=1

Q=1

R=1

S=0

T=0

U=0

V=1

W=1

X=1

Y=1

Z=1

ShowHints=1

ShowWarnings=1

UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;

NamespacePrefix=

SymbolDeprecated=1

SymbolLibrary=1

SymbolPlatform=1

UnitLibrary=1

UnitPlatform=1

UnitDeprecated=1

HResultCompat=1

HidingMember=1

HiddenVirtual=1

Garbage=1

BoundsError=1

ZeroNilCompat=1

StringConstTruncated=1

ForLoopVarVarPar=1

TypedConstVarPar=1

AsgToTypedConst=1

CaseLabelRange=1

ForVariable=1

ConstructingAbstract=1

ComparisonFalse=1

ComparisonTrue=1

ComparingSignedUnsigned=1

CombiningSignedUnsigned=1

UnsupportedConstruct=1

FileOpen=1

FileOpenUnitSrc=1

BadGlobalSymbol=1

DuplicateConstructorDestructor=1

InvalidDirective=1

PackageNoLink=1

PackageThreadVar=1

ImplicitImport=1

HPPEMITIgnored=1

NoRetVal=1

UseBeforeDef=1

ForLoopVarUndef=1

UnitNameMismatch=1

NoCFGFileFound=1

MessageDirective=1

ImplicitVariants=1

UnicodeToLocale=1

LocaleToUnicode=1

ImagebaseMultiple=1

SuspiciousTypecast=1

PrivatePropAccessor=1

UnsafeType=1

UnsafeCode=1

UnsafeCast=1

[Linker]

MapFile=0

OutputObjs=0

ConsoleApp=1

DebugInfo=0

RemoteSymbols=0

MinStackSize=16384

MaxStackSize=1048576

ImageBase=4194304

ExeDescription=

[Directories] //параметры проекта

OutputDir=

UnitOutputDir=

PackageDLLOutputDir=

PackageDCPOutputDir=

SearchPath=

Packages=vcl;rtl;dbrtl;adortl;vcldb;vclx;bdertl;vcldbx;ibxpress;dsnap;cds;bdecds;qrpt;teeui;teedb;tee;dss;teeqr;visualclx;visualdbclx;dsnapcrba;dsnapcon;VclSmp;vclshlctrls;inetdb;inet;nmfast;vclie;dbexpress;dbxcds;indy;dclOffice2k

Conditionals=

DebugSourceDirs=

UsePackages=0

[Parameters]

RunParams=

HostApplication=

Launcher=

UseLauncher=0

DebugCWD=

[Language]

ActiveLang=

ProjectLang=

RootDir=

[Version Info]

IncludeVerInfo=0

AutoIncBuild=0

MajorVer=1

MinorVer=0

Release=0

Build=0

Debug=0

PreRelease=0

Special=0

Private=0

DLL=0

Locale=1049

CodePage=1251

[Version Info Keys] //информация о проекте

CompanyName=

FileDescription=

FileVersion=1.0.0.0

InternalName=

LegalCopyright=

LegalTrademarks=

OriginalFilename=

ProductName=

ProductVersion=1.0.0.0

Comments=

[HistoryLists\hlUnitAliases]

Count=1

Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;

Приложение B

Текст настроечного файла программного модуля:

3

2

5.260 5.000 105.000 1.000 1.250

0.700 0.900 7.410 0.350 120.000

10.000 25.000 0.900 30.000 0.200

85.000 1.300 50.000 71.000 0.060 3

3

99.86600 9.70600 90.00000

0.45000 0.20000 50.78000

-58.71300 53.29000 -196.78000 -180.36000

125.06600 4.05600 90.00000

1.95000 1.95000 50.73000

-71.26300 65.89000 -147.21000 -136.44000

100.16600 9.97300 90.00000

0.10000 1.10000 50.69000

-58.77300 53.44000 -105.12700 -88.44000

130.00000 88.00000 6.71400

6

Канавка

0.000 0.00000 40.00000 53.50000 1 1 0.00000 0.71966 0.85300 -0.2000 99999999.000 0 2.000 2 0.000 0 1 1 1 1 20 0.0100 1

0.000 0.000 0.000 0.000 0.000 0.000

Затылок

0.000 -0.01719 40.00000 47.00000 1 1 0.00000 5.14988 -4.85300 -1.0000 999999.000 0 1.000 2 0.000 0 1 1 1 1 20 0.0100 1

0.000 0.000 0.000 421.303 0.000 0.000

1 задний угол

58.525 0.00000 80.00000 80.00000 3 2 0.25000 -30.00000 0.00000 0.5000 999999.000 0 2.000 2 0.000 0 1 1 1 1 20 0.0100 1

0.000 0.000 0.000 -70.110 0.000 0.000

2 задний угол

51.710 0.00000 80.00000 80.00000 3 2 -0.65000 -30.00000 -1.26552 0.5000 999999.000 0 2.000 2 0.000 0 0 1 1 1 20 0.0100 1

0.000 0.000 0.000 -46.533 0.000 0.000

Подточка

30.000 40.00000 25.00000 24.00000 2 1 1.00000 -0.80000 -0.24500 -9.0000 999999.000 0 2.000 2 0.000 0 0 1 1 0 20 0.0100 1

0.000 0.000 0.000 -45.000 0.000 0.000

Канавка под СОЖ

14.767 79.65473 25.00000 20.00000 3 2 -3.21700 2.11332 -1.94988 0.5000 999999.000 0 2.000 2 0.000 0 0 0 0 0 20 0.0100 1

0.000 0.000 0.000 0.000 0.000 0.000

4

0.000 0.000 90.000 0.000

10.520 0.000 -0.016 0.000

10.477 77.000 45.246 0.000

12.000 77.755 0.000 0.000

12.000 130.000 0.000 0.000

39.000 19.000 59.000 40.000

1 1.900 6.000 45.000 1.000 15.000 45.000

1

1

1

1

0

0

0

0

0

0

0

0

0.000

180.000

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0.000 0.000 0.000 -15.000 0.000 0.000

0.000 0.000 0.000 -7.500 0.000 0.000

0 0 0 20 0 0

2

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0

0.000 0.000 0.000 421.303 0.000 0.000

0 0 0 20 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0.000 0.000 0.000 -50.512 0.000 0.000

0.000 -0.240 0.000 -25.256 0.000 0.000

0 20 0 20 0 0

7

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0

0.000 0.000 0.000 -70.110 0.000 0.000

0 0 0 20 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0.000 0.000 0.000 0.000 0.000 0.000

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

1

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0

0.000 0.000 0.000 -46.533 0.000 0.000

0 0 0 20 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0.000 0.000 0.000 0.000 0.000 0.000

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

1

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0

0.000 0.000 0.000 -45.000 0.000 0.000

0 0 0 20 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0.000 0.000 0.000 0.000 0.000 0.000

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

1

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0.000 0.000 0.000 0.000 0.000 0.000

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

1

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0

0.000 0.000 0.000 0.000 0.000 0.000

0 20 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 20 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 20 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 20 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 20 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 20 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

0.000 0.000 0.000 0.000 0.000 0.000

0 0 0 0 0 0

1 1 1 1

15.00000 2

0.500 2.500 2.475 2.550 30.000

0.000 0.00000

0.100 0.100 7.500 0.500

1 2 2 1

50.51161 7

0.500 2.500 2.475 2.550 30.000

0.000 0.00000

0.700 0.900 7.419 0.350

1 3 3 1

0.00000 1

0.000 0.000 5.260 0.000 30.000

0.000 10.00000

0.100 0.100 7.500 0.500

1 3 3 1

0.00000 1

0.500 2.500 2.475 2.550 30.000

4.000 25.00000

0.100 0.100 7.500 0.500

0 0 5 1

0.00000 1

0.500 2.500 2.475 2.550 30.000

0.000 0.00000

0.100 0.100 7.500 0.500

0 0 6 1

0.00000 1

0.500 2.500 2.475 2.550 30.000

0.000 0.00000

0.100 0.100 7.500 0.500

Приложение Г

Текст файлов связи с пакетом 3D моделирования:

(create_workplane :new)

(bspline_int

0.00000,-49.48300 :tangent -90.00000 //точки сплайна

0.00139,-49.51831 :tangent -85.50000

0.00554,-49.55340 :tangent -81.00000

0.01243,-49.58805 :tangent -76.50000

0.02202,-49.62206 :tangent -72.00000

0.03425,-49.65521 :tangent -67.50000

0.04905,-49.68730 :tangent -63.00000

0.06631,-49.71812 :tangent -58.50000

0.08594,-49.74750 :tangent -54.00000

0.10782,-49.77525 :tangent -49.50000

0.13180,-49.80120 :tangent -45.00000

0.15775,-49.82518 :tangent -40.50000

0.18550,-49.84706 :tangent -36.00000

0.21488,-49.86669 :tangent -31.50000

0.24570,-49.88395 :tangent -27.00000

0.27779,-49.89875 :tangent -22.50000

0.31094,-49.91098 :tangent -18.00000

0.34495,-49.92057 :tangent -13.50000

0.37960,-49.92746 :tangent -9.00000

0.41469,-49.93161 :tangent -4.50000

0.45000,-49.93300 :tangent 0.00000

0.90280,-49.93300 :tangent 0.00000

1.35560,-49.93300 :tangent 0.00000

1.80840,-49.93300 :tangent 0.00000

2.26120,-49.93300 :tangent 0.00000

2.71400,-49.93300 :tangent 0.00000

3.16680,-49.93300 :tangent 0.00000

3.61960,-49.93300 :tangent 0.00000

4.07240,-49.93300 :tangent 0.00000

4.52520,-49.93300 :tangent 0.00000

4.97800,-49.93300 :tangent 0.00000

5.43080,-49.93300 :tangent 0.00000

5.88360,-49.93300 :tangent 0.00000

6.33640,-49.93300 :tangent 0.00000

6.78920,-49.93300 :tangent 0.00000

7.24200,-49.93300 :tangent 0.00000

7.69480,-49.93300 :tangent 0.00000

8.14760,-49.93300 :tangent 0.00000

8.60040,-49.93300 :tangent 0.00000

9.05320,-49.93300 :tangent 0.00000

9.50600,-49.93300 :tangent 0.00000

9.52169,-49.93238 :tangent 4.50000

9.53729,-49.93054 :tangent 9.00000

9.55269,-49.92747 :tangent 13.50000

9.56780,-49.92321 :tangent 18.00000

9.58254,-49.91778 :tangent 22.50000

9.59680,-49.91120 :tangent 27.00000

9.61050,-49.90353 :tangent 31.50000

9.62356,-49.89480 :tangent 36.00000

9.63589,-49.88508 :tangent 40.50000

9.64742,-49.87442 :tangent 45.00000

9.65808,-49.86289 :tangent 49.50000

9.66780,-49.85056 :tangent 54.00000

9.67653,-49.83750 :tangent 58.50000

9.68420,-49.82380 :tangent 63.00000

9.69078,-49.80954 :tangent 67.50000

9.69621,-49.79480 :tangent 72.00000

9.70047,-49.77969 :tangent 76.50000

9.70354,-49.76429 :tangent 81.00000

9.70538,-49.74869 :tangent 85.50000

9.70600,-49.73300 :tangent 90.00000

)

(polygon 0.00000,-49.48300 0.00000,0.00000 9.70600,0.00000 9.70600,-49.73300)

(rotate_2d :select :start :all_2d :select_done :angle -90.0)

( turn :sel_part "/Krug" :keep_wp :yes :keep_profile :no :axis :v :rotation_angle 360.0)

(define_feature :selection :start :selected_part "/Krug" :spline_sf :all_3d :select_done)

(create_assembly)

(change_pa_owner :new_owner "/a1" :parts_assemblies :start "/Krug" :select_done)

(position_pa :part_assembly :start "/a1" :select_done :rotate :axis :x :rotation_angle -90.0 :done :translate :y 50.65266000 :rotate :axis :y :rotation_angle -0.00000000)

(position_pa :part_assembly :start "/a1" :select_done :translate :x 40.00000000)

(position_pa :part_assembly :start "/a1" :select_done :translate :z 0.85300000)

(position_pa :part_assembly "/a1/Krug" :rotate :axis :two_pta 40.00000000,0.71966000,0.85300000 40.00000000,50.65266000,0.85300000 :rotation_angle -0.20000000)

(create_multiple_pa :copy :source "/a1/Krug")

(remove_from_vp_drawlist "vport1" :with-wp "/a1/Krug" )

(remove_from_vp_drawlist "vport1" :with-wp "/a1/Krug.1" )

( delete_3d "/w1")

Приложение Д

Текст управляющей программы ЧПУ:

%_N_CIP6\Emul\Bdd\9013_MPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

DEF INT OP1,OP2,OP3,OP4,OP5,OP6

OP1=1

OP2=1

OP3=1

OP4=1

OP5=1

OP6=1

IF OP1==1

Op_1

ENDIF

IF OP2==1

Op_2

ENDIF

IF OP3==1

Op_3

ENDIF

IF OP4==1

Op_4

ENDIF

IF OP5==1

Op_5

ENDIF

IF OP6==1

Op_6

ENDIF

M10 M19

M02

%_N_NACH_UST_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

G01 G90 Y176.080 F5000 G09

G01 G90 A=0 F5000 G09

G01 G90 B=0 F5000 G09

G01 G90 Z=0 F5000 G09

G01 G90 X-496.007 F5000 G09

G01 G90 C=0 F5000 G09

M17

%_N_Op_1_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

;======= Канавка =======

EXTERN GLAV_DVIG_Op1(INT,REAL)

EXTERN OTVOD_Op1(INT)

EXTERN PRIPUSK_Op1(INT,INT)

EXTERN CYCLOBR_Op1(INT)

EXTERN VIX_Op1

DEF REAL X_KOR,Z_KOR,B_KOR,A_KOR,Y_KOR,C_KOR

DEF REAL NZ_FI[3],FPR[4]

DEF INT NZ_ACT[3]

DEF INT I_1,I_2

R306=0

MSG(" ")

NACH_UST

Коррекция:

X_KOR=0;

Z_KOR=0;

B_KOR=0;

A_KOR=0;

Y_KOR=0;

C_KOR=0;

Подвод:

DISPOUT_Op1

G01 G91 X= 405.225+X_KOR G09 F=5000

DISPOUT_Op1

G01 G91 Z=-193.959+Z_KOR G09 F=5000

DISPOUT_Op1

G01 G91 B= 0.200+B_KOR G09 F=5000

DISPOUT_Op1

G01 G91 Y=-125.427+Y_KOR G09 F=5000

DISPOUT_Op1

G01 G91 A= -0.000+A_KOR G09 F=5000

DISPOUT_Op1

G01 G91 C= 0.000+C_KOR G09 F=5000

Перемещения гл. движения:

R298= 93.499;X

R299= 0.000;Y

R300= -0.326;Z

R301= 0.000;A

; ПОЛОЖЕНИЕ ЗУБЬЕВ

; У Г О Л Акт.зуб

NZ_FI[1]= 0.000 NZ_ACT[1]=1

NZ_FI[2]= 180.000 NZ_ACT[2]=1

; П Р И П У С К И

; 1проход Подача 2проход Подача 3проход Подача

R213=0.000 R231= 20 R219=0.000 R237= 0 R225=0.000 R243= 0 ;Y

FPR[1]=R231

FPR[2]=R237

FPR[3]=R243

; ЦИКЛИЧЕСКАЯ ОБРАБОТКА

; СТАРТ Экстрем. ФИНИШ Подача

R264= 0.000 R270= -7.500 R276= -15.000 R282= 20 ;A

R260=2;Кол-во циклов обработки

; О Б Р А Б О Т К А

R306=0

FOR I_1=1 TO 3

R307=0

IF FPR[I_1]>0

PRIPUSK_Op1(I_1,1)

FOR I_2=1 TO 2

DISPOUT_Op1

G01 G91 A=NZ_FI[I_2] F=5000

IF NZ_ACT[I_2]==1

R308=I_2

CYCLOBR_Op1(R260,FPR[I_1])

ENDIF

ENDFOR

DISPOUT_Op1

G01 G91 A=360-NZ_FI[2] F=5000

PRIPUSK_Op1(I_1,-1)

ENDIF

ENDFOR

M17

%_N_GLAV_DVIG_Op1_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

PROC GLAV_DVIG_Op1(INT NAPR,REAL FGLDV)

DISPOUT_OP1

G01 G91 X=NAPR*R298 Z=NAPR*R300 F=FGLDV

M17

%_N_PRIPUSK_Op1_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

PROC PRIPUSK_Op1(INT NUM_PR,INT NAPR_PR, REAL FPR)

IF (NUM_PR==1) AND (FPR>0)

R307=NUM_PR

DISPOUT_Op1

G01 G91 Y=NAPR_PR*R213 F=200

ENDIF

IF (NUM_PR==2) AND (FPR>0)

R307=NUM_PR

DISPOUT_Op1

G01 G91 Y=NAPR_PR*R219 F=200

ENDIF

IF (NUM_PR==3) AND (FPR>0)

R307=NUM_PR

DISPOUT_Op1

G01 G91 Y=NAPR_PR*R225 F=200

ENDIF

M17

%_N_OTVOD_Op1_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

PROC OTVOD_Op1(INT NAPR_OTV)

M17

%_N_CYCLOBR_Op1_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

PROC CYCLOBR_Op1(INT N_CYCL,REAL FPR)

EXTERN GLAV_DVIG_Op1(INT,REAL)

EXTERN OTVOD_Op1(INT)

DEF INT I_1,I_2

DEF REAL STEP1,STEP2

FOR I_1=1 TO N_CYCL

R309=I_1

IF R282>0

IF N_CYCL==2

G01 G91 A=(I_1-1)*(R276-R264)

ENDIF

IF N_CYCL>2

STEP1=2*(R270-R264)/(N_CYCL-1)

STEP2=2*(R276-R270)/(N_CYCL-1)

I_2=ROUND((N_CYCL-1)/2)

IF I_1<=I_2

IF I_1>1

G01 G91 A=STEP1

ENDIF

ENDIF

IF I_1>I_2

G01 G91 A=STEP2

ENDIF

ENDIF

ENDIF

GLAV_DVIG_Op1(1,FPR)

OTVOD_Op1(1)

GLAV_DVIG_Op1(-1,500)

OTVOD_Op1(-1)

ENDFOR

IF R282>0

DISPOUT_OP1

G01 G91 A=-(R276-R264) F=R282

ENDIF

M17

%_N_DISPOUT_Op1_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

R306=R306+1

MSG (" Поз. N " <<R306<< " Прип.N " <<R307<< " Зуб.N " <<R308<< "Цикл.N " <<R309)

M17

%_N_Op_2_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

;======= Затылок =======

EXTERN GLAV_DVIG_Op2(INT,REAL)

EXTERN OTVOD_Op2(INT)

EXTERN PRIPUSK_Op2(INT,INT)

EXTERN CYCLOBR_Op2(INT)

EXTERN VIX_Op2

DEF REAL X_KOR,Z_KOR,B_KOR,A_KOR,Y_KOR,C_KOR

DEF REAL NZ_FI[3],FPR[4]

DEF INT NZ_ACT[3]

DEF INT I_1,I_2

R306=0

MSG(" ")

NACH_UST

Коррекция:

X_KOR=0;

Z_KOR=0;

B_KOR=0;

A_KOR=0;

Y_KOR=0;

C_KOR=0;

Подвод:

DISPOUT_Op2

G01 G91 X= 405.341+X_KOR G09 F=5000

DISPOUT_Op2

G01 G91 Z=-186.986+Z_KOR G09 F=5000

DISPOUT_Op2

G01 G91 B= 1.000+B_KOR G09 F=5000

DISPOUT_Op2

G01 G91 Y=-120.985+Y_KOR G09 F=5000

DISPOUT_Op2

G01 G91 A= 0.000+A_KOR G09 F=5000

DISPOUT_Op2

G01 G91 C= 0.000+C_KOR G09 F=5000

Перемещения гл. движения:

R298= 86.987;X

R299= -0.026;Y

R300= -1.518;Z

R301= 0.000;A

; ПОЛОЖЕНИЕ ЗУБЬЕВ

; У Г О Л Акт.зуб

NZ_FI[1]= 0.000 NZ_ACT[1]=1

NZ_FI[2]= 180.000 NZ_ACT[2]=1

; ДОПОЛНИТЕЛЬНЫЕ СМЕЩЕНИЯ

; Смещение Подача

R203= 421.303 R209= 20 ;A

; П Р И П У С К И

; 1проход Подача 2проход Подача 3проход Подача

R213=0.000 R231= 20 R219=0.000 R237= 0 R225=0.000 R243= 0 ;Y

FPR[1]=R231

FPR[2]=R237

FPR[3]=R243

; ЦИКЛИЧЕСКАЯ ОБРАБОТКА

; СТАРТ Экстрем. ФИНИШ Подача

R262= 0.000 R268= -0.240 R274= 0.000 R280= 20 ;Y

R264= 0.000 R270= -25.256 R276= -50.512 R282= 20 ;A

R260=7;Кол-во циклов обработки

; О Б Р А Б О Т К А

R306=0

DOPSM_Op2

FOR I_1=1 TO 3

R307=0

IF FPR[I_1]>0

PRIPUSK_Op2(I_1,1)

FOR I_2=1 TO 2

DISPOUT_Op2

G01 G91 A=NZ_FI[I_2] F=5000

IF NZ_ACT[I_2]==1

R308=I_2

CYCLOBR_Op2(R260,FPR[I_1])

ENDIF

ENDFOR

DISPOUT_Op2

G01 G91 A=360-NZ_FI[2] F=5000

PRIPUSK_Op2(I_1,-1)

ENDIF

ENDFOR

M17

%_N_GLAV_DVIG_Op2_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

PROC GLAV_DVIG_Op2(INT NAPR,REAL FGLDV)

DISPOUT_OP2

G01 G91 X=NAPR*R298 Y=NAPR*R299 Z=NAPR*R300 F=FGLDV

M17

%_N_DOPSM_Op2_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

PROC DOPSM_Op2

IF R209>0

DISPOUT_Op2

G01 G91 A=R203 F=R209

ENDIF

M17

%_N_PRIPUSK_Op2_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

PROC PRIPUSK_Op2(INT NUM_PR,INT NAPR_PR, REAL FPR)

IF (NUM_PR==1) AND (FPR>0)

R307=NUM_PR

DISPOUT_Op2

G01 G91 Y=NAPR_PR*R213 F=200

ENDIF

IF (NUM_PR==2) AND (FPR>0)

R307=NUM_PR

DISPOUT_Op2

G01 G91 Y=NAPR_PR*R219 F=200

ENDIF

IF (NUM_PR==3) AND (FPR>0)

R307=NUM_PR

DISPOUT_Op2

G01 G91 Y=NAPR_PR*R225 F=200

ENDIF

M17

%_N_OTVOD_Op2_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

PROC OTVOD_Op2(INT NAPR_OTV)

M17

%_N_CYCLOBR_Op2_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

PROC CYCLOBR_Op2(INT N_CYCL,REAL FPR)

EXTERN GLAV_DVIG_Op2(INT,REAL)

EXTERN OTVOD_Op2(INT)

DEF INT I_1,I_2

DEF REAL STEP1,STEP2

FOR I_1=1 TO N_CYCL

R309=I_1

IF R280>0

IF N_CYCL==2

G01 G91 Y=(I_1-1)*(R274-R262)

ENDIF

IF N_CYCL>2

STEP1=2*(R268-R262)/(N_CYCL-1)

STEP2=2*(R274-R268)/(N_CYCL-1)

I_2=ROUND((N_CYCL-1)/2)

IF I_1<=I_2

IF I_1>1

G01 G91 Y=STEP1

ENDIF

ENDIF

IF I_1>I_2

G01 G91 Y=STEP2

ENDIF

ENDIF

ENDIF

IF R282>0

IF N_CYCL==2

G01 G91 A=(I_1-1)*(R276-R264)

ENDIF

IF N_CYCL>2

STEP1=2*(R270-R264)/(N_CYCL-1)

STEP2=2*(R276-R270)/(N_CYCL-1)

I_2=ROUND((N_CYCL-1)/2)

IF I_1<=I_2

IF I_1>1

G01 G91 A=STEP1

ENDIF

ENDIF

IF I_1>I_2

G01 G91 A=STEP2

ENDIF

ENDIF

ENDIF

GLAV_DVIG_Op2(1,FPR)

OTVOD_Op2(1)

GLAV_DVIG_Op2(-1,500)

OTVOD_Op2(-1)

ENDFOR

IF R280>0

DISPOUT_OP2

G01 G91 Y=-(R274-R262) F=R280

ENDIF

IF R282>0

DISPOUT_OP2

G01 G91 A=-(R276-R264) F=R282

ENDIF

M17

%_N_DISPOUT_Op2_SPF

;$PATH=/_N_WKS_DIR/_N_CIP6\Emul\Bdd\9013_WPD

R306=R306+1

MSG (" Поз. N " <<R306<< " Прип.N " <<R307<< " Зуб.N " <<R308<< "Цикл.N " <<R309)

M17

Страницы: 1, 2, 3, 4, 5


© 2010 BANKS OF РЕФЕРАТ