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

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

串口通信问题,急寻解答!

I thought your initial problem was unable to receive return data correctly and steadily? Was it solved?

 

"现在还是不能做到发送命令与接收数据的同步" Is this your another problem? How do you want it to be "发送命令与接收数据的同步"? If you do not send the command first, how do you expect the return bytes?

 

May I suggest that you build the VISA Write and Read code into sub-VI, and call it for each event case.

Message Edited by ian fung on 01-11-2010 02:50 PM
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
11 条消息(共 13 条)
2,222 次查看

不好意思,可能是我没表达清楚。我所说的不同步 的意思是说发送合闸命令后不能立即得到下位机传上来的合闸数据,

 

上一贴的意思就是说,照您的建议修改后,最初问的那个问题还是没有解决

 

谢谢!Thank you!

 

0 项奖励
12 条消息(共 13 条)
2,218 次查看

Hi, as suggested, you might want to build the VISA write and read portion into a sub-VI. Then, at each event case, call the sub-VI once.

 

Please verify with HyperTerminal on each Command sent (including if there is any Termination Character), expected time delay after command is sent (i.e. the closure of the gate may take some time?), and expected no. of return bytes etc.

 

I am only able to help in suggesting possible ways of VISA Write/ Read. As for the verification on the Command(s), Termination Character, Return Bytes etc, I'll leave it to you, since I am not able to see your actual system running.

 

Please perform some code debug (highlight execution), and I am sure you can achieve!

Message Edited by ian fung on 01-11-2010 03:32 PM
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
13 条消息(共 13 条)
2,216 次查看