本帖最后由 lyfkai 于 2014-08-28 13:14:55 编辑

解决方案 »

  1.   


        if (SendNewLineFlag) then // 发送新行
        begin
          ComPort.WriteStr(Edit_SendData.Text + #13#10);
          SendCount := SendCount + length(Edit_SendData.Text + #13#10);
        end
        else // 原始发送
        begin
          ComPort.WriteStr(Edit_SendData.Text);
          SendCount := SendCount + length(Edit_SendData.Text);
        end;改为
          ComPort.WriteStr(Edit_SendData.Text);
          SendCount := length(Edit_SendData.Text);
      

  2.   


    SendCount := SendCount + length(Edit_SendData.Text);
    这一句是用来计算发送了多少字节的数据的,对发送的数据没影响
      

  3.   

    串口设置都是用的默认的,英文收发是没问题的,听说delphi7之后就使用了unicode编码,估计是数据类型的问题,但还是没找到解决的方法