Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Interruptions when I use "Write" and "Read" in the same vi.

When I use "Port Write" and "Port Read" together in the same vi and I set the output to be high level, the signal becomes oscillatory. I have read one anterior message about similar problem (using "Write to Digital Line" and "Read from Digital Line" instead of "Port Write" and "Port Read") and I proceeded as the solution suggested in the answer. However, it didn´t work.
Attached, I am sending the vi I used to test the solution.
How can I fix this problem?
0 Kudos
Message 1 of 3
(2,468 Views)
Germano,

What device are you using? If it is a device with the 8255 PPI (NI 6503, NI 6507, etc.), configuring one port on an 8255 resets all of the chip's ports. Thus, you should call DIO Port Config.vi for each of the ports at the beginning of your program. The KnowledgeBase linked below includes more information concerning this topic:

Why Do All My Digital I/O Ports Reset When I Configure One Port?

Good luck with your application.

Spencer S.
0 Kudos
Message 2 of 3
(2,468 Views)
Hi Spencer!

The device I am using is a PCI6024-E board. I have contacted the NI Suport and now I see what I was doing wrong: in fact, I was calling a DIO Port Config.vi for each of the ports ("Port Read" and "Port "Write"), but it was done inside of a While loop (usually, most of the applications here in the lab are recursive, so it´s common for us to use big while loops for the whole program). Putting them outside (as you said, at the beginning of the program), it worked! Actually, I can´t see any reason for the program to work when the calling is outside the loop, but the important is that now it´s running properly.
Thanks a lot, Spencer!
0 Kudos
Message 3 of 3
(2,468 Views)