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

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

labview 如何控制多个串口

大家好!

      我使用labview 自带的实例,成功实现了数据的写入和读出,但是每次只能操作一个串口,

我手上有几块MOXA的多串口卡,希望能实现同时发送和读取数据包.

请问:同时操作8个串口,应该如何配置呢?

 

0 项奖励
1 条消息(共 6 条)
6,956 次查看

You may use multiple loops i.e. each loop for one port communication.

 

PS: I used to have one similar program talking to four ports i.e. 4x uPs. Queue event structure may be used.

 

 

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
2 条消息(共 6 条)
6,931 次查看
能提供实例给我参考一下吗,谢谢!
0 项奖励
3 条消息(共 6 条)
6,851 次查看

There are many ways to achieve that.

 

Attached example of two loops is just one of many ways. You may rename the VI and modify it to suit your needs i.e. adding more loops.

 

PS: Sorry that it is not appropriate/ inconvenient to give you the actual codes of the 4-ports independent communications with uPs.

Message Edited by ian fung on 03-22-2010 09:39 AM
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
4 条消息(共 6 条)
6,788 次查看

有个笨办法,用轮循的方式,让多个串口分时读取,缺点是严重影响效率。
0 项奖励
5 条消息(共 6 条)
6,335 次查看

请问,用什么方式实现轮询较好

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