deneshneupane-5739 avatar image
0 Votes"
deneshneupane-5739 asked YujianYao-MSFT commented

Data loss while received from serialport.

I am trying to send the (x, y) co-ordinate to a CNC machine using the SerialPort. The co-ordinates will upload by user which is around 30-200 lines. While sending the co-ordinates less than 40 lines. All the data are received on the CNC machine . if the number of the exceeding from 50 .. some data received with loss of some digits mention below.. here X is loss in received data .

data send

data received

i cannot figured out the problem .. is it a application error ???

if (this->serialPort->IsOpen)
{ String^ txt = richTextBox6->Text;
if (richTextBox6->Lines->Length > 0)
serialPort->Write(header + "\x25" + "\x0A"+ "O00000010"+ "\x0A" +" "+"\x0A" + "(from pc) "+ "\x0A" + txt + "\x0A" + "\x25" + header);

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Does it happen with particular line only?

How did you observe the problem?

0 Votes 0 ·

Hi @deneshneupane-5739,

According to your description, data loss only occurs when the sent data exceeds 50 lines. How was the problem of data loss discovered? Why did you choose to provide this code? Could you please provide other code that may go wrong? By the way, I suggest you check the maximum throughput and buffer size of your hardware facilities.

0 Votes 0 ·

0 Answers