Showing results for 
Search instead for 
Did you mean: 

Possible to buffer DI with 6221 board?

Go to solution


Just curious if with DAQmx I could monitor multiple DI lines (for instance Dev0/port 1/line0:7) at a rate of 100 hz, but buffer the reads so in software I only had to loop at, say 10 hz and could read an array of 10 samples at a time. So, I'd get a 2d array of 8 lines (rows) by 10 columns (samples). Or are DI reads purely software timed? Basically, the DI equivalent of N channels, N samples for analog input.

0 Kudos
Message 1 of 6

I believe you could do an N channels N samples on the digital input since the specs. seem to show a 1 MHz maximum clock rate for digital I/O.

Message 2 of 6
Thanks I figured I may be able to but couldn't test it because I don't have the hardware available. In the mean time I decided it wouldn't hurt to ask. Processing becomes slightly different whether I can or can't so I was trying to avoid any rewrites if I were to guess wrong as far as board capabilities. I suppose my best bet is a test vi when I get the hardware so I can get a definite answer. Thanks.
0 Kudos
Message 3 of 6
Accepted by topic author GregFreeman

I think I did this once with an 6221, but not sure, maybe I was using an AI channel.

On these cards, not all ports will work. NI calls this digital waveform (aquisition). While you can use the PFI port (counters) for static DIO, they don't support waveform DIO. The other 2 ports should work.



Message 4 of 6

Thanks, Felix. After you mentioned waveform, I went and looked for digital waveform examples and found correlated dig read with counter. That VI looks at a digital waveform of lines 0-3 on a single port, so I pretty much just used that logic. I will mark a solution once I verify this truly does what I want. Also, I believe we do use the PFI lines, but only at 1 hz so we can do single point in software.


0 Kudos
Message 5 of 6

Now that I know what digital waveform generation refers to, a simple read of the 6221 manual tells me the following:


M Series devices support the following DIO features on Port 0:


• Up to 32 lines of DIO

• Direction and function of each terminal individually controllable

• Static digital input and output

• High-speed digital waveform generation

• High-speed digital waveform acquisition

• DI change detection trigger/interrupt


0 Kudos
Message 6 of 6