07-20-2009 02:00 PM
07-20-2009 02:57 PM
07-20-2009 05:15 PM
I have one more piece of information about this problem. The NI PCI-6221 card was mounted on a PCI-X slot. I have just moved it to a regular PCI slot and apparently my program is working properly now. I still have to do more tests, but one could say that NI driver does not support a PCI-X slot. Does it make sense?
This particular PC has just two PCI slots: one regular and one PCI-X. The other slots are PCI-express. I have to install a huge PCI board in this PC that only fits in the regular PCI due to its size. So the only slot left to the NI board is the PCI-X slot, where it does not work. Does anyone knows about a driver that would work on a PCI-X slot? Or some other way to fix this?
07-20-2009 06:18 PM
Will a National Instruments PCI Board Work in a PCI-X Bus?
The above link might not help at all but I would recommend contact National Instruments directly to inquire further.
07-20-2009 09:11 PM
Hi sentieri,
To say the least, this is very interesting behavior--your 6221 should be able to function properly using the PCI-X bus. The error you are receiving is indicating that samples are not being transferred fast enough to the 6221. I would recommend taking a look at the suggested workarounds in the following thread:
In your case, it sounds like you should be able to regenerate from the on-board buffer without any problems; the on-board buffer can hold 8191 samples shared between channels. In the C API, you would use the following function to configure the device in this way:
DAQmxSetAOUseOnlyOnBrdMem(TaskHandle taskHandle, const char channel[], bool32 data);
This should bypass the DMA buffer in your computer and write data directly to the on-board FIFO, eliminating the need for the continuous transfers in the first place. It should be viable for any periodic or finite signal that can fit entirely in the on-board memory buffer. For larger signals, I would try the other two workarounds mentioned in the above thread.
This problem only seems to appear under very specific circumstances on certain motherboards. If the DMA controller cannot transfer the data quickly enough, the on-board buffer on the device will run dry resulting in the error. We will continue looking into the matter, but I would also try contacting your computer manufacturer to see if they can offer any additional insight (or BIOS updates, etc.). I hope this proves to be helpful. Thanks for posting!
-John
07-21-2009 05:18 PM
Thanks for the information.
I am new to National Instruments devices. I did not find too much documentation about DAQmxSetAOUseOnlyOnBrdMem. I am using it just after DAQmxCreateAOVoltageChan and before DAQmxCfgSampClkTiming (steps 2 and 3 of my first post). I am calling the function using the syntax “DAQmxSetAOUseOnlyOnBrdMem (taskh, NULL, true)”. Could you please tell me if that is what I am supposed to do? Does NI have an official documentation about this function? The documentation that comes along with the card driver seems to be very short regarding to this function, which does not show up under the “NI-DAQmx C Functions” tab in the “NI-DAQmx C Reference Help”.
07-21-2009 05:34 PM
Hi sentieri,
The function is actually listed under the NI-DAQmx C Properties tab in the Reference Help. For your convenience, here's a screenshot from the DAQmx C Reference Help:
Instead of NULL, the second input should be the channels that you want to set to use only on-board memory. I hope this helps,
-John