Ver Mensaje Individual
  #9  
Antiguo 10-03-2015
CM6ISG CM6ISG is offline
Registrado
NULL
 
Registrado: feb 2015
Posts: 4
Reputación: 0
CM6ISG Va por buen camino
Saludos, disculpen por la demora en responder, es que he estado corto de tiempo.

bueno hise las prueba que me recomendaron ya que no logro que me funcione, aclaro que tampoco so muy esperto en programacion y estoy muy agradecido de ustedes por su efuerso

aqui va el codio que tengo montado ahora y debajo adjunto foto de los resultado espero que me puedan ayudar en esto Gracias una ves mas...


Código Delphi [-]
unit simulacion;
 interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, StdCtrls, CPort;

  type 
 TForm1 = class(TForm)  
 Memo1: TMemo;
 Edit1: TEdit;
 Edit2: TEdit;
 Edit3: TEdit;
 Edit4: TEdit;
 Edit5: TEdit;  
 Edit6: TEdit;  
 Label1: TLabel;   
 Label2: TLabel; 
 Label3: TLabel;  
 Label4: TLabel;
 Label5: TLabel; 
 Label6: TLabel;  
 Label7: TLabel;   
 Button1: TButton;    
 ComPort1: TComPort;    
 procedure ComPort1RxChar(Sender: TObject; Count: Integer);   
 private     { Private declarations }   
 public     { Public declarations }   
 end;  
 var  

 Form1: TForm1;  
 implementation  
{$R *.dfm}  

procedure TForm1.ComPort1RxChar(Sender: TObject; Count: Integer);   

var    
StrList: TStringList; 
Power, Qsl, Cadena, Modo, FTX, FTR, Str : String;  

begin    
ComPort1.ReadStr(Str, Count);   
Cadena:= cadena + Str;    
Memo1.Text:= Str;    
Edit1.Text:= edit1.Text + cadena;
StrList := TStringList.Create;
ExtractStrings(['#'], [ ], PChar(Str), StrList);
ShowMessage(StrList.Text); 


 {Power := StrList[0];
  Qsl := StrList[1];   
  Modo := StrList[2];   
  FTX := Copy(StrList[3],3,Length(StrList[3])); 
  FTR := Copy(StrList[4],3,Length(StrList[4]));    
  Memo1.Text := Str;    
  Edit1.Text := Str;     
  Edit2.Text := Power;    
  Edit3.Text := Qsl;    
  Edit4.Text := Modo;    
  Edit5.Text := FTX;    
  Edit6.Text := FTR; }     
  StrList.Free;    

end;  
end.
Imágenes Adjuntas
Tipo de Archivo: jpg primera ventana.JPG (28,4 KB, 3 visitas)
Tipo de Archivo: jpg Segunda Ventana.JPG (35,3 KB, 6 visitas)

Última edición por CM6ISG fecha: 10-03-2015 a las 00:55:04. Razón: Arreglando Etiqueta codigo
Responder Con Cita