01-28-2009 08:43 AM
Hello everybody,
I have to test differents cards with the MHDDK.(6509,6703 and 6220).
The examples supplied by Ni works good for the two first cards but I have some problemes for the MSeries 6220.
The example aiex1 seems to be different from the others.
The problem is that my device isn't recognize(error accessing the PCI device).
The example aiex 1 contains just the test function (where is the acquire board?????, where is the initMite function????)
So I create a new aiex1 with the function initMite and the main that contains acquire board and in which I call the test function.(like aoex1 for the 6703)
But I think there is a problem in the acquire board ( what is the Id number for the PCI 6220?). I found the id number 70b0. Is it right???
Someone could help me??
Thanks you
Best regards
Stephanie
01-29-2009 09:49 AM - edited 01-29-2009 09:50 AM
Hi Stephanie-
You can view the file main.cpp to find the initMite and acquireBoard functions. Each of the device examples has a test() function which main.obj links against to create the individual executables. You should not need to create a new aiex1.cpp that includes initMite and acquireBoard.
0x70B0 is the correct product ID for the PCI-6220, but you should not need it to run the examples. Locate the bus and device numbers for your board by viewing /proc/bus/pci/devices and /sys/bus/pci/devices. The entries will be listed in the same order in both, so you can find the product ID in /proc/bus/pci/devices and then locate its bus and device numbers in /sys/bus/pci/devices. See chapter 12 of Linux Device Drivers, Third Edition for more information about these entries.
Then you just need to edit main.cpp to reflect the bus and device number (PXI::<bus>::<device>) and it should work.
01-30-2009 10:35 AM
It works
Thanks you
01-30-2009 10:50 AM
Now I have an other problem with my MSeries 6220.
I can read a value on the input I want. But I don't understand why when I connect my ai0 to trhe ground(0V), I read -558 with the read register and not 0
I try different value. It seems to be good with the offset -558.
Normally -10V ==> -32768
0V ==> 0
10V ==> 32768
but in my case its -10V==>-33326
0V==>-558
10V==>3221001-30-2009 10:57 AM
Hi Stephanie-
M Series devices return uncalibrated data. The scaling algorithm (see scale.cpp) applies third-order polynomial correction to calibrate out offset, gain, and other errors in the system. Raw binary data read from M Series ADCs is not particularly useful. Do you read approximately 0V when you scale the data as shown in the AI examples?