Hi,
What is probably happening is that the ports are being reset. The 8255 chip used in the NI 6507 has 4 chips and if you read from a port on a chip before you configure the other ports on the chip, all the chip's ports will reset. I included a link to a knowledge base describing this below. However, you should be able to do the following:
iStatus = DIG_Prt_Config(iDevice, iPort0, iMode, iDir);
iStatus = DIG_Prt_Config(iDevice, iPort1, iMode, iDir);
iStatus = DIG_Prt_Config(iDevice, iPort2, iMode, iDir);
iStatus = DIG_Prt_Config(iDevice, iPort3, iMode, iDir);
iStatus = DIG_In_Prt(iDevice, iPort0, &iPattern);
iStatus = DIG_In_Prt(iDevice, iPort1, &iPattern);
iStatus = DIG_In_Prt(iDevice, iPort2, &iPattern);
iStatus = DIG_In_Prt(iDevice, iPo
rt3, &iPattern);
I haven't tried this code but it should do the trick. Let me know if this helps or not and I'll try testing it out on my board. Have a good day.
Why Do All My Digital I/O Ports Reset When I Configure One Port?
http://digital.ni.com/public.nsf/websearch/3E25A9780F2C48B986256120005AF098?OpenDocument
Ron