Hello,
I am trying to use the NI PCIe-6509 board to send/receive data on the I/O pins.
I have created two tasks - rx and tx - each with one pin. I also set the rx task to listen for changes with the DAQmxCfgChangeDetectionTiming function, to start sampling (continuously) at both rising and falling edge of the rx pin.
If I send the following sequence on the tx pin:
0 1 0 1
I receive the data on the rx pin as expected. However if the sequence is for instance
0 0 0 1
I only receive
0 1
If I set the sampling to Finite, and sampsPerChan to 4, I get an error for not enough samples available. The problem is that the DAQ driver is not detecting the consecutive 0's in both continuous and finite sampling modes. If I do not use the DAQmxCfgChangeDetectionTiming, it seems to sample the rx line every 15 or so ms, so I suspect that this is the way to go to capture all the data. This however means that I have to regularly parse the received data until I get a pattern so I know that a message has been received.
Ideally I would like to have the DAQ driver to start sampling on a rising/falling edge, and retrieving a number of samples every 15 ms from that point onward.
From what I am seeing it seems that when using the DAQmxCfgChangeDetectionTiming function it only samples on the edges. Is this correct, or maybe I am missing something?
By the way, for this specific board only these two sampling methods are available, correct?
Thanks