|
我使用一块M系列的板卡来采集和产生数字信号,我知道这个板卡没有板载定时引擎,因此我必须使用其它的时钟源作为该板卡的硬件定时源,我有哪些选择来定时数字IO?
使用如下的选择来实现M系列板卡的数字IO硬件定时。
注意:不要超过板卡规格书上标示的最大数字定时采样时钟频率。这是本板卡能支持的最大时钟速率。如果超过该值将会导致软件错误,但是这将导致欠采样现象发生。
这儿有两个范例程序说明了这个应用方法。
NI Developer Zone Example: M Series Correlated Digital Input with Counter Clock Generation in ANSI C
NI Developer Zone Example: M Series Hardware-Timed DIO with Counter Clock Generation
以下有三个范例来说明这种应用
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 Example: Performing Correlated Digital IO with an M Series Device in LabVIEW
- 创建一个定时器任务来产生一个数字脉冲,其频率为时钟产生器分频后的值。
- 指定定时器输出为<NI-DAQmx Device Name>/freqout.
- 创建一个数字输入输出任务,将其采样时钟设置<NI-DAQmx Device Name>/FrequencyOutput.
- 开始数字输入或者输出任务。
- 当准备进行数字采集和产生的时候开始频率输出任务。
获得更多的关于频率生成器的信息,请参考M系列板卡手册第7-23页,有关范例请参考如下链接。
NI Developer Zone Example: Programming the FREQ_OUT Pin with NI-DAQmx for M Series
Product Manuals: M Series User Manual
KnowledgeBase 4CM6E5T3: Can I Use Different Sample Clocks for Correlated DI and DO?
NI Developer Zone Example: M Series Correlated Digital Input with Counter Clock Generation in ANSI C
NI Developer Zone Example: M Series Hardware-Timed DIO with Counter Clock Generation
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 Example: Performing Correlated Digital IO with an M Series Device in LabVIEW
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 Frequency 2 Counter Method
KnowledgeBase 4CM6E5T3: Can I Use Different Sample Clocks for Correlated DI and DO?
NI Developer Zone Tutorial: Digital Change Detection in NI-DAQmx
NI Developer Zone Example Program: NI-DAQmx Events: M Series Change Detection
|