© National Instruments
|
3-31
Frequency and Duty Cycle
To specify the pulses in terms of frequency and duty cycle, use the DAQmx Create Channel
(CO Pulse-Generation Frequency) VI or function.
Channel Settings
By default, the counter outputs the pulses on a default PFI terminal. Refer to Chapter 5,
Signal Routing and Clock Generation
, for more information.
You can change the output terminal by using the CO.Pulse.Term DAQmx Channel property.
Timing Settings
To specify the number of samples to generate (that is, the number of pulses), use the DAQmx
Timing (Implicit) VI or function. Set the Sample Mode input to Finite Samples or
Hardware Timed Single Point.
Triggering Setting
By default, the NI 6612 begins generating the pulses when you call the DAQmx Start Task VI
or function. The NI 6612 can also begin generating pulses in response to a digital trigger.
Figure 3-36 shows an example using a digital trigger.
Figure 3-36.
Start Trigger Initiates Pulse Generation
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 a rising or falling edge.
The following DAQmx Trigger properties configure the Start Trigger:
•
Start.Delay
,
Start.DelayUnits
—Specifies the delay from when the trigger occurs to when
the NI 6612 begins generating pulses.
Note
Even if the Start.Delay is set to 0, the NI 6612 inserts a minimum delay equal
to two ticks of the counter timebase.
•
Start.DigEdge.DigFltr.Enable
,
Start.DigEdge.DigFltr.MinPulseWidth
—Enables and
configures a digital filter on the start trigger input. This filter eliminates noise on the start
trigger signal. Refer to Chapter 4,
, for more information.
S
t
a
rt Trigger
O
u
tp
u
t
S
t
a
rt Del
a
y