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

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

labview串口报错

我在用计算机串口将无线模块接收到的数据读到labview中,之前一切正常,后来我加大了无线发送端的速度,labview就报错:"A framing error occurred during transfer." 而且好像读出的数不对了,有乱码。连续继续几次后计算机就会死机。可是用windows xp自带的超级终端一切显示正常,不知道为什么。我的无线模块向串口发送的是一个4位16进制的数,以"/n"结尾。想请教一下解决方案,谢谢!
0 项奖励
1 条消息(共 5 条)
5,644 次查看
检查你的数据读取和处理程序, 最好是分开. 另外, 是不是有缓冲或TIME RACING 问题. 
0 项奖励
2 条消息(共 5 条)
5,632 次查看
谢谢楼上,能不能说详细一点,如何检查缓冲和time racing?
0 项奖励
3 条消息(共 5 条)
5,621 次查看
It is better to put at least part of you code here if it is not for secruity reason. 
 
Suggestion: every time after you read the serial port, add one more function to clear the port, LV VISA provides such function.  Then see if the problem is still there.  Or everytime, before you read the serial port, make sure you read all information in port.  Also, check the hardware, not sure what kind of wireless transfer hardware you used. cannot say anything.
 
As for buffer and time racing, this need debug you software design.  
 
4 条消息(共 5 条)
5,610 次查看
我把初始化放到了while结构之外,加入了设置缓冲区和清空缓冲,问题解决!感谢michengla的热心帮助!
 Thank you very much, michengla!

帖子被hengfo在07-03-2007 08:12 PM时编辑过了

0 项奖励
5 条消息(共 5 条)
5,595 次查看