From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.



一台计算机上的两个GPIB设备如何通信?



主要软件: Driver Software>>NI-488.2
主要软件版本: 2.2
主要软件修正版本: N/A
次要软件: N/A

问题:
安装在一台计算机上的两个GPIB设备,能否实现GPIB0到另一个GPIB1的通信呢?


解答:
下面讨论的这个例子显示了如何实现同一台电脑上的两个GPIB设备之间的通信。我们将使用AT-GPIB/TNT+作为控制器,一个PCI-GPIB作为非控制器。这些板卡的专项配置如下:
  • AT-GPIB/TNT+: GPIB0, PAD = 0, SAD = None, 控制器 (查看下面的附件图示 AT-GPIB_TNT.jpg 参考截图)
  • PCI-GPIB: GPIB1, PAD = 1, SAD = None, 非控制器(查看下面的参考截图PCI-GPIB.jpg)
这个例子中,我们将使用两个IBIC(仪器总线交互控制)句柄,一个用于控制器(GPIB0),另一个用于非控制器(GPIB1),你可以通过MAX或者开始菜单启动这些引用。我们然后连接GPIB0到GPIB1,就把GPIB1假想是一个设备(dev1)。
IBIC on GPIB0: IBIC on GPIB1:
ibfind gpib0 ibfind gpib1
ibsic (make sure the CIC flag is up*)  
ibrsc 1  
ibsre 1  
ibfind dev1  
ibwrt "Message from GPIB0"  
  ibrd 18
  ibwrt "Message from GPIB1"
ibrd 18  

* 如果这个Controller-In-Charge (CIC)标志没有建立,那么可能是由于GPIB1设备被设为了系统控制器。为了解决该问题,拔下连接到第二块板子的电缆,在IBIC for GPIB0中输入下面命令
ibfind gpib (if not already entered)
ibrsc 1
ibsic (at this point, the CIC flag should pop up)
现在重新连接起GPIB1.

ibsic
这一次,CIC标志应该会显示,意味着现在这块板子是CIC。


相关链接:

附件:



PCI-GPIB.jpg - PCI-GPIB.jpg
AT-GPIB_TNT.jpg - AT-GPIB_TNT.jpg


报告日期: 06/28/2000
最近更新: 01/30/2011
文档编号: 1YRA63ZT