4-6
|
ni.com
Chapter 4
Counter Output
You can specify the waveform buffer in terms of:
•
Frequency and duty cycle
•
Idle time and active time of each pulse
•
Idle ticks and active ticks of each pulse
A tick is one period of the counter timebase (by default, 10 ns).
Create Channel
Use one of the following functions to create a channel. Select the VI or function that corresponds
to the format of the data in the waveform buffer:
•
DAQmx Create Channel (CO Pulse-Generation Frequency)—The frequency and duty
cycle inputs to the function determine the initial frequency and duty cycle of the waveform.
That is, the frequency and duty cycle of the waveform before the first sample clock.
•
DAQmx Create Channel (CO Pulse-Generation Time)—The high time and low time inputs
determine the initial waveform.
•
DAQmx Create Channel (CO Pulse-Generation Ticks)—The high ticks and low ticks
inputs determine the initial waveform.
Channel Settings
By default, the counter outputs the pulses on a default PFI terminal. Refer to Chapter 5,
, for more information
You can change the output terminal by using the CO.Pulse.Term DAQmx Channel property.
Timing Settings
For this type of generation use Sample Clock timing by calling the DAQmx Timing (Sample
Clock) VI or function.
Triggering Settings
By default, the NI 6614 begins generating the pulses when you call the DAQmx Start Task VI
or function. The NI 6614 can also begin generating pulses in response to a digital trigger.
To use a start trigger, call the DAQmx Start Trigger (Digital Edge) VI or function. Inputs to this
VI or function include:
•
Source—Specifies which terminal to use as the Start Trigger signal.
•
Edge—Specifies rising or falling edges.