找回密码
 注册
Simdroid-非首页
查看: 1628|回复: 18

[积分贴存推荐] 【求助】LabVIEW中怎么实现串口通信控制阿 +5.5

[复制链接]
cosinfu 该用户已被删除
发表于 2002-12-23 10:48:43 | 显示全部楼层 |阅读模式 来自 清华大学
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2002-12-23 11:26:02 | 显示全部楼层 来自 吉林吉林

回复: 【求助】LabVIEW中怎么实现串口通信控制阿

Simdroid开发平台
串口通信的例子好像很多,建议先参考一下LV中的例子Serial Communication.vi
cosinfu 该用户已被删除
 楼主| 发表于 2002-12-23 12:05:00 | 显示全部楼层 来自 清华大学
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2002-12-23 13:58:54 | 显示全部楼层 来自 上海普陀区

回复: 【求助】LabVIEW中怎么实现串口通信控制阿

在LV里面只能对rts进行设置,而不能对cts进行设置。只能读取cts的状态。具体是在property node->visa class->ie session->serial instr下面的modem line setting里面可以看到。
在CVI里面可以对cts进行设置,用SetCTSMode function。如果在LV里面一定要做,可以用cin或者dll做吧。

评分

1

查看全部评分

发表于 2002-12-23 14:00:28 | 显示全部楼层 来自 上海普陀区

回复: 【求助】LabVIEW中怎么实现串口通信控制阿

不好意思,我说错了,SetCTSMode不是用来直接设定cts电平的。sorry all
发表于 2002-12-23 16:12:04 | 显示全部楼层 来自 吉林吉林

回复: 【求助】LabVIEW中怎么实现串口通信控制阿

请参考:
Problem: How can I control the DTR and RTS serial lines in LabVIEW?
  
Solution: To control the DTR and RTS serial lines, place a VISA Property Node on the block diagram and select any of the Modem Line Settings properties to read or write individual control lines.
  
LabVIEW 6.x
Complete the following steps to place a VISA Property Node on the block diagram and select the Modem Line Settings:
  
Place a Property Node (Functions Palette » Instrument I/O » VISA » VISA Advanced) on the block diagram.
  
Right-click the Property section of the Property Node.
  
Select Properties » Modem Line Settings.
  
Select the appropriate setting (Line CTS State, Line DCD State, Line DSR State, Line DTR State, Line RI State, or Line RTS State).
  
LabVIEW 5.x
Complete the following steps to place a VISA Property Node on the block diagram and select the Modem Line Settings:
Place a Property Node (Functions Palette » Instrument I/O » VISA) on the block diagram.
  
Right-click the Property section of the Property Node.
  
Select Properties » Modem Line Settings.
  
Select the appropriate setting (Modem CTS State, Modem DCD State, Modem DSR State, Modem DTR State, Modem RI State, or Modem RTS State).
  
Note: You may only read from or write to the DTR and RTS serial lines. The other serial lines (listed above) are read-only. To change the DTR or RTS serial line properties from read (default) to write, right-click on that property and select Change To Write from the pop-up menu. To change the property back to read, right-click on that property and select Change To Read from the pop-up menu.
发表于 2002-12-24 11:04:15 | 显示全部楼层 来自 上海普陀区

回复: 【求助】LabVIEW中怎么实现串口通信控制阿

这是ni的knowledge base吧?厉害!
cosinfu 该用户已被删除
 楼主| 发表于 2002-12-24 11:39:35 | 显示全部楼层 来自 清华大学
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2002-12-24 15:25:37 | 显示全部楼层 来自 吉林吉林

回复: 回复: 【求助】LabVIEW中怎么实现串口通信控制阿

ie_lynch wrote:
这是ni的knowledge base吧?厉害!

对,其实如果能把NI WebSite上的东西结合实践消化一下,成为"高手"就是a piece of cake.
发表于 2002-12-25 11:00:02 | 显示全部楼层 来自 广东深圳

回复: 【求助】LabVIEW中怎么实现串口通信控制阿

请问上面那些英文资料从什么地方可以找到啊?具体是什么子目录下?
谢谢!
发表于 2002-12-25 15:53:33 | 显示全部楼层 来自 吉林吉林

回复: 【求助】LabVIEW中怎么实现串口通信控制阿

http://www.ni.com/support/troubleshooting.htm
www.ni.com上其实都是宝
rainsunny 该用户已被删除
发表于 2003-1-6 13:08:10 | 显示全部楼层 来自 湖北武汉
提示: 作者被禁止或删除 内容自动屏蔽
hanyundong 该用户已被删除
发表于 2003-1-14 14:41:52 | 显示全部楼层 来自 辽宁大连
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2003-3-11 15:19:49 | 显示全部楼层 来自 LAN

回复: 【求助】LabVIEW中怎么实现串口通信控制阿

你们对串口读取的时候是不是从PC的串口直接读取啊?
还是要从NI自己公司的串口通讯卡来读取呢?
能不能直接读取PC的串口呢?
谢谢大虾们,给我个准确答案,不胜感谢!
我的email:cnelf@sina.com
Dar 该用户已被删除
发表于 2003-3-11 15:37:02 | 显示全部楼层 来自 台湾
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2003-3-11 15:45:53 | 显示全部楼层 来自 LAN

回复: 【求助】LabVIEW中怎么实现串口通信控制阿

呵呵,这个我知道,我现在就想知道有没有人作过用Labview编写的程序来读取PC机上的串行口COM1/2输入的数据,这样做能不能实现。我查过了NI公司的基于PCI的串口通讯卡要$325,好贵啊,我想不用扩展卡是不是能够实现呢?谢谢Dar大哥了。
sunyuan66 该用户已被删除
发表于 2004-6-24 09:17:54 | 显示全部楼层 来自 天津河西区
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2004-6-24 16:35:07 | 显示全部楼层 来自 北京

回复: 回复: 回复: 【求助】LabVIEW中怎么实现串口通信控制阿

Dar wrote:
[quote]cnelf wrote:
你们对串口读取的时候是不是从PC的串口直接读取啊?
还是要从NI自己公司的串口通讯卡来读取呢?
能不能直接读取PC的串口呢?
谢谢大虾们,给我个准确答案,不胜感谢!
我的email:cnelf@sina.com

  
IBM 當初在制定 PC 的時候只為 PC 預留四個 Com Port 也就是佔用 0x3F8,0x2F8,0x3E8,0x2E8 ,等位址.這是相當物美價廉的 Bus 在工業界行之有年如果超過四個埠,你必須另購如 NI,MOXA 等 RS-232 擴充卡來擴充. [/quote]
  
Dar 說的很清楚了吧﹐超過4個才要擴展卡﹐labview 可以直接對com口操作的。用visa就可以了。
发表于 2007-4-17 18:56:05 | 显示全部楼层 来自 江苏无锡
谢谢
辛苦了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-4-28 08:20 , Processed in 0.077283 second(s), 18 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表