Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > API de Windows
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 16-11-2008
gaston260 gaston260 is offline
Miembro
 
Registrado: ene 2008
Posts: 169
Poder: 17
gaston260 Va por buen camino
Diferente velocidad en distintos pines del puerto paralelo

Hola ! me podrian guiar en una aplicacion con la que estoy practicando , quiero sacar un tren de pulsos por el pin uno del puerto paralelo y cuando intento sacar el segundo tren de pulsos por el segundo pin resulta que un pin ya no va a la velocidad que yo quiero ! , creo que estoy teniendo problemas de logica pero no se como encararlo ! aca paso el codigo

procedure Tform1.Timer1Timer(Sender: TObject);
var
Estado1: String;

begin
if (valorActual = strtoint(txtPararEntrada.text)) then
begin
exit;
end;

if envios1 = 3 then
begin
if checkbox1.checked then
begin
valor := 1;
im3.Brush.Color := clRed;
Estado1 := 'si';
end;
end;

if envios1 = 4 then
begin
im3.Brush.Color := clblack;
valor := 0;
Estado1 := 'no';
end;

if envios1 = 0 then
begin
imReset.Brush.Color := clyellow;
im3.Brush.Color := clblack;
Estado1 := 'Indefinido';
end
else
imReset.Brush.Color := clBlack;
begin
if envios1 = 1 then
begin
im3.Brush.Color := clYellow;
Estado1 := 'Indefinido';
end;
end;
if envios1 = 4 then
envios1 := 2;
Out32(StrToInt(txtpuertobucle.text), valor);
envios1 := envios1 + 1;
be.panels[9].text := 'Envíos: ' + Estado1;
Timer1.Interval := ((strtoint(txtmaximo.text) + 1) - deslizador1.position) {div 1};
end;

//************************************

procedure Tform1.Timer3Timer(Sender: TObject);
var
Estado2: String;

begin
if (valorActual = strtoint(txtPararEntrada.text)) then
begin
exit;
end;
if envios2 = 3 then
begin
if checkbox2.checked then
begin
valor := 2;
im4.Brush.Color := clRed;
Estado2 := 'si';
end;
end;
if envios2 = 4 then
begin
im4.Brush.Color := clblack;
valor := 0;
Estado2 := 'no';
end;
if envios2 = 0 then
begin
imReset.Brush.Color := clyellow;
im4.Brush.Color := clblack;
Estado2 := 'Indefinido';
end
else
imReset.Brush.Color := clBlack;
begin
if envios2 = 1 then
begin
im4.Brush.Color := clYellow;
Estado2 := 'Indefinido';
end;
end;
if envios2 = 4 then
envios2 := 2;
Out32(StrToInt(txtpuertobucle.text), valor);
envios2 := envios2 + 1;
be.panels[9].text := 'Envíos: ' + Estado2;
Timer3.Interval := ((strtoint(txtmaximo.text) + 1) - deslizador2.position) {div 1};
end;

//******************************************************************************

procedure Tform1.Iniciar1Click(Sender: TObject);
begin
Timer1.Interval := deslizador1.position;
Timer2.Interval := (strtoint(txtmaximo.text) + 1) - deslizador1.position;
im1.Brush.Color := clblack;
im2.Brush.Color := clgreen;
im3.Brush.color := clblack;
envios1 := 1;
valor := 0;

if valor = 256 then
Timer2.Enabled := False;
Timer1.Enabled := True;
be.panels[0].text := 'Bucle iniciado';
be.panels[1].text := 'Iniciar 1 Activado';
end;

//************************************

procedure Tform1.Iniciar2Click(Sender: TObject);
begin
Timer1.Interval := deslizador2.position;
Timer4.Interval := (strtoint(txtmaximo.text) + 1) - deslizador2.position;
im1.Brush.Color := clblack;
im2.Brush.Color := clgreen;
im3.Brush.color := clblack;
envios2 := 2;
valor := 0;

if valor = 256 then
Timer4.Enabled := False;
Timer3.Enabled := True;
be.panels[0].text := 'Bucle iniciado';
be.panels[2].text := 'Iniciar 2 Activado';
end;
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Puerto paralelo bactering Varios 8 15-09-2011 07:55:09
Puerto Paralelo axel77 API de Windows 1 23-08-2007 04:45:56
Puerto paralelo en C Chase C++ Builder 0 04-07-2005 12:29:37
Puerto Paralelo jorge Lazarus, FreePascal, Kylix, etc. 1 20-04-2005 03:25:42
Puerto Paralelo solovaer Impresión 0 08-03-2005 02:54:54


La franja horaria es GMT +2. Ahora son las 14:30:14.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi