Добавил:
ivanov666
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Оптимизация режимов резания при токарной обработке металлов. Монография
.pdf
if ComboBox5.Text='ɇɟɩɪɟɪɵɜɧɨɟ ɪɟɡɚɧɢɟ' then begin
case ComboBox6.ItemIndex of
0: rezh:= 'Ɍ30Ʉ4';
1: rezh:= 'Ɍ15Ʉ6';
2: rezh:= 'Ɍ15Ʉ6';
end;
end;
end;
end;
if RadioButton2.Checked then begin
if ComboBox1.Text='ɑɟɪɧɨɜɚɹ ɨɛɪɚɛɨɬɤɚ' then begin
if ComboBox5.Text='ɉɪɟɪɵɜɢɫɬɨɟ ɪɟɡɚɧɢɟ (ɫ ɭɞɚɪɨɦ)' then begin
case ComboBox6.ItemIndex of
0: rezh:= 'ȼɄ6';
1: rezh:= 'ȼɄ6';
2: rezh:= 'ȼɄ8';
end;
end;
if ComboBox5.Text='ɇɟɩɪɟɪɵɜɧɨɟ ɪɟɡɚɧɢɟ' then begin
case ComboBox6.ItemIndex of
0: rezh:= 'ȼɄ6';
1: rezh:= 'ȼɄ6';
2: rezh:= 'ȼɄ8';
end;
end;
end;
if ComboBox1.Text='ɑɢɫɬɨɜɚɹ ɨɛɪɚɛɨɬɤɚ' then begin
if ComboBox5.Text='ɉɪɟɪɵɜɢɫɬɨɟ ɪɟɡɚɧɢɟ (ɫ ɭɞɚɪɨɦ)' then begin
case ComboBox6.ItemIndex of
0: rezh:= 'ȼɄ6';
61

1: rezh:= 'ȼɄ6';
2: rezh:= 'ȼɄ8';
end;
end;
if ComboBox5.Text='ɇɟɩɪɟɪɵɜɧɨɟ ɪɟɡɚɧɢɟ' then begin
case ComboBox6.ItemIndex of
0: rezh:= 'ȼɄ4';
1: rezh:= 'ȼɄ3';
2: rezh:= 'ȼɄ6';
end;
end;
end;
end;
if RadioButton3.Checked then begin
if ComboBox1.Text='ɑɟɪɧɨɜɚɹ ɨɛɪɚɛɨɬɤɚ' then begin
if ComboBox5.Text='ɉɪɟɪɵɜɢɫɬɨɟ ɪɟɡɚɧɢɟ (ɫ ɭɞɚɪɨɦ)' then begin
case ComboBox6.ItemIndex of
0: rezh:= 'ȼɄ6';
1: rezh:= 'ȼɄ6';
2: rezh:= 'Ɋ6Ɇ5';
end;
end;
if ComboBox5.Text='ɇɟɩɪɟɪɵɜɧɨɟ ɪɟɡɚɧɢɟ' then
rezh:= 'ȼɄ6';
end;
if ComboBox1.Text='ɑɢɫɬɨɜɚɹ ɨɛɪɚɛɨɬɤɚ' then begin
if ComboBox5.Text='ɉɪɟɪɵɜɢɫɬɨɟ ɪɟɡɚɧɢɟ (ɫ ɭɞɚɪɨɦ)' then begin
case ComboBox6.ItemIndex of
0: rezh:= 'ȼɄ6';
1: rezh:= 'ȼɄ6';
62

