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.
Solved! Go to Solution.
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.
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.
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.
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