lign=top>
3-5 м
3-5 м
Додаток
Код програми написаний на мові Delphi для зчітування и записами даних до LPT-порт.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, LPTIO, StdCtrls, ExtCtrls;
type
TForm1 = class (TForm)
Shape1: TShape;
Shape2: TShape;
Shape3: TShape;
Shape4: TShape;
Shape5: TShape;
Shape6: TShape;
Shape7: TShape;
Shape8: TShape;
Shape9: TShape;
Shape10: TShape;
Shape11: TShape;
Shape12: TShape;
Shape13: TShape;
Shape14: TShape;
Shape15: TShape;
Shape16: TShape;
Shape17: TShape;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
Shape18: TShape;
Shape19: TShape;
Shape20: TShape;
Shape21: TShape;
Shape22: TShape;
Shape23: TShape;
Label19: TLabel;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Label25: TLabel;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Label30: TLabel;
Label31: TLabel;
Label32: TLabel;
Label33: TLabel;
Label34: TLabel;
Label35: TLabel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
Button7: ​​TButton;
Button8: TButton;
Button9: TButton;
Button14: TButton;
Button16: TButton;
Button17: TButton;
Shape24: TShape;
Shape25: TShape;
Shape26: TShape;
Label18: TLabel;
Label36: TLabel;
Label37: TLabel;
ComboBox1: TComboBox;
Timer1: TTimer;
CheckBox1: TCheckBox;
CheckBox2: 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;
Edit1: TEdit;
procedure Button1Click (Sender: TObject);
procedure Button2Click (Sender: TObject);
procedure Button3Click (Sender: TObject);
procedure Button4Click (Sender: TObject);
procedure Button5Click (Sender: TObject);
procedure Button6Click (Sender: TObject);
procedure Button7Click (Sender: TObject);
procedure Button8Click (Sender: TObject);
procedure Button9Click (Sender: TObject);
procedure Button14Click (Sender: TObject);
procedure Button16Click (Sender: TObject);
procedure Button17Click (Sender: TObject);
procedure FormCreate (Sender: TObject);
procedure FormDestroy (Sender: TObject);
procedure Timer1Timer (Sender: TObject);
private
{Private declarations}
Lpt: TLptPortConnection;
public
{Public declarations}
function GetCurrentPort: byte;
function Pin2: boolean;
function Pin3: boolean;
function Pin4: boolean;
function Pin5: boolean;
function Pin6: boolean;
function Pin7: boolean;
function Pin8: boolean;
function Pin9: boolean;
function Pin1: boolean;
function Pin14: boolean;
function Pin16: boolean;
function Pin17: boolean;
function Pin10: boolean;
function Pin11: boolean;
function Pin12: boolean;
function Pin13: boolean;
function Pin15: boolean;
procedure ButtonPin2;
procedure ButtonPin3;
procedure ButtonPin4;
procedure ButtonPin5;
procedure ButtonPin6;
procedure ButtonPin7;
procedure ButtonPin8;
procedure ButtonPin9;
procedure ButtonPin1;
procedure ButtonPin14;
procedure ButtonPin16;
procedure ButtonPin17;
end;
var
Form1: TForm1;
implementation
{$ R *....