NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

串口数据读出错误

帮忙看看我的程序

为什么每次要读串口的数据时都出现这个错误-1073807253,有时候读出的数据是正确的。也有时候读出错误的结果或者读不出数据

写入的字符AE,8E,分别是我的串口设备启动和停止命令。十六进制字符。

02,为写入的查询命令,应该返回值0007 0000 ,也是十六进制字符。

用串口调试助手调试时,没有问题。

0 项奖励
1 条消息(共 19 条)
9,602 次查看
另外,串口设备除了读数据发生错误,写入时候,没有错误,也可以控制设备正常运转。只是不能读。不能通过反馈控制
0 项奖励
2 条消息(共 19 条)
9,601 次查看

请高手帮帮忙,看一下我的程序

 

0 项奖励
3 条消息(共 19 条)
9,525 次查看
串口读取的时候最好连续读几次,把读取的数据连接起来,串口读一次有可能没有完全把数据读出
4 条消息(共 19 条)
9,518 次查看

可是读出的数据是已经读完了的

没有遗漏啊

5 条消息(共 19 条)
9,506 次查看

你的现象有些怪

看程序结构并没有问题

而且你也串口通讯是正常的

 

所以很有必要看一下你的设备是不是串口有问题

另外就是有没有同时运行的其他串口相关程序与该程序冲突

6 条消息(共 19 条)
9,469 次查看

if 用串口调试助手调试时,没有问题。

and I have viewed enclosed sample, I comment the first delay is quite not enought, just 0.01s,

solution: attempt to modify all delay time to 300ms above.....

________________________________________________________


Try to make everything Automatic
0 项奖励
7 条消息(共 19 条)
9,461 次查看

谢谢轻风清雨的回复

我运行LABVIEW时,串口调试助手,max,等都是关闭的。没有冲突啊。

0 项奖励
8 条消息(共 19 条)
9,456 次查看

to Yukee

I tried modify all delay time to 500 ms.

but nothing changed.

the same error still happened.

0 项奖励
9 条消息(共 19 条)
9,455 次查看

reinstall ur Labview  and visa driver

may be something wrong with them

 

0 项奖励
10 条消息(共 19 条)
9,447 次查看