From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
|
CommPort |
这个属性用于设置和返回正在使用的串口。 |
Settings |
这个属性包含了一个指定串口通信设置的字符串。 字符串按照格式 “波特率,奇偶校验,数据位,停止位”. 例如字符串 “9600,N,8,1”; 相当于设定 9600 波特率, 无校验, 8位数据位, 和一位停止位 |
Handshaking |
这个属性用于设置通信时的握手模式, 当应用它时,一份常量的列表将出现。 |
InputLen |
这个属性用于设定输入属性被访问时每次读取的字符数。将这个属性设为0将告诉MSComm读取所有数据。 |
PortOpen |
这个属性可以被用于设置或得到串口的状态。用这个属性可以打开或关闭串口。 |
Input |
访问这个属性的读数 InputLen 缓冲区中的比特数然后把它们从缓冲区清空。 |
Output |
设置这个属性给串口一个命令。 |
InBufferCount |
这个属性返回当前在缓冲区中的比特数。 |
InputLen
= 1 一次读一个字符,并且检查分隔符。 如果它不是分隔符你可以将它加入缓冲区。如果放入while循环,可以排除时间因素并且去分析数据。
|