Why Do I Lose the Data on Ports 2, 3, and 4 of a PCI-6025E When Reconfiguring Port 0 in Visual Basic?Hardware: Multifunction DAQ (MIO)>>E Series>>PCI-6025E
Problem: I am trying to use Port 0 of the PCI-6025E card to do digital input while Ports 2, 3, and 4 are configured for output. I am using Visual Basic and Measurement Studio:Tools for Visual Basic to control my card. I have one digital input/output (DIO) control on my form. On the property panel of the DIO control, I have Port 0 configured for input and Ports 2, 3, and 4 configured for output. Everything works as expected until I reconfigure Port 0. When I reconfigure Port 0 for output, I lose all the information on Ports 2, 3, and 4. The programming call that I make to reconfigure the port is:
I thought this call would only reconfigure port 0 since I denoted only Item(0). Why does this happen and what can I do to avoid this?Solution: On this card, Ports 2, 3, and 4 are controlled by the 8255 chip, while Port 0 is controlled by the DAQ-STC chip. Port 0 can be reconfigured repeatedly without affecting the other ports. Port 0 can be reconfigured repeatedly without affecting the other ports. However, reconfiguring any one of these ports (i.e. Port 2, 3, or 4) in the same control domain as Port 0 will reset all three ports (i.e. Ports 2, 3, and 4), due to the behavior of the 8255 chip. See the related links below for more details on this behavior. To reconfigure Port 0 without affecting the other ports, you need to use two DIO controls on your Visual Basic form: one for Port 0 and one for Ports 2, 3, and 4. For example, go to the property pages for the first DIO control and configure only Port 0 (leave the others ports unused). On the second DIO control's property page, configure Ports 2, 3, and 4 as desired. (Note that this workaround does not eliminate the 8255 behavior for Ports 2, 3, and 4.) Related Links: 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? Attachments:
Report Date: 12/10/2001 Last Updated: 02/13/2009 Document ID: 2G97KBV6 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
