/

   

, , . . ? ! , . , 2004 , 270 ( ). - . - 800. - / /. . . 2.5 . - . . , . 270 , .

, . - " ". , . . - -. LPT, -. COM. , USB, , .. 150 . , . , COM - , . 56110 8 .

COM-:

    .  RS232

( & ...) +12, ( ), "" . . 56110. .

    .
( )

: . ( 3.4.5.6) / , , , . , "" " ". ( ) .

, . :). . n-p-n ( ). ( ), (p-n-p) (361). . DCD , 6 . . , . . - . ComDrv32. . . SashRRC ( ). ( ) . rrc :

procedure ResetCar; //

var CycleCount:Integer;

begin

if(rrcwindow.Com.Connected=false)then exit;

if(lsCD in rrcwindow.Com.GetLineStatus=True)then

begin

CycleCount:=0;

while(lsCD in rrcwindow.Com.GetLineStatus=True)do

begin

rrcwindow.Com.ToggleRTS(False); //

rrcwindow.Com.ToggleRTS(False); //

rrcwindow.Com.ToggleRTS(True); //

rrcwindow.Com.ToggleRTS(True); //

CycleCount:=CycleCount+1;

if(CycleCount>MaxCycleCount)then begin exit;end;

end

end

else

begin

CycleCount:=0;

while(lsCD in rrcwindow.Com.GetLineStatus=False)do

begin

rrcwindow.Com.ToggleRTS(False); //

rrcwindow.Com.ToggleRTS(False); //

rrcwindow.Com.ToggleRTS(True); //

rrcwindow.Com.ToggleRTS(True); //

CycleCount:=CycleCount+1;

if(CycleCount>MaxCycleCount)then begin exit;end;

end;

CycleCount:=0;

while(lsCD in rrcwindow.Com.GetLineStatus=True)do

begin

rrcwindow.Com.ToggleRTS(False); //

rrcwindow.Com.ToggleRTS(False); //

rrcwindow.Com.ToggleRTS(True); //

rrcwindow.Com.ToggleRTS(True); //

CycleCount:=CycleCount+1;

if(CycleCount>MaxCycleCount)then begin exit;end;

end;

end;

end;

procedure SendCommandToCar(chUp:boolean;chDown:boolean;chLeft:boolean;chRight:boolean); //

var Checksuma:Integer;

x:Integer;

begin

Checksuma:=0;

ResetCAR;

if(rrcwindow.Com.Connected=false)then exit;

{ }

if (chUp = True) then Checksuma:=Checksuma+2;

if (chDown = True) then Checksuma:=Checksuma+1;

if (chLeft = True) then Checksuma:=Checksuma+8;

if (chRight = True) then Checksuma:=Checksuma+4;

for x:=1 to Checksuma do //

begin

rrcwindow.Com.ToggleRTS(False); //

rrcwindow.Com.ToggleRTS(False); //

rrcwindow.Com.ToggleRTS(True); //

rrcwindow.Com.ToggleRTS(True); //

end;

end;

- sash_g87 {} mail.ru

: cxem.net

.

.

<<

:

▪ 

▪  ( )

▪  0,4-35 . .., 1970

▪  . .., 1972

▪  ?

▪ 

▪  . 1

:

:


E-mail ( ):


:

[lol][cry][!][?]