Chapter 10 Easy I/O for DAQ Library
© National Instruments Corporation 10-25 LabWindows/CVI Standard Libraries
Parameters
Input device short
integer Assigned by configuration utility.
counter string The counter to be used for the counting operation.
frequency double The desired repetition rate of the continuous pulse
train.
dutyCycle double The desired ratio of the duration of the pulse phase
(phase 2) to the period (phase 1 + phase 2).
gateMode unsigned
short
integer
Specifies how the signal on the counter's GATE pin
is used.
pulsePolarity unsigned
short
integer
The polarity of phase 2 of each cycle.
Output actualFrequency double The achieved frequency based on the resolution and
range of your hardware.
actualDutyCycle double The achieved duty cycle based on the resolution and
range of your hardware.
taskID unsigned
long
integer
The reference number assigned to this operation.
You pass taskID to CounterStart,
CounterRead, and CounterStop.
Return Value
error short
integer Refer to error codes in Table 10-5.
Parameter Discussion
counter is the counter to be used for the counting operation. The valid counters are shown in
Table 10-2, which is found in the Valid Counters for the Counter/Timer Functions subsection of
the Easy I/O for DAQ Library Function Overview section of this chapter.
dutyCycle is the desired ratio of the duration of the pulse phase (phase 2) to the period (phase 1
+ phase 2). The default of 0.5 generates a square wave.
If dutyCycle = 0.0, the function computes the closest achievable duty cycle using a
minimum pulse phase (phase 2) of three timebase cycles.
If dutyCycle = 1.0, the function computes the achievable duty cycle using a minimum delay
phase (phase 1) of three timebase cycles.
A duty cycle very close to 0.0 or 1.0 may not be possible.