I use CVI 5.0 and Traditional DAQ library.
Here is what I am trying to do:
1)write a pattern to port PA and hold
2)wait for a second
3)read a bit from port PB
The problem I have is that when I go to read the bit on port PB the data on port PA does not remain as set. I need PA to stay set as I read the bit on PB. I would put this in a loop and change PA then read PB, etc...
This is my first experience with NI DAQ devices. It seems like I need to pre configure the ports then do the reads and writes in my loop. I'm just not sure which functions to use for this.
Here is what I am doing now which clears PA upon the PB read:
//Write current pattern to port PA
error = WriteToDigitalPort (1, "0", 8, 1, p
attern);
//Delay for appropriate amount of time for "match found" bit to possibly set
Delay(.0025);
//Read bit from test port PB bit 0
error = ReadFromDigitalLine (1, "1", 0, 8, 1, &lum_bit);