• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

START=ANY DATA, STOP=CHR(13)

Started by MTZOVARAS, February 06, 2009, 12:17:19 pm

Previous topic - Next topic

MTZOVARAS

Hello,

how can i define a packet that starts with the first character received (any character) and stops with chr(13) ?

Minas Tzovaras

Roman Novgorodov

Hello

After installation nrComm Lib you can find "{nrComm_Home_Folder}\Demos\SimplePacket\SimplePacket.dpr" project. It shows a simple way how you can detect a data packet by fixed end char sequence.

Another way is using the TnrDataProcessor component.
Unfortunately the Object Inspector does not allow to enter invisible chars (#13, #10) in design mode for string properties of DataPacket.

But you can initialize the needed properties at runtime before open serial port:

nrDataProcessor1.DataPackets[1].PacketEnd := #13;

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.