2: rezh:= 'ȼɄ6';
end;
end;
if ComboBox5.Text='ɇɟɩɪɟɪɵɜɧɨɟ ɪɟɡɚɧɢɟ' then begin
case ComboBox6.ItemIndex of
0: rezh:= 'ȼɄ4';
1: rezh:= 'ȼɄ4';
2: rezh:= 'ȼɄ4';
end;
end;
end;
end;
rh:=Rezhchast.Lookup('Ɇɚɪɤɚ',rezh,'Ʉɨɷɮɮɢɰɢɟɧɬ_ɬɟɩɥɨɩɪɨɜɨɞɧɨɫɬɢ');
vh:=Rezhchast.Lookup('Ɇɚɪɤɚ',rezh,'ȼɢɞ ɦɚɬɟɪɢɚɥɚ');
end;
procedure TDann.Button2Click(Sender: TObject);
var
h: hwnd;
l, p:integer;
str1: string;
sechenie:variant;
begin
str1:='ɯ';
rezec:=InputBox('ȼɵɛɨɪɤɚ ɢɧɮɨɪɦɚɰɢɢ ɢɡ ɛɚɡɵ ɞɚɧɧɵɯ','ɍɤɚɠɢɬɟ ɨɛɨɡɧɚɱɟ-
ɧɢɟ ɪɟɡɰɚ (ɧɚɩɪɢɦɟɪ 2100-0552) ɢ ɳɟɥɤɧɢɬɟ ɧɚ OK','');
if rezh = '' then
ShowMessage('ȼɵɛɟɪɢɬɟ ɦɚɬɟɪɢɚɥ ɪɟɠɭɳɟɣ ɱɚɫɬɢ');
if rezh= 'Ɋ6Ɇ5' then
if rezec <> ''
63

then begin
fi:=ADOTable2.Lookup('Ɉɛɨɡɧɚɱɟɧɢɟ',rezec,'Ƚɥɚɜɧɵɣ ɭɝɨɥ ɜ ɩɥɚɧɟ');
fi1:=ADOTable2.Lookup('Ɉɛɨɡɧɚɱɟɧɢɟ',rezec,'ȼɫɩɨɦɨɝɚɬɟɥɶɧɵɣ ɭɝɨɥ ɜ ɩɥɚɧɟ');
epsilon:=ADOTable2.Lookup('Ɉɛɨɡɧɚɱɟɧɢɟ',rezec,'ɍɝɨɥ ɩɪɢ ɜɟɪɲɢɧɟ ɜ ɩɥɚɧɟ');
r:=ADOTable2.Lookup('Ɉɛɨɡɧɚɱɟɧɢɟ',rezec,'Ɋɚɞɢɭɫ ɩɪɢ ɜɟɪɲɢɧɟ');
sechenie:=ADOTable2.Lookup('Ɉɛɨɡɧɚɱɟɧɢɟ',rezec,'ɋɟɱɟɧɢɟ ɪɟɡɰɚ H x B, ɦɦ');
end;
if rezh<> 'Ɋ6Ɇ5' then
if rezec <> ''
then begin
fi:=Tverd.Lookup('Ɉɛɨɡɧɚɱɟɧɢɟ',rezec,'Ƚɥɚɜɧɵɣ ɭɝɨɥ ɜ ɩɥɚɧɟ');
fi1:=Tverd.Lookup('Ɉɛɨɡɧɚɱɟɧɢɟ',rezec,'ȼɫɩɨɦɨɝɚɬɟɥɶɧɵɣ ɭɝɨɥ ɜ ɩɥɚɧɟ');
epsilon:=Tverd.Lookup('Ɉɛɨɡɧɚɱɟɧɢɟ',rezec,'ɍɝɨɥ ɩɪɢ ɜɟɪɲɢɧɟ ɜ ɩɥɚɧɟ');
r:=Tverd.Lookup('Ɉɛɨɡɧɚɱɟɧɢɟ',rezec,'
Ɋɚɞɢɭɫ ɩɪɢ ɜɟɪɲɢɧɟ');
sechenie:=Tverd.Lookup('Ɉɛɨɡɧɚɱɟɧɢɟ',rezec,'ɋɟɱɟɧɢɟ ɪɟɡɰɚ H x B, ɦɦ');
end;
if (fi = Null) or (fi1 = Null) or (epsilon = Null) or (r = Null) then begin
ShowMessage('Ⱦɚɧɧɨɝɨ ɪɟɡɰɚ ɧɟɬ ɜ ɛɚɡɟ ɞɚɧɧɵɯ. Ɂɚɞɚɣɬɟ ɟɝɨ ɯɚɪɚɤɬɟɪɢɫɬɢ-
ɤɢ. ɂɥɢ ɪɟɡɟɰ ɧɟ ɫɨɨɬɜɟɬɫɬɜɭɟɬ ɦɚɬɟɪɢɚɥɭ ɪɟɠɭɳɟɣ ɱɚɫɬɢ');
ShellExecute(h,'open','Baza.accdb',nil,nil,SW_SHOW);
end
else begin
P:=Pos(Str1, sechenie);
L:=Length(sechenie);
sechB:=Copy(sechenie,1,P-1);
sechH:=Copy(sechenie,P+1,l);
end;
end;
64

procedure TDann.Button4Click(Sender: TObject);
begin
if RadioButton1.Checked then begin
sigma:=InputBox('','ɍɤɚɠɢɬɟ ɜɪɟɦɟɧɧɨɟ ɫɨɩɪɨɬɢɜɥɟɧɢɟ ɨɛɪɚɛɚɬɵɜɚɟɦɨɝɨ ɦɚ-
ɬɟɪɢɚɥɚ ɜ ɆɉȺ ɢ ɳɟɥɤɧɢɬɟ ɧɚ OK','');
if StrToInT(sigma)>800 then
gamma:=12
else
gamma:=16;
end;
if RadioButton2.Checked then begin
sigma:=InputBox('','ɍɤɚɠɢɬɟ ɬɜɟɪɞɨɫɬɶ ɩɨ Ȼɪɢɧɟɥɸ ɨɛɪɚɛɚɬɵɜɚɟɦɨɝɨ ɦɚɬɟ-
ɪɢɚɥɚ ɢ ɳɟɥɤɧɢɬɟ ɧɚ OK','');
if StrToInT(sigma)>220 then
gamma:=12
else
gamma:=16;
end;
if RadioButton3.Checked then
gamma:=12;
if RadioButton4.Checked then
ShowMessage('ɍɤɚɠɢɬɟ ɤɚɬɟɝɨɪɢɸ ɦɚɬɟɪɢɚɥɚ');
alfa:=10;
betta:=90-(gamma+alfa);
end;
procedure TDann.Button14Click(Sender: TObject);
var
res: integer;
begin
65

hst:=InputBox('ȼɵɛɨɪɤɚ ɢɧɮɨɪɦɚɰɢɢ ɢɡ ɛɚɡɵ ɞɚɧɧɵɯ','ɍɤɚɠɢɬɟ ɦɨɞɟɥɶ ɫɬɚɧ-
ɤɚ ɢ ɳɟɥɤɧɢɬɟ ɧɚ OK','');
if hst <> ''
then begin
Nst:=Stanki.Lookup('Ɇɨɞɟɥɶ ɫɬɚɧɤɚ',hst,'Ɇɨɳɧɨɫɬɶ ɞɜɢɝɚɬɟɥɹ, ɤȼɌ');
kpd:=Stanki.Lookup('Ɇɨɞɟɥɶ ɫɬɚɧɤɚ',hst,'ɄɉȾ ɫɬɚɧɤɚ');
nmin:=Stanki.Lookup('Ɇɨɞɟɥɶ ɫɬɚɧɤɚ',hst,'Ɇɢɧɢɦɚɥɶɧɚɹ ɱɚɫɬɨɬɚ ɜɪɚɳɟɧɢɹ
ɲɩɢɧɞɟɥɹ, ɨɛ/ɦɢɧ');
nmax:=Stanki.Lookup('Ɇɨɞɟɥɶ ɫɬɚɧɤɚ',hst,'Ɇɚɤɫɢɦɚɥɶɧɚɹ ɱɚɫɬɨɬɚ ɜɪɚɳɟɧɢɹ
ɲɩɢɧɞɟɥɹ, ɨɛ/ɦɢɧ');
smin:=Stanki.Lookup('Ɇɨɞɟɥɶ ɫɬɚɧɤɚ',hst,'Ɇɢɧɢɦɚɥɶɧɚɹ ɩɪɨɞɨɥɶɧɚɹ ɩɨɞɚɱɚ,
ɦɦ/ɨɛ');
smax:=Stanki.Lookup('Ɇɨɞɟɥɶ ɫɬɚɧɤɚ
',hst,'Ɇɚɤɫɢɦɚɥɶɧɚɹ ɩɪɨɞɨɥɶɧɚɹ ɩɨɞɚɱɚ,
ɦɦ/ɨɛ');
end;
if (Nst = Null) or (kpd = Null) or (nmin = Null) or (nmax = Null) or (smin = Null)
or (smax = Null) then begin
ShowMessage('Ⱦɚɧɧɨɝɨ ɫɬɚɧɤɚ ɧɟɬ ɜ ɛɚɡɟ ɞɚɧɧɵɯ ɢɥɢ ɧɟ ɡɚɞɚɧɧɵ ɜɫɟ ɟɝɨ ɯɚ-
ɪɚɤɬɟɪɢɫɬɢɤɢ. Ɂɚɞɚɣɬɟ ɟɝɨ ɯɚɪɚɤɬɟɪɢɫɬɢɤɢ');
ShellExecute(handle,'open','Baza.accdb',nil,nil,SW_SHOW);
end else begin
Edit3.Text:=nmin;
Edit4.Text:=nmax;
Nst:=nst;
kpd:=kpd;
nmin:=nmin;
nmax:=nmax;
smin:=smin;
smax:=smax;
66

AssignFile(stanfile, 'optimizator\stanfile.txt');
repeat
{$I-}
Rewrite(stanfile);
{$I+}
res:=IOResult;
if res <> 0
then AssignFile(stanfile, 'stanfile.txt');
until (res= 0);
DecimalSeparator:= '.';
writeln(stanfile, Nst);
writeln(stanfile, kpd);
writeln(stanfile, nmin);
writeln(stanfile,nmax);
writeln(stanfile,smin);
writeln(stanfile,smax);
Closefile(stanfile);
end;
end;
procedure TDann.Button15Click(Sender: TObject);
begin
Form2.Show;
end;
procedure TDann.Button5Click(Sender: TObject);
begin
if ComboBox1.Text='' then
ShowMessage('ɍɤɚɠɢɬɟ ɜɢɞ ɨɛɪɚɛɨɬɤɢ');
if RadioButton4.Checked then
67

ShowMessage('ɍɤɚɠɢɬɟ ɤɚɬɟɝɨɪɢɸ ɦɚɬɟɪɢɚɥɚ');
t:=StrToFloat(Edit1.Text);
d:=StrToFloat(Edit2.Text);
if ComboBox1.Text='ɑɟɪɧɨɜɚɹ ɨɛɪɚɛɨɬɤɚ' then begin
if (Edit1.Text<>'') and (Edit2.Text<>'') then begin
if RadioButton1.Checked then begin
if d<=20 then s:=0.35;
if (d>20) and (d<=40) then begin
if t<=3 then s:=0.45;
if (t>3) and (t<=5) then s:=0.35;
end;
if (d>40) and (d<=60) then begin
if t<=3 then s:=0.7;
if (t>3) and (t<=5) then s:=0.6;
if (t>5) and (t<=8) then s:=0.5;
end;
if (d>60) and (d<=100) then begin
if t<=3 then s:=0.9;
if (t>3) and (t<=5) then s:=0.8;
if (t>5) and (t<=8) then s:=0.7;
if (t>8) and (t<=12) then s:=0.6;
end;
if (d>100) and (d<=400) then begin
if t<=3 then s:=1.05;
if (t>3) and (t<=5) then s:=0.95;
if (t>5) and (t<=8) then s:=0.8;
if (t>8) and (t<=12) then s:=0.7;
end;
if (d>400) and (d<=500) then begin
if t<=3 then s:=1.25;
68

if (t>3) and (t<=5) then s:=1.15;
if (t>5) and (t<=8) then s:=0.95;
if (t>8) and (t<=12) then s:=0.9;
if t>12 then s:=0.75;
end;
if (d>500) and (d<=600) then begin
if t<=3 then s:=1.35;
if (t>3) and (t<=5) then s:=1.2;
if (t>5) and (t<=8) then s:=1.05;
if (t>8) and (t<=12) then s:=0.95;
if t>12 then s:=0.65;
end;
if (d>600) and (d<=1000) then begin
if t<=3 then s:=1.5;
if (t>3) and (t<=5) then s:=1.3;
if (t>5) and (t<=8) then s:=1.15;
if (t>8) and (t<=12) then s:=1.1;
if t>12 then s:=1;
end;
if (d>1000) and (d<=2500) then begin
if t<=3 then s:=1.65;
if (t>3) and (t<=5) then s:=1.55;
if (t>5) and (t<=8) then s:=1.4;
if (t>8) and (t<=12) then s:=1.3;
if t>12 then s:=1.25;
end;
end;
if RadioButton2.Checked or RadioButton3.Checked then begin
if (d>=20) and (d<=40) then s:=0.45;
if (d>40) and (d<=60) then begin
69

if t<=3 then s:=0.75;
if (t>3) and (t<=5) then s:=0.65;
if (t>5) and (t<=8) then s:=0.55;
end;
if (d>60) and (d<=100) then begin
if t<=3 then s:=1.1;
if (t>3) and (t<=5) then s:=0.95;
if (t>5) and (t<=8) then s:=0.8;
if (t>8) and (t<=12) then s:=0.7;
end;
if (d>100) and (d<=400) then begin
if t<=3 then s:=1.25;
if (t>3) and (t<=5) then s:=1.35;
if (t>5) and (t<=8) then s:=0.95;
if (t>8) and (t<=12) then s:=0.75;
end;
if (d>400) and (d<=500) then begin
if t<=3 then s:=1.45;
if (t>3) and (t<=5) then s:=1.35;
if (t>5) and (t<=8) then s:=1.1;
if (t>8) and (t<=12) then s:=0.8;
end;
if (d>500) and (d<=600) then begin
if t<=3 then s:=1.65;
if (t>3) and (t<=5) then s:=1.4;
if (t>5) and (t<=8) then s:=1.2;
if (t>8) and (t<=12) then s:=1.05;
if t>12 then s:=0.6;
end;
if (d>600) and (d<=1000) then begin
70
Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]
