For Newbie

Tuesday, 23 August 2011

Serial Communication Between 2 Personal Computer On Borland Delphi 7 Using Comport Component : Send serial data

 

Send Data application: the function of this application is as serial data delivery to serial port , such as COM1. COM2, COM3, etc.
1. Enter the component as follows, The following is component that is used: 

No Component Property Value
1 Form 1 Caption Send Data Serial
2 Groupbox1 Name Send Data Serial
3 Button1 Caption Send data
4 Button2 Caption Connect
5 Button3 Caption Set Serial
6 Button4 Caption Close
7 Label1 Caption Type data here
8 ComPort1 - -
9 Memo1 Lines -



Before type the source code, declare a variable named data



Figure . Serial Communication  Between 2 Personal Computer On Borland Delphi 7 Using Comport Component : Send serial datadeclare global variable named data

type source code as follows

No Komponen Event SOURCE CODE
1 Button1 OnClick Data := Memo1.Text;

ComPort1.WriteStr(data);
2 Button2 OnClick ComPort1.Open;
3 Button3 OnClick ComPort1.ShowSetupDialog;
4 Button4 OnClick Close;
5 Form1 OnCloseQuery atau dapat juga

OnDestroy
comport1.Close;


 
Figure. Serial Communication  Between 2 Personal Computer On Borland Delphi 7 Using Comport Component : Send serial dataVisualization of send data serial application design

The following is the result of Screen Shoot when application is used
 

Figure. Serial Communication  Between 2 Personal Computer On Borland Delphi 7 Using Comport Component : Send serial dataVisualization of send data serial application

 I hope this article can give benefit to the visitors, readers, developer and me. Thanks for visiting and availability for sharing this article by pressing 
Share this on Facebook
or just press like button under this posting

Share on Facebook
Share on Twitter
Share on Google+

Related : Serial Communication Between 2 Personal Computer On Borland Delphi 7 Using Comport Component : Send serial data