为什么使用Visual Basic对PCI-6025E的Port0编程时,Port 2、3、4的数据会丢失?



硬件: Multifunction DAQ (MIO)>>E Series>>PCI-6025E

问题:
我正在配置PCI-6025E使它的Port0工作在数字输入模式下而Port2、3、4工作在数字输出模式下。我使用Visual Basic和Measurement Studio工具去控制我的板卡。在DIO的属性面板上,我配置Port0到输入状态,Port2、3、4到输出状态。一切工作正常。
当我重新配置Port0到输出状态时,我失去了Port2、3、4的所有数据。我用来重配置端口的命令是:
CWDIO1.Ports.Item(0).Assignment = cwdioOutput
我认为这个调用只会对Port0有效,因为我的程序中调用的是Item(0)。为什么这个情况会发生,我又应该如何避免这个情况。
 


解答:
在这张卡上,Port2、3、4是由8255芯片控制,而Port0是由DAQ-STC芯片控制的。Port0可以在不影响别的端口的情况下被反复重配置。然而,根据8255芯片的工作特性,在同一个控制域中对下面的任何一个端口配置(Port2、3、4)会重启全部三个端口(Port2、3、4)。参考下面的相关链接以获得更多关于这个行为的信息。
假如需要在不影响其他端口的情况下重配置Port0,你需要在VB中使用两个DIO控件:一个是Port0另一个是Port2、3、4。举个例子,在第一个DIO控件的属性页中只配置Port0(其他port不配置)。在第二个DIO控件的属性页中配置port2、3、4。(注意这个做法不会消除Port2、3、4的8255芯片的行为)


相关链接: KnowledgeBase 266KK6YF: Can I Use a Pull-down Resistor to Set the Default State of the Digital Lines on my NI DAQ Device?
Product Manuals: E Series User Manual (February 2007)
KnowledgeBase 2L8E72P6: What Is the 82C55A and Which NI Products Use This Chip?
KnowledgeBase 0489FD8Q: Why Do All My Digital I/O Ports Reset When I Configure One Port?
KnowledgeBase 2UJFGV6I: What Is the Digital Output State of a DAQ Board After Reconfiguring a Port?,
KnowledgeBase 266KK6YF: Can I Use a Pull-down Resistor to Set the Default State of the Digital Lines on my NI DAQ Device?
Product Manuals: E Series User Manual (February 2007)
KnowledgeBase 2L8E72P6: What Is the 82C55A and Which NI Products Use This Chip?
KnowledgeBase 0489FD8Q: Why Do All My Digital I/O Ports Reset When I Configure One Port?
KnowledgeBase 2UJFGV6I: What Is the Digital Output State of a DAQ Board After Reconfiguring a Port?

附件:





报告日期: 12/10/2001
最近更新: 05/26/2015
文档编号: 2G97KBV6