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.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

pci-6221 pulse on port 0

How to acquire high speed digital input and generate high speed pulses on a pci 6221 card without using the counters in it 
kavi
0 Kudos
Message 1 of 2
(3,328 Views)

Hi Kavi,

The digital I/O on your M Series card does not have its own timing engine.  This leaves you with several options:

  • You can use the analog input sample clock to time your digital I/O if you do not need to use the device's analog input, or if the digital and analog acquisitions are clocked at the same rates.  In LabVIEW, you can use the DAQmx Timing (Sample Clock) VI to specify the AI Sample Clock as the sample clock source for the digital input or digital output task (for example, if your device is named Dev 1 you would specify the timing source as /Dev1/ai/SampleClock).  You would also need to create an analog input task, configure its sample rate, and then start the task in order to start the clock (note that even if you are not using the analog input you will still need to create and start a dummy AI task so that the AI sample clock will be running).
  • You can use the analog output sample clock to time your digital I/O if you do not need to use the device's analog output, or if the digital I/O and analog output are clocked at the same rates.  The implementation of this option would be analogous to the analog input implementation stated above.
  • You can use an external sample clock to time your digital I/O.  For this implementation you would connect the external clock to a PFI line on your device and then specify that PFI line as the timing source using the DAQmx Timing VI.
  • You can use the output of the internal frequency generator to time your acquisition.  (With this option you would be limited to sample rates of 10 MHz/n and 100 kHz/n where n = 1, 2, 3, ..., 16.)  For more information on the frequency generator refer to page 7-22 of the M Series User Manual.
  • There is also the option to use counter I/O to acquire/generate the digital signals, or you could use a counter to generate a clock for the digital I/O.  However, you mentioned that you do not want to use a counter so I won't go into details about these two options.

Here is an example that demonstrates how you can use the analog input sample clock to time your digital I/O in LabVIEW:
Performing Correlated Digital IO with an M Series Device in LabVIEW

You mentioned that you are doing high speed digital input and output.  Keep in mind that the maximum clock rate that can be used for digital I/O with this device is 1 MHz.  If you need a faster clock rate, you will need a different device.  Take a look at NI's High Speed Digital I/O devices.

I hope this helps.  Please let me know if you would like more information about how to implement any of the specific suggestions above and I'd be happy to help.

Message 2 of 2
(3,291 Views)