What are the sampling clocks for the M-series DAQ card hardware timing IO?

Source: Internet
Author: User
Tags manual generator

website: http://digital.ni.com/public.nsf/allkb/A7AABC612F99CB82862574F000326EA5


Questions:

I used an M-series board to collect and generate digital signals, and I knew that the board did not have an onboard timing engine, so I had to use other clock sources as the hardware timing source for that board, and what options I had to have to timing the digital IO.

Answer:

Use the following options to implement the digital IO hardware timing for the M-series boards.

Note : Do not exceed the maximum number of timed sampling clock frequencies indicated on the board specifications. This is the maximum clock rate that can be supported by this board card.   Exceeding this value will result in a software error, but this will cause the under-sampling phenomenon to occur. use a onboard timer to generate the sampling clock as a hardware timed sampling clock. There are a few steps to follow. For the digital input and output task, create a timer task to generate a fixed frequency digital pulse. Creates a digital input or output task, and specifies that its sampling clock source is the internal timer output, which is the pulse output configured by the timer task. Start digital input and output tasks. The timer task is started when the digital input and output is ready.

There are two sample programs here that illustrate this application approach.
ni Developer Zone example:m Series correlated Digital Input with Counter Clock Generation in ANSI C
NI Developer Z One example:m Series hardware-timed DIO with Counter clock Generation uses an external sampling clock as the sampling clock.   To do this, you need to prepare a source that can be used as a digital input and output timing signal, remembering that its maximum frequency cannot exceed 1MHZ, and that the external clock signal can be connected through the following pins. PFI <0..15> RTSI <0..7> pxi_star Analog Comparison Event (an Analog trigger)

use analog input sampling clock, analog input The timing source for a digital task is a clock changer or an analog output sampling clock.   This is a good way to synchronize analog IO operations and digital IO operations, especially if the analog input and analog output channels in the board are not being used. Remember that when using this method, the digital task is the same as the sample clock used by the simulation task, and the following steps illustrate how to use the method. Configure an analog input and analog output task, set its timing parameters, set its sample rate and digital timing clock frequency, even if you do not use the simulation task, you must create such a "false task." Configure a digital input and output task to specify that its timing clock is ai/sampleclock,ai/convertclock, or Ao/sampleclock. Start a digital input or output task. Starting the analog input or analog output task, starting the task will start the sampling clock generation of the digital task.

Here are three examples to illustrate this application
ni Developer Zone example:m series:correlated Digital output with Analog output sample Clock
Ni Developer Zone example:m Series correlated Digital Input with Analog input Sample Clock in ANSI C
NI Developer Zone Ex Ample:performing Correlated Digital IO with a M Series Device in LabVIEW uses the onboard clock generator to provide a sampling clock for digital tasks.   Each M-series board has an onboard clock generator that can generate digital pulses by dividing the onboard time base of 10MHZ or 100KHZ, with a factor of 1.2. 16. Using the onboard clock generator limits the frequency of digital tasks, but it is a good choice when you do not have an external clock source and the timer and analog input and output sampling clocks as separate tasks, please follow the steps below. Create a timer task to generate a digital pulse with a frequency that is the value after the clock generator is divided. Specifies that the timer output is <ni-daqmx Device name>/freqout. Create a digital input and output task to set its sampling clock to <ni-daqmx Device name>/frequencyoutput. Start a digital input or output task. Start the frequency output task when preparing for digital acquisition and generation.

For more information on frequency generators, please refer to the M-Series Board manual 第7-23 page for examples, please refer to the following link. The
NI Developer Zone example:programming the freq_out Pin with ni-daqmx for M Series uses signal change detection to timing digital tasks.   Change detection is a hardware operation that triggers a hardware acquisition of the entire digital task by judging the changes in one or more digital input channels. Change detection is a gate operation, that is, by the hardware (clock or handshake signal) control, when the signal changes occur, the data is locked into the hardware cache, and then through the DMA or interrupt in the PC memory data transfer to the hardware board, change the detection response is very fast, often used to detect the digital line level change, Instead of using a software timed Query method. For more information on page 6-8 of the M-Series board user manual, please refer to the following link.
ni Developer zone tutorial:digital change Detection in ni-daqmx 
ni Developer zone example:ni-daqmx Events: M Series Change Detection

uses timed io instead of numbers to generate a burst or measure the frequency of a digital signal.   For more information, refer to the following resources.
ni Developer zone tutorial:generating a Pulse Train with a Counter
NI Developer Zone tutorial:period Measurement With a Counter
ni Developer zone example:ni-daqmx:frequency measurements Using Counters
NI Developer Zone Example: ni-daqmx:continuously Measure Counter Frequency (buffered-large Range)
NI Developer Zone example:measure High Freque Ncy 2 Counter Method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.