From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital I/O Sampling Rate

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

 

0 Kudos
Message 1 of 2
(3,172 Views)

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.

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 2 of 2
(3,136 Views)