问题解决了!
问题在spcomm的设置。其Outx_XonXoffFlow:=false;
Inx_XonXoffFlow:=false;
问题就解决了。
下面是我翻译的两个属性,清大家指正。如有全部翻译的也请贴出来,大家共同学习。
outx_XonXoffFlow : Boolean
指定在发送期间XON/XOFF控制流是否有效。
如果其值为TRUE,那么当收到XOffChar时,就停止发送数据,而当收到
XonChar时又开始发送数据。
此值可以在串口已打开时重新附值。
| 收到Xoff | 收到Xon
---------+---------------------+--------------------------------
True | 停止发送 忽略Xoff | 重新发送 忽略Xon
---------+---------------------+--------------------------------
False | 读入Xoff | 读入Xon
Specifies whether XON/XOFF flow control is used during transmission.
If this member is TRUE, transmission stops when the XoffChar character
is received and starts again when the XonChar character is received.
You can change this value when the comm is open.
Action | Xoff received | Xon received
--------+--------------------+---------------------------
TRUE | stop transmission | resume transmission
| discard Xoff char | discard Xon char
--------+--------------------+------------------------------
FALSE | read in Xoff char | read in Xon char
Inx_XonXoffFlow : Boolean
指定在接收期间XON/XOFF控制流是否有效。
如果其值为TRUE,那么当输入缓冲区达到Xofflim所指定的值时,就发送XOffChar,而当
输入缓冲区被清空后又发送XonChar。
此值可以在串口已打开时重新附值。
| 收到Xoff | 收到Xon
---------+---------------------+--------------------------------
True | 停止发送 忽略Xoff | 重新发送 忽略Xon
---------+---------------------+--------------------------------
False | 读入Xoff | 读入Xon
Specifies whether XON/XOFF flow control is used during reception.
If this member is TRUE, the XoffChar character is sent when the
input buffer comes within XoffLim bytes of being full, and the
XonChar character is sent when the input buffer comes within XonLim
bytes of being empty.
You can change this value when the comm is open.
| input buffer comes within
+-----------------------------+------------------------------
Action | XoffLim bytes of being full | XonLim bytes of being empty
--------+-----------------------------+------------------------------
TRUE | Xoff char send | Xon char send
--------+-----------------------------+------------------------------
FALSE | do nothing | do nothing