unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
OleCtrls, StdCtrls, Menus, ExtCtrls, Grids, DBGrids, emrvar, LIBADX_TLB, CPort;
type
TForm1 =
class(TForm)
Button1: TButton;
Button3: TButton;
MainMenu1: TMainMenu;
Einzeltest1: TMenuItem;
Label1: TLabel;
Anschlsse2: TMenuItem;
Netzteiltest1: TMenuItem;
ReglerabgleichenundMewerteprfen1: TMenuItem;
Mewerteprfen1: TMenuItem;
Tastaturtesten1: TMenuItem;
AnzeigeundLEDstesten1: TMenuItem;
Relaistesten1: TMenuItem;
Unterspannungserkennungtesten1: TMenuItem;
CosphiUmschaltungtesten1: TMenuItem;
PNETtesten1: TMenuItem;
RadioGroup1: TRadioGroup;
Button2: TButton;
EDVNreinblenden1: TMenuItem;
Label2: TLabel;
Label58: TLabel;
Label4: TLabel;
Label59: TLabel;
Label6: TLabel;
Label60: TLabel;
Label8: TLabel;
Label61: TLabel;
Label10: TLabel;
Label62: TLabel;
Label12: TLabel;
Label13: TLabel;
Label18: TLabel;
Label19: TLabel;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Label25: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Label30: TLabel;
Label31: TLabel;
Label32: TLabel;
Label33: TLabel;
Label34: TLabel;
Label35: TLabel;
Label36: TLabel;
Label37: TLabel;
Label38: TLabel;
Label39: TLabel;
Label40: TLabel;
Label41: TLabel;
Label42: TLabel;
Label43: TLabel;
Label44: TLabel;
Label45: TLabel;
Label46: TLabel;
Label47: TLabel;
Label48: TLabel;
Label49: TLabel;
Label50: TLabel;
Label51: TLabel;
Label52: TLabel;
Label53: TLabel;
Label54: TLabel;
Label55: TLabel;
Label56: TLabel;
Label57: TLabel;
Label3: TLabel;
Label5: TLabel;
Label7: TLabel;
Label9: TLabel;
Label11: TLabel;
Label63: TLabel;
Label64: TLabel;
Label65: TLabel;
Label66: TLabel;
Label67: TLabel;
Prfdatenanzeigen1: TMenuItem;
RadioGroup2: TRadioGroup;
CheckBox2: TCheckBox;
CheckBox1: TCheckBox;
CheckBox3: TCheckBox;
CheckBox4: TCheckBox;
CheckBox5: TCheckBox;
CheckBox6: TCheckBox;
CheckBox7: TCheckBox;
CheckBox8: TCheckBox;
CheckBox9: TCheckBox;
CheckBox10: TCheckBox;
CheckBox11: TCheckBox;
CheckBox12: TCheckBox;
CheckBox13: TCheckBox;
CheckBox14: TCheckBox;
CheckBox15: TCheckBox;
CheckBox16: TCheckBox;
CheckBox17: TCheckBox;
CheckBox18: TCheckBox;
CheckBox19: TCheckBox;
CheckBox20: TCheckBox;
CheckBox21: TCheckBox;
CheckBox22: TCheckBox;
CheckBox23: TCheckBox;
CheckBox24: TCheckBox;
CheckBox25: TCheckBox;
CheckBox26: TCheckBox;
CheckBox27: TCheckBox;
CheckBox28: TCheckBox;
CheckBox29: TCheckBox;
CheckBox30: TCheckBox;
CheckBox31: TCheckBox;
CheckBox32: TCheckBox;
CheckBox33: TCheckBox;
CheckBox34: TCheckBox;
CheckBox35: TCheckBox;
CheckBox36: TCheckBox;
CheckBox37: TCheckBox;
CheckBox38: TCheckBox;
CheckBox39: TCheckBox;
CheckBox40: TCheckBox;
CheckBox41: TCheckBox;
CheckBox42: TCheckBox;
CheckBox43: TCheckBox;
CheckBox44: TCheckBox;
CheckBox45: TCheckBox;
CheckBox46: TCheckBox;
CheckBox47: TCheckBox;
CheckBox48: TCheckBox;
Edit1: TEdit;
Monitor1: TMenuItem;
LIBADX1: TLIBADX;
LIBADX2: TLIBADX;
Memo1: TMemo;
ComPort1: TComPort;
ComPort2: TComPort;
ComPort3: TComPort;
ComPort4: TComPort;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure Anschlsse2Click(Sender: TObject);
procedure ReglerabgleichenundMewerteprfen1Click(Sender: TObject);
procedure Mewerteprfen1Click(Sender: TObject);
procedure Tastaturtesten1Click(Sender: TObject);
procedure AnzeigeundLEDstesten1Click(Sender: TObject);
procedure Relaistesten1Click(Sender: TObject);
procedure Unterspannungserkennungtesten1Click(Sender: TObject);
procedure CosphiUmschaltungtesten1Click(Sender: TObject);
procedure PNETtesten1Click(Sender: TObject);
procedure RadioGroup1Click(Sender: TObject);
procedure EDVNreinblenden1Click(Sender: TObject);
procedure Prfdatenanzeigen1Click(Sender: TObject);
procedure FormKeyDown(Sender: TObject;
var Key: Word;
Shift: TShiftState);
procedure RadioGroup2Click(Sender: TObject);
procedure Monitor1Click(Sender: TObject);
procedure Netzteiltest1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
uses pio_usb_box, pio_usb_var, ser_cport, fluke45, tools, emrtools, empser,
emrdaten, emreinm, emranzta, emrrel, emrpnet;
procedure TForm1.FormKeyDown(Sender: TObject;
var Key: Word;
Shift: TShiftState);
begin
if key=VK_ESCAPE
then begin beep;Abbr:=true;
end;
if key=VK_RETURN
then begin beep;OK:=true;
end;
end;
procedure apm;
begin
application.processmessages;
if (GetKeyState(VK_Escape)
and 128) = 128
then Abbr:=true;
if (GetKeyState(VK_Return)
and 128) = 128
then OK:=true;
end;
procedure button_ein;
begin
with form1
do begin
button1.enabled:=true;
button2.enabled:=true;
button3.enabled:=true;
end;
end;
procedure button_aus;
begin
with form1
do begin
button1.enabled:=false;
button2.enabled:=false;
button3.enabled:=false;
end;
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
caption:=version;
button1.enabled:=false;
button2.enabled:=false;
button3.enabled:=true;
//Lese_USB_Nr;
//Oeffne_USB_PIO_IN;
//Oeffne_USB_PIO_OUT;
//if init_serial(EMP,br19200,dbeight,sbOneStopBit) then exitcode:=0 else exitcode:=2;//Pnet
//if init_serial(FlukeU,br4800,dbeight,sbOneStopBit) then exitcode:=0 else exitcode:=2;//Fluke SPG
//if init_serial(FlukeI,br4800,dbeight,sbOneStopBit) then exitcode:=0 else exitcode:=2;//Fluke STROM
label1.color:=clfuchsia;
label1.Caption:=('
Bitte EDV-Nr. wählen!');
radiogroup2.Hide;
leer;
//openDatenfile;
//LiesGrenzwerte;
//RelAus;
end;
procedure TForm1.RadioGroup1Click(Sender: TObject);
//EDV-Nr. wählen
var i:smallint;
begin
i:=form1.radiogroup1.itemindex;
//Index: 0 = 20-50006 1 = 20-50007 2 = 20-50008 3 = 20-50009 4 = 20-50010
EDV_NR:='
';
case i
of
0:
begin
EDV_NR:='
20-50006';
label1.caption:='
ACHTUNG 230V werden auf unteren Trafo-Abgriff geschaltet!';
Rel(9,EIN);
end;
1:
begin
EDV_NR:='
20-50007';
label1.caption:='
ACHTUNG 230V werden auf unteren Trafo-Abgriff geschaltet!';
Rel(9,EIN);
end;
2:
begin
EDV_NR:='
20-50008';
label1.caption:='
ACHTUNG 230V werden auf unteren Trafo-Abgriff geschaltet!';
Rel(9,EIN);
end;
3:
begin
EDV_NR:='
20-50009';
label1.caption:='
';
Rel(9,AUS);
end;
4:
begin
EDV_NR:='
20-50010';
label1.caption:='
ACHTUNG 230V werden auf unteren Trafo-Abgriff geschaltet!';
Rel(9,EIN);
end;
end;
delay(500);
radiogroup1.hide;
button_ein;
//das funktioniert nicht! darunter das Auskommentierte funktioniert
//button1.enabled:=true;
//button2.enabled:=true;
label1.color:=clfuchsia;
label1.caption:='
Mit NETZ/CPU oder nur CPU starten !';
if Abbr
then exit;
end;