Instruction manual

Table Of Contents
PC215E Page 90
6.6.8.2 Measure Frequency of an External Signal - TCgetExtFreq
Returns the frequency of an external signal, in Hertz. The external signal must be connected
to the clock input of the timer specified in the chan argument. See section 4.2.6 for more details
on the Frequency/Period Measurement application.
i = TCgetExtFreq (h, chip, chan, fPtr)
where
h Integer. Board handle as issued by function
registerBoard.
chip Integer. Address offset of timer/counter chip.
One of the following pre-defined constants may
be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12
Z1 = 16
Z2 = 20.
chan Integer. Timer/counter channel number within
the chip (0, 1 or 2). Another timer/counter (chan
- 2) will be used to provide the gate pulse. This
counter/timer may be on the previous chip.
fPtr Pointer to Float. Pointer to a variable declared
as a single floating-point, into which the
frequency result will be placed.
Returns Integer:
OK
or ERRHANDLE
ERRCHAN
ERRRANGE
Prior Calls registerBoard
See Also TCgetExtPeriod