Instruction manual

Table Of Contents
Page
77
PC215E
6.6.4.9 Read Timer's current Up-Count - TCgetUpCount
Latches and reads a timer counter value, in the same way as TCgetCount, but returns the
actual number of clock pulses received, rather than the count value. Note that the 82C54
timers count down to zero from the initial count value, so this function returns ((initial count) -
(current count)). Only counter modes 2 or 3 should be used with this function.
i = TCgetUpCount (h, chip, chan, count)
where
h Integer. Board handle as issued by the
registerBoard function.
chip Integer. Address offset of the 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).
count Pointer to Long. Pointer to a variable declared
as a long integer, into which the up-count value
will be placed.
Returns Integer:
OK
or ERRHANDLE
ERRCHAN
Prior Calls registerBoard
TCsetGate
TCsetClock
TCsetMode
TCsetCount
See Also TCgetCount