08-07-2009 05:52 PM
I'm trying to get the analog input working for a 6221. The board is on a Windows CE machine, so I can't use the DDk drivers. Instead, I have written my own driver that allows me to read/write the registers directly. I tested the digital I/O, and had no problems getting it to work, so I moved on to analog input.
For analog input, I used the method in aiex1.cpp, but I had to write my own code, because of the way my driver works(it's a stream driver, so I'm using lots of seeks and read/writes). I believe I ported aiex1 without any obvious mistakes (although who knows...), however, when I run the program, all I get from the data FIFO is 0x0007FFFF (the maximum value).
My input is a function generator creating a square wave from +7V to -7V at a bit less than 1Hz (so I don't think I'm having sampling issues). The signal is input on pin 68, with the ground on pin 67.
I've looked at the status registers (joint_status 1 & 2 and ai_status_1) a bit, but I'm not really sure what I should be looking for.
Does anyone have any general ideas for debugging this? Any tricks I should be aware of?
I tried changingAI_Output_Control.AI_CONVERT_Output_Select to kAI_CONVERT_Output_SelectActive_High (3) as discussed here:
http://forums.ni.com/ni/board/message?board.id=90&message.id=1041&query.id=1471127#M1041
but it didn't have any effect.
08-10-2009 02:27 PM
09-02-2009 01:49 PM
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
09-02-2009 04:19 PM