Home > Back-end >  Mscomm serial port receive data
Mscomm serial port receive data

Time:09-22

Each greatly:

Is now developing a program from a device through the data on the RS232 receiving equipment, I am using MSCOMM control, and then put the receiving and the data in Memo controls, but a condition:
In theory should be display to:
@ O/S TEST... OK#
@ CONDUCTANCE TEST... OK#
@ COMPONENT TEST... OK#
@ INSUL TEST... OK#
@ #



Results finally displayed on the memo controls into the following




@ O/S TE

ST...

.


. OK#

@ CONDUC
TANCE TE

ST...


. OK#



@ COMPON

ENT TES

T......
. OK#


@ INSUL

The TEST...
.

. OK#



Excuse me, how to solve to display the appearance of the theory to

CodePudding user response:

Have not used MSCOMM

Speculation is not set up the control parameters, the length of a frame of data

CodePudding user response:

Terminator #, this data could be judged by the ah, a serial port receives the data cache first, and then find # character, and then, according to
In all can't, according to the serial port to receive direct serial ports have a newline.

CodePudding user response:

Try the BufferLength adjustment under control

CodePudding user response:

RThreshold: through this property is set to produce OnComm event
If MSComm1. RThreshold:=0, do not produce OnComm event,
If MSComm1. RThreshold:=X, receive buffer every X bytes are received, OnComm event occurs in
Data would have adhesion, still need to say by jankercsdn cache first, and then processing

CodePudding user response:

Take a look at receive data processing

CodePudding user response:

First open a Buf cache data, with # array processing, extract the data again, according to a serial port receives no word wrap functions

CodePudding user response:

What kind of MSComm, Delphi spcomm or API to write my own use a very simple also, ocx still have to register, too much trouble, and is not working

CodePudding user response:

After the cache data, to display
  • Related