
©
National Instruments Corporation
15
NI 6601/6602 Calibration Procedure
11. Calculate the frequency of the device.
a.
Retrieve the count from counter 0. The count represents the
number of cycles of the 20 MHz timebase in 50 ms.
b.
Multiply the count returned above by 20 to calculate the number
of pulses that should occur in one second, (50 ms × 20 = 1 s),
which is the
measured frequency
of the 20 MHz timebase.
Example Code for GPCTR Watch
u32 ulCount = 0;
iStatu
s
= GPCTR_WATCH (deviceNumber, ND_COUNTER_0, ND_COUNT, &ulCount);
ulCount = ulCount * 20;
Traditional NI-DAQ Function Call
LabVIEW Block Diagram
Call
GPCTR_Watch
with the following
parameters:
deviceNumber
: The value set by MAX
gpctrNum
:
ND_COUNTER_0
entityID
:
ND_COUNT
entityValue
: A user-declared variable
See example code in the next paragraph.
“TASK ID” in connects to “TASK ID” out of step 4.