02-11-2011 07:46 AM
Hi All,
I'm trying to sample the Digital I/O port at 10 kHz and I seem to be unable to do so.
I have a DAQPad-6020E and I'm using DasyLab with the Traditional NI-DAQ v7.4.4 driver.
In the hardware setup dialog box, I have the AI clocked to the hardware clock running at
10 kHz. The Digital Input tab allows only software clock mode but I have two choices:
1) PC Clock (55ms) or 2) Analog Input. I assume option 2 somehow ties the sampling
to the analog input hardware clock but my testing doesn't bear this out.
I connect a function generator to both the analog input and the digital input and write the
sampled values to the a file. The file shows the AI properly sampling a 250 Hz signal
but the digital input is not.
Is there any way get a hardware clock based sampling of the digital I/O port?
Is my problem a limitation of the hardware, driver, software, or operator error?
Thanks in Advance.
John Wetzel
02-15-2011 09:26 AM
John,
When you use the DASYLab settings to tie the Digital Input clocking to the Analog Input, it doesn't run the Digital I/O as fast as the Analog Input. It can't unless the DIO is hardware clocked. What it does is sample the DI once every block, and then outputs a full block of data with just that value, timed to match the Analog Input channel. The update rate is then once per block.
Software clocked subsystems typically cannot be sampled at faster than 100 Hz. You can do some testing, by reducing the block size to 1, and then trying sample rates from 10 to 100, to see what the DAQpad-6020e will sustain.
If you need high-speed DIO, then you should look at newer devices. There are a number of USB devices that clearly specify the DIO sample rate. For example, the NI-USB-6341 clearly states "24 digital I/O lines (8 hardware-timed up to 1 MHz)".
In summary... limitation of hardware.