Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI 6534 Output and Input

Hello All

This is a problem related (possibly) to an earlier ongoing question. I now have a loaned 6534 Digital I/O device and I have written a basic program using Ni-Daq and Visual C++ to output a pattern from port A, and using the two REQ pins connected together, input data from port C. I have attached the core part of the code. The problem is there seems to be nothing acquired on the input port. I can take the lines of the port high and yet I still get zero in the input buffer..... Am I doing something wrong?? Like I said earlier this is related to an earlier problem but I thought it might warrent a new posting. The output pulses can be seen on a scope as can the REQ pulses that should, in theory, be firing the input.... but n
othing happens..... help...... If I check the input port for remaining tranfers the system just hangs as if nothing is ever being acquired.... Is it a DMA issue, an install issue????

Any help would be gratefully appreciated

Jamie
0 Kudos
Message 1 of 2
(3,239 Views)
Hi Jamie,

I've been working on a couple issues myself with the 653x boards and I have a couple examples that might help you out.

The first example is a CVI program (uses NI-DAQ function calls) to output a pattern from one port and read that pattern in on the other port. This is done as you mentioned above (tying the two different REQ lines together for the different groups). This example uses the onboard buffer to loop through the output pattern.

The second example, I wrote based on your earlier question about the DAQCard 6533. This example writes out of one port and reads in on another port. Same functionality except this program uses interrupts (no DMA for DAQCards) and I reversed the edge I am sampling with. I am outputting on the ris
ing edge and I am sampling/inputting on the falling edge. This guarantees that my data is still valid. Otherwise, I could have a "race" condition in which data bits are changing before I had a chance to sample it.

Anyway, these examples are still rough around the edges but they should do the trick. Also, if you want to change the clock rate used by these examples, you will have to adjust the DIG_Block_PG_Config function to adjust the internal timebase and the multiplier. You might also have to play around with the buffer size and the transfer sizes before it is optimized for your system.

Anyway, hope that helps. Have a good day.

Ron
Applications Engineer
National Instruments
Download All
0 Kudos
Message 2 of 2
(3,239 Views)