unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, Menus, ComCtrls, Tabnotbk, ColorGrd, OleCtrls, vcfi, StdCtrls, Mask, Spin, ExtCtrls; type TForm1 = class(TForm) MainMenu1: TMainMenu; N1: TMenuItem; N2: TMenuItem; N3: TMenuItem; N4: TMenuItem; N5: TMenuItem; N6: TMenuItem; N7: TMenuItem; Grebenka: TTabbedNotebook; Tip_Kabel: TComboBox; Label1: TLabel; Label2: TLabel; Tip_Izol: TComboBox; Label3: TLabel; Label4: TLabel; Tip_mater: TComboBox; Diametr: TEdit; SpinButton1: TSpinButton; Label5: TLabel; Label6: TLabel; Label7: TLabel; Kordel: TEdit; Lenta: TEdit; Sloii: TSpinEdit; SpinButton2: TSpinButton; SpinButton3: TSpinButton; graf1: TImage; graf2: TImage; graf3: TImage; graf4: TImage; graf5: TImage; graf6: TImage; graf7: TImage; graf8: TImage; Label8: TLabel; Fric: TSpinEdit; Tab: TLabel; M_R: TLabel; M_f: TLabel; Label9: TLabel; Label10: TLabel; M_l: TLabel; M_f2: TLabel; Label11: TLabel; Label12: TLabel; Label13: TLabel; Label14: TLabel; M_c: TLabel; M_f3: TLabel; Label15: TLabel; Label16: TLabel; Label17: TLabel; Label18: TLabel; Label19: TLabel; Label20: TLabel; Label21: TLabel; Label22: TLabel; Label23: TLabel; Label24: TLabel; procedure N6Click(Sender: TObject); procedure Tip_KabelChange(Sender: TObject); procedure DiametrClick(Sender: TObject); procedure DiametrKeyPress(Sender: TObject; var Key: Char); procedure DiametrEnter(Sender: TObject); procedure SpinButton1DownClick(Sender: TObject); procedure SpinButton1UpClick(Sender: TObject); procedure SpinButton2DownClick(Sender: TObject); procedure SpinButton2UpClick(Sender: TObject); procedure SpinButton3DownClick(Sender: TObject); procedure SpinButton3UpClick(Sender: TObject); procedure KordelExit(Sender: TObject); procedure LentaExit(Sender: TObject); procedure SloiiExit(Sender: TObject); procedure N7Click(Sender: TObject); procedure Tip_materChange(Sender: TObject); procedure DiametrChange(Sender: TObject); procedure FricChange(Sender: TObject); procedure graf1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); procedure N3Click(Sender: TObject); procedure Tip_IzolChange(Sender: TObject); procedure graf2MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); procedure graf3MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); private { Private declarations } public { Public declarations } end; var Form1: TForm1; E,psi,Cmax,Cmin,C,Lmin,Lmax,L,Rmin,Rmax,R,kr,fr,ro,diam,kord,lent:real; sloi:integer; p,m,iz: byte; flag1,mashtab:boolean; implementation uses Unit2; {$R *.DFM} procedure TForm1.N6Click(Sender: TObject); begin Close; end; procedure TForm1.Tip_KabelChange(Sender: TObject); begin if Tip_kabel.text=' Симметричная пара' then p:=1; if Tip_kabel.text=' Симметричная четверка' then p:=5; end; procedure TForm1.DiametrClick(Sender: TObject); var bin:real; begin diametr.text:='0'; end; procedure TForm1.DiametrKeyPress(Sender: TObject; var Key: Char); begin case key of ',': key:='.'; '/','?','\','<','>','-','+','_','=','|','"': key:=' '; 'a'..'z','A'..'Z': key:=' '; 'а'..'я','А'..'Я': key:=' '; end; end; procedure TForm1.DiametrEnter(Sender: TObject); var code:integer; begin val(Diametr.text,diam,code); if code<>0 then begin messagedlg('Введите правильное значение ',mtinformation,[mbOk],0); diametr.text:='0.1'; end; end; procedure TForm1.SpinButton1DownClick(Sender: TObject); var down:real; code:integer; s:string; begin val(diametr.text,down,code); if code<>0 then diametr.text:='0.1' else begin if down>0 then down:=down-0.1; diam:=down; str(down:4:1,s); diametr.text:=s; end; end; procedure TForm1.SpinButton1UpClick(Sender: TObject); var up:real; code:integer; s:string; begin val(diametr.text,up,code); if code<>0 then diametr.text:='0.1' else begin if up<99 then up:=up+0.1; diam:=up; str(up:4:1,s); diametr.text:=s; end; end; procedure TForm1.SpinButton2DownClick(Sender: TObject); var down:real; code:integer; s:string; begin val(kordel.text,down,code); if code<>0 then kordel.text:='0.01' else begin if down>0 then down:=down-0.01; kord:=down; str(down:4:2,s); kordel.text:=s; end; end; procedure TForm1.SpinButton2UpClick(Sender: TObject); var up:real; code:integer; s:string; begin val(kordel.text,up,code); if code<>0 then kordel.text:='0.01' else begin if up<99 then up:=up+0.01; kord:=up; str(up:4:2,s); kordel.text:=s; end; end; procedure TForm1.SpinButton3DownClick(Sender: TObject); var down:real; code:integer; s:string; begin val(lenta.text,down,code); if code<>0 then lenta.text:='0.01' else begin if down>0 then down:=down-0.01; lent:=down; str(down:4:2,s); lenta.text:=s; end; end; procedure TForm1.SpinButton3UpClick(Sender: TObject); var up:real; code:integer; s:string; begin val(lenta.text,up,code); if code<>0 then lenta.text:='0.01' else begin if up<99 then up:=up+0.01; lent:=up; str(up:4:2,s); lenta.text:=s; end; end; procedure TForm1.KordelExit(Sender: TObject); var code:integer; begin val(kordel.text,kord,code); if code<>0 then begin messagedlg('Введите правильное значение ',mtinformation,[mbOk],0); kordel.text:='0.01'; end; end; procedure TForm1.LentaExit(Sender: TObject); var code:integer; begin val(lenta.text,lent,code); if code<>0 then begin messagedlg('Введите правильное значение ',mtinformation,[mbOk],0); lenta.text:='0.01'; end; end; procedure TForm1.SloiiExit(Sender: TObject); begin sloi:=sloii.value; end; function a:real; begin case p of 1: begin case iz of 1: a:=diam+2*(kord+lent); 2: a:=diam+2*(kord+lent*sloi); 3: a:=diam+2*lent; 4: a:=diam+2*lent; 5: a:=diam+2*lent; end end; 5: begin case iz of 1: a:=sqrt(sqr(diam+2*(kord+lent))+sqr(diam+2*(kord+lent))); 2: a:=sqrt(sqr(diam+2*(kord+lent*sloi))+sqr(diam+2*(kord+lent*sloi))); 3: a:=sqrt(sqr(diam+2*lent)+sqr(diam+2*lent)); 4: a:=sqrt(sqr(diam+2*lent)+sqr(diam+2*lent)); 5: a:=sqrt(sqr(diam+2*lent)+sqr(diam+2*lent)); end end; end; end; function d1:real; begin case iz of 1: d1:=diam+2*(kord+lent); 2: d1:=diam+2*(kord+lent*sloi); 3: d1:=diam+2*lent; 4: d1:=diam+2*lent; 5: d1:=diam+2*lent; end; end; { Процедура вывода графиков _} procedure TForm1.N7Click(Sender: TObject); function k(f:real):real; begin if m=1 then k:=0.0105*Diam*sqrt(f); if m=2 then k:=0.0082*Diam*sqrt(f); if m=3 then k:=0.0375*Diam*sqrt(f); end; function Fkr(f:real):real; var krf:real; begin krf:=k(f); if krf<0.5 then Fkr:=0.000326*(krf/0.5); if krf>0.5 then if krf<=1 then Fkr:=((krf-0.5)/0.5)*0.004864+0.000326; if krf>1 then if krf<=1.5 then Fkr:=((krf-1)/0.5)*0.02061+0.00519; if krf>1.5 then if krf<=2 then Fkr:=((krf-1.5)/0.5)*0.0524+0.0258; if krf>2 then if krf<=2.5 then Fkr:=((krf-2)/0.5)*0.0974+0.0782; if krf>2.5 then if krf<=3 then Fkr:=((krf-2.5)/0.5)*0.1424+0.1756; if krf>3 then if krf<=3.5 then Fkr:=((krf-3)/0.5)*0.174+0.318; if krf>3.5 then if krf<=4 then Fkr:=((krf-3.5)/0.5)*0.186+0.492; if krf>4 then if krf<=4.5 then Fkr:=((krf-4)/0.5)*0.184+0.678; if krf>4.5 then if krf<=5 then Fkr:=((krf-4.5)/0.5)*0.18+0.862; if krf>5 then if krf<=7 then Fkr:=((krf-5)/2)*0.701+1.042; if krf>7 then if krf<=10 then Fkr:=((krf-7)/3)*1.056+1.743; if krf>10 then Fkr:=((krf-7)/3)*1.056+1.743; end; function Gkr(f:real):real; var krf:real; begin krf:=k(f); if krf<0.5 then Gkr:=0.000975*(krf/0.5); if krf>0.5 then if krf<=1 then Gkr:=((krf-0.5)/0.5)*0.014215+0.000975; if krf>1 then if krf<=1.5 then Gkr:=((krf-1)/0.5)*0.05391+0.01519; if krf>1.5 then if krf<=2 then Gkr:=((krf-1.5)/0.5)*0.1033+0.0691; if krf>2 then if krf<=2.5 then Gkr:=((krf-2)/0.5)*0.1226+0.1724; if krf>2.5 then if krf<=3 then Gkr:=((krf-2.5)/0.5)*0.11+0.295; if krf>3 then if krf<=3.5 then Gkr:=((krf-3)/0.5)*0.094+0.405; if krf>3.5 then if krf<=4 then Gkr:=((krf-3.5)/0.5)*0.085+0.499; if krf>4 then if krf<=4.5 then Gkr:=((krf-4)/0.5)*0.085+0.584; if krf>4.5 then if krf<=5 then Gkr:=((krf-4.5)/0.5)*0.056+0.669; if krf>5 then if krf<=7 then Gkr:=((krf-5)/2)*0.354+0.755; if krf>7 then if krf<=10 then Gkr:=((krf-7)/3)*0.532+1.109; if krf>10 then Gkr:=((krf-7)/3)*0.532+1.109; end; function Hkr(f:real):real; var krf:real; begin krf:=k(f); if krf<0.5 then Hkr:=(krf/0.5)*0.0003+0.0417; if krf>0.5 then if krf<=1 then Hkr:=((krf-0.5)/0.5)*0.011+0.042; if krf>1 then if krf<=1.5 then Hkr:=((krf-1)/0.5)*0.039+0.053; if krf>1.5 then if krf<=2 then Hkr:=((krf-1.5)/0.5)*0.077+0.092; if krf>2 then if krf<=2.5 then Hkr:=((krf-2)/0.5)*0.094+0.169; if krf>2.5 then if krf<=3 then Hkr:=((krf-2.5)/0.5)*0.085+0.263; if krf>3 then if krf<=3.5 then Hkr:=((krf-3)/0.5)*0.068+0.348; if krf>3.5 then if krf<=4 then Hkr:=((krf-3.5)/0.5)*0.06+0.416; if krf>4 then if krf<=4.5 then Hkr:=((krf-4)/0.5)*0.037+0.466; if krf>4.5 then if krf<=5 then Hkr:=((krf-4.5)/0.5)*0.027+0.503; if krf>5 then if krf<=7 then Hkr:=((krf-5)/2)*0.066+0.530; if krf>7 then if krf<=10 then Hkr:=((krf-7)/3)*0.047+0.596; if krf>10 then Hkr:=((krf-7)/3)*0.047+0.596; end; function Qkr(f:real):real; var krf:real; begin krf:=k(f); if krf<0.5 then Qkr:=(krf/0.5)*0.0002+0.9998; if krf>0.5 then if krf<=1 then Qkr:=((krf-0.5)/0.5)*0.0028+0.997; if krf>1 then if krf<=1.5 then Qkr:=((krf-1)/0.5)*0.060+0.987; if krf>1.5 then if krf<=2 then Qkr:=((krf-1.5)/0.5)*0.024+0.961; if krf>2 then if krf<=2.5 then Qkr:=((krf-2)/0.5)*0.048+0.913; if krf>2.5 then if krf<=3 then Qkr:=((krf-2.5)/0.5)*0.068+0.845; if krf>3 then if krf<=3.5 then Qkr:=((krf-3)/0.5)*0.079+0.766; if krf>3.5 then if krf<=4 then Qkr:=((krf-3.5)/0.5)*0.08+0.686; if krf>4 then if krf<=4.5 then Qkr:=((krf-4)/0.5)*0.07+0.616; if krf>4.5 then if krf<=5 then Qkr:=((krf-4.5)/0.5)*0.06+0.556; if krf>5 then if krf<=7 then Qkr:=((krf-5)/2)*0.156+0.400; if krf>7 then if krf<=10 then Qkr:=((krf-7)/3)*0.114+0.286; if krf>10 then Qkr:=((krf-7)/3)*0.114+0.286; end; {Процедура вычисления сопротивления} procedure resist; var xy,r0,r1,fv,r1min,r2min,r3min,r1max,r2max,r3max:real; x,y,code,i:integer; mold:byte; st:string; begin if mashtab=true then begin mold:=m;Rmin:=100;Rmax:=0; m:=1; r1min:=2*1.7*0.00001/(3.14*sqr(diam)/4)*1.045; r1min:=r1min*(1+Fkr(0)+p*Gkr(0)*sqr(d1/a)/(1-Hkr(0)*sqr(d1/a))); m:=2; r2min:=2*2.5*0.00001/(3.14*sqr(diam)/4)*1.045; r2min:=r2min*(1+Fkr(0)+p*Gkr(0)*sqr(d1/a)/(1-Hkr(0)*sqr(d1/a))); m:=3; r3min:=2*2.0*0.00001/(3.14*sqr(diam)/4)*1.045; r3min:=r3min*(1+Fkr(0)+p*Gkr(0)*sqr(d1/a)/(1-Hkr(0)*sqr(d1/a))); Rmin:=r1min; if Rmin>r2min then Rmin:=r2min;if Rmin>r3min then Rmin:=r3min; m:=1; r1max:=2*1.7*0.00001/(3.14*sqr(diam)/4)*1.045; r1max:=r1max*(1+Fkr(fr)+p*Gkr(fr)*sqr(d1/a)/(1-Hkr(fr)*sqr(d1/a))); m:=2; r2max:=2*2.5*0.00001/(3.14*sqr(diam)/4)*1.045; r2max:=r2max*(1+Fkr(fr)+p*Gkr(fr)*sqr(d1/a)/(1-Hkr(fr)*sqr(d1/a))); m:=3; r3max:=2*2.0*0.00001/(3.14*sqr(diam)/4)*1.045; r3max:=r3max*(1+Fkr(fr)+p*Gkr(fr)*sqr(d1/a)/(1-Hkr(fr)*sqr(d1/a))); Rmax:=r1max; if Rmax20 then y:=y-13 else y:=y+5; graf1.canvas.textout(i-25,y,st); end; {Процедура вычисления индуктивности} procedure induct; var lvar,xy,fv,l1min,l2min,l3min,l1max,l2max,l3max:real; x,y,code,i:integer; mold:byte; st:string; begin if mashtab=true then begin mold:=m;lmin:=1;lmax:=0; m:=1;l1min:=1;l2min:=1;l3min:=1;l1max:=0;l2max:=0;l3max:=0; for i:=0 to fric.value*1000 do begin lvar:=1.045*(4*ln((a-diam/2)/(diam/2))+Qkr(i))*0.0001; if l1min>lvar then l1min:=lvar; if l1maxlvar then l2min:=lvar; if l2maxlvar then l3min:=lvar; if l3maxl2min then Lmin:=l2min;if Lmin>l3min then Lmin:=l3min; Lmax:=l1max; if Lmax20 then y:=y-13 else y:=y+5; graf2.canvas.textout(i-25,y,st); end; {Вычисление емкости} procedure emkost; var Cvar,xy,fv,psiold:real; x,y,code,i:integer; izold:byte; st:string; begin if mashtab=true then begin izold:=iz; psiold:=psi; iz:=1; psi:=(sqr(lent*2+d1)-sqr(a))/(sqr(lent*2+d1)+sqr(a)); Cvar:=1.045*E*0.001/(36*ln(a*psi/(diam/2))); if cmaxcvar then cmin:=cvar; iz:=2; psi:=(sqr(lent*2+d1)-sqr(a))/(sqr(lent*2+d1)+sqr(a)); Cvar:=1.045*E*0.001/(36*ln(a*psi/(diam/2))); if cmaxcvar then cmin:=cvar; iz:=3; psi:=(sqr(lent*2+d1)-sqr(a))/(sqr(lent*2+d1)+sqr(a)); Cvar:=1.045*E*0.001/(36*ln(a*psi/(diam/2))); if cmaxcvar then cmin:=cvar; iz:=4; psi:=(sqr(lent*2+d1)-sqr(a))/(sqr(lent*2+d1)+sqr(a)); Cvar:=1.045*E*0.001/(36*ln(a*psi/(diam/2))); if cmaxcvar then cmin:=cvar; iz:=5; psi:=(sqr(lent*2+d1)-sqr(a))/(sqr(lent*2+d1)+sqr(a)); Cvar:=1.045*E*0.001/(36*ln(a*psi/(diam/2))); if cmaxcvar then cmin:=cvar; iz:=izold; psi:=psiold; mashtab:=false; str(Cmax:10:10,st); st:='Max C: '+st; messagedlg(st,mtinformation,[mbOk],0); str(Cmin:10:10,st); st:='Min C: '+st; messagedlg(st,mtinformation,[mbOk],0); end; str(Cmax:10:7,st); label13.caption:='Cmax:'+st; graf3.canvas.pen.color:=rgb(random(255),random(255),random(255)); C:=1.045*E*0.001/(36*ln(a*psi/(diam/2))); for i:=0 to (graf3.width-15) do begin fv:=(fr/(graf3.width-15))*i; str(C:10:7,st); M_c.caption:='Ёмкость: '+st+'пФ/км'; xy:=(C-Cmin)/((Cmax-Cmin)/(graf3.height-15)); str(xy:10:0,st); val(st,y,code); y:=graf3.height-10-y; if i=0 then graf3.canvas.moveto(10,y); graf3.canvas.lineto(i+10,y); str(C:10:7,st); M_c.caption:='Ёмкость: '+st+'пФ/км'; str(fv:10:0,st); M_f3.caption:='Частота:'+st+'Гц'; Application.ProcessMessages; end; st:=tip_izol.text; if y>20 then y:=y-13 else y:=y+5; graf3.canvas.textout(i-200,y,st); end; begin if m=0 then if iz=0 then begin messagedlg('Будте добреньки, заполните поля ',mtinformation,[mbOk],0); exit; end; if flag1=true then begin graf1.canvas.moveto(10,5); graf1.canvas.lineto(10,graf1.height-5); graf1.canvas.moveto(5,graf1.height-10); graf1.canvas.lineto(graf1.width-5,graf1.height-10); graf2.canvas.moveto(10,5); graf2.canvas.lineto(10,graf2.height-5); graf2.canvas.moveto(5,graf2.height-10); graf2.canvas.lineto(graf2.width-5,graf2.height-10); graf3.canvas.moveto(10,5); graf3.canvas.lineto(10,graf3.height-5); graf3.canvas.moveto(5,graf3.height-10); graf3.canvas.lineto(graf3.width-5,graf3.height-10); graf4.canvas.moveto(10,5); graf4.canvas.lineto(10,graf4.height-5); graf4.canvas.moveto(5,graf4.height-10); graf4.canvas.lineto(graf4.width-5,graf4.height-10); graf5.canvas.moveto(10,5); graf5.canvas.lineto(10,graf5.height-5); graf5.canvas.moveto(5,graf5.height-10); graf5.canvas.lineto(graf5.width-5,graf5.height-10); graf6.canvas.moveto(10,5); graf6.canvas.lineto(10,graf6.height-5); graf6.canvas.moveto(5,graf6.height-10); graf6.canvas.lineto(graf6.width-5,graf6.height-10); graf7.canvas.moveto(10,5); graf7.canvas.lineto(10,graf7.height-5); graf7.canvas.moveto(5,graf7.height-10); graf7.canvas.lineto(graf7.width-5,graf7.height-10); graf8.canvas.moveto(10,5); graf8.canvas.lineto(10,graf8.height-5); graf8.canvas.moveto(5,graf8.height-10); graf8.canvas.lineto(graf8.width-5,graf8.height-10); flag1:=false; end; fric.Enabled:=false; diametr.enabled:=false; SpinButton1.Enabled:=false; resist; induct; emkost; end; { Процедура вывода графиков ~} procedure TForm1.Tip_materChange(Sender: TObject); begin if Tip_mater.Text=' Медь' then begin ro:=1.7*0.00000001;m:=1;end; if Tip_mater.Text=' Алюминий' then begin ro:=2.5*0.00000001;m:=2;end; if Tip_mater.Text=' Сталь' then begin ro:=2.0*0.00000001;m:=3;end; end; procedure TForm1.DiametrChange(Sender: TObject); var k1:real;stk:string;cod,code:integer; procedure obr; var fr1:real; begin kr:=k1*Diam*sqrt(fr); if kr>10 then begin messagedlg('Исправляю значение частоты ',mtinformation,[mbOk],0); kr:=10; fr:=sqr(10/(k1*diam)); fr1:=fr/1000; str(fr1:7:0,stk); val(stk,cod,code); fric.value:=cod; end; end; begin if Tip_mater.text=' Медь' then begin k1:=0.0105; obr;end; if Tip_mater.text=' Алюминий' then begin k1:=0.0082; obr;end; if Tip_mater.text=' Сталь' then begin k1:=0.0375; obr;end; end; procedure TForm1.FricChange(Sender: TObject); var k:real; stk:string; procedure obr; begin kr:=k*Diam*sqrt(fr); if kr>10 then begin messagedlg('Исправляю значение диаметра',mtinformation,[mbOk],0); kr:=10; diam:=10/(k*sqrt(fr)); str(diam:4:1,stk); diametr.text:=stk; end; end; begin fr:=fric.value; str(fr:8:0,stk); fr:=fric.value*1000; if Tip_mater.text=' Медь' then begin k:=0.0105; obr;end; if Tip_mater.text=' Алюминий' then begin k:=0.0082; obr;end; if Tip_mater.text=' Сталь' then begin k:=0.0375; obr;end; label10.caption:='Fmax:'+stk+'кГц'; label12.caption:='Fmax:'+stk+'кГц'; label14.caption:='Fmax:'+stk+'кГц'; label16.caption:='Fmax:'+stk+'кГц'; label18.caption:='Fmax:'+stk+'кГц'; label20.caption:='Fmax:'+stk+'кГц'; label22.caption:='Fmax:'+stk+'кГц'; label24.caption:='Fmax:'+stk+'кГц'; end; procedure TForm1.graf1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var st: string; xy:real; begin xy:=(Rmax-Rmin)/(graf1.Height-15)*(graf1.height-10-y)+Rmin; str(xy:10:7,st); M_R.caption:='Сопротивление: '+st+' Ом'; xy:=(fr/(graf1.width-15))*(x-10); str(xy:10:0,st); M_f.caption:='Частота: '+st+' Гц'; end; procedure TForm1.N3Click(Sender: TObject); begin form2.visible:=true; form2.enabled:=true; Diametr.Enabled:=true; spinbutton1.enabled:=true; Fric.Enabled:=true; mashtab:=true; end; procedure TForm1.Tip_IzolChange(Sender: TObject); begin if Tip_Izol.text=' Кордельно - бумажная' then begin iz:=1; sloii.enabled:=false; lenta.enabled:=true;SpinButton3.enabled:=true; kordel.enabled:=true;SpinButton2.enabled:=true; psi:=sqr(2*(lent*2+kord*2+diam)+d1-diam)-sqr(a); psi:=psi/(sqr(2*(lent*2+kord*2+diam)+d1-diam)+sqr(a)); E:=1.35; end; if Tip_Izol.text=' Кордельно - стирофлексная' then begin sloii.enabled:=true; lenta.enabled:=true;SpinButton3.enabled:=true; kordel.enabled:=true;SpinButton2.enabled:=true; iz:=2; psi:=sqr(2*(lent*6+kord*2+diam)+d1-diam)-sqr(a); psi:=psi/(sqr(2*(lent*6+kord*2+diam)+d1-diam)+sqr(a)); E:=1.25; end; if Tip_Izol.text='Сплошная - полиэтиленовая' then begin iz:=3; sloii.enabled:=false; lenta.enabled:=true;SpinButton3.enabled:=true; kordel.enabled:=false;SpinButton2.enabled:=false; psi:=(sqr(lent*2+d1)-sqr(a))/(sqr(lent*2+d1)+sqr(a)); E:=2; end; if Tip_Izol.text=' Пористо - полиэтиленовая' then begin sloii.enabled:=false; lenta.enabled:=true;SpinButton3.enabled:=true; kordel.enabled:=false;SpinButton2.enabled:=false; iz:=4; psi:=(sqr(lent*2+d1)-sqr(a))/(sqr(lent*2+d1)+sqr(a)); E:=1.45; end; if Tip_Izol.text=' Балонно - полиэтиленовая' then begin iz:=5; sloii.enabled:=false; lenta.enabled:=true;SpinButton3.enabled:=true; kordel.enabled:=false;SpinButton2.enabled:=false; psi:=(sqr(lent*2+d1)-sqr(a))/(sqr(lent*2+d1)+sqr(a)); E:=1.25; end; end; procedure TForm1.graf2MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var st: string; xy:real; begin xy:=(Lmax-Lmin)/(graf2.Height-15)*(graf2.height-10-y)+Lmin; str(xy:10:7,st); M_l.caption:='Индуктивность: '+st+' Гн'; xy:=(fr/(graf2.width-15))*(x-10); str(xy:10:0,st); M_f2.caption:='Частота: '+st+' Гц'; end; procedure TForm1.graf3MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var st: string; xy:real; begin xy:=(Cmax-Cmin)/(graf3.Height-15)*(graf3.height-10-y)+Cmin; str(xy:10:7,st); M_c.caption:='Ёмкость: '+st+' пФ/км'; xy:=(fr/(graf3.width-15))*(x-10); str(xy:10:0,st); M_f3.caption:='Частота: '+st+' Гц'; end; end.