Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

register level programming NI-6034E

I am having difficulty with analog input. I can't seem to get Example 1 (single point acquisition) to work, as explained in the RLP manual (and source code aiex1.c). I am following all the steps, and included a sanity check whereby I send signals to the DIO pins and that works fine. This indicates to me that I have correctly mapped the PCI board and STC registers and that I am correctly implementing the windowed write. However, when I follow Example 1 and connect a voltage source to CH0 and query the FIFO for a value, I keep getting the same value over and over again no matter what I dial at the source. Does anyone have a piece of C code that factually works, or can anyone offer any hints?

Thanks!
0 Kudos
Message 1 of 4
(7,331 Views)
It looks like you are using the old RLP DOS based examples, but I could be wrong.  In any event, the Measurement Hardware DDK examples are newer and still maintained.  You can download examples for a number of board families and operating systems.  The examples are in C++, but aren't terribly complex. 
 
Question that might help:
- What hardware are you using?
- What operating system?
- If Windows, Linux, or Mac, why not NI-DAQmx (or Base)?
0 Kudos
Message 2 of 4
(7,328 Views)
I have followed the c++ examples from the DDK already. I got my hands on the old Mac code just to check. It took some time to understand the object code but I think I got it. The fact is that I can communicate with the DIO, so at least I'm half way there. The problem is in setting up the board for AI. Following the same direct and windowed write and read constructs (transliterated into C), and following their sequence of setup commands (and correlating their register offsets) I come up with nothing that makes sense. Everytime I query the AI_Status_1 register it comes up with 0x10, which means the AI_STOP_St bit is up, and apparetly the FIFO is neither empty nor full...!!. And the FIFO always gives me a value of 100, no matter how I tinker with the setup bits. The part of my code that performs this single point aquisition is and exact copy of the example.

I am trying this the hard way because I am writing a driver for IRIX running on an SGI Tezro. Therefore the PCI detection and mapping components of the code are particular to IRIX. The rest should follow exactly as in the exmples...

Thank you very much for your attention.

Marcelo
0 Kudos
Message 3 of 4
(7,323 Views)
Hi,

I can't think of anything os specific that would cause problems with AI.  Once you can read/write to the device, as you've done with DIO, programming any other subsystem in the device is os independent.  Do you have a simple code snippet showing how you are configuring the device?  I can't guarantee that I'll find anything, but I don't have any suggestions.

Diego
0 Kudos
Message 4 of 4
(7,288 Views)