Instruction manual
AMPDIO DRIVERS
Page 119
i = TCgetUpCount (h, chip, chan, pcount)
where h short: board handle as issued by the
registerBoardEx function.
chip short: 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 short: timer/counter channel number within the
chip (0, 1 or 2).
pcount pointer to long: pointer to a long integer
variable into which the up-count value result
will be placed.
Returns short: OK
or ERRHANDLE
ERRCHAN
Prior Calls registerBoardEx
TCsetMode
TCsetCount
See Also TCgetCount
TCsetClock
TCsetGate
6.4.5.16 Reads Two Timer’s current Count Values — TCgetCounts
Latches and reads 16-bit count values from two timer/counter channels. It uses the read-back
command if the channels are on the same 82C54 chip. It uses the counter latch command if
the channels are on different chips or on an older 82C53 chip. (Prior to version 4.23 of the
driver, the read-back command was always used, but that never worked properly on PC24E,
PC25E, PC26AT, PC27E or PC30AT.)
SUPPORTED IN VERSION 2.00 ONWARDS
For driver version 5.04 onwards, a second set of readings is always taken. (Previous versions
of the driver from version 3.00 onwards took a second set of readings if the counters were on
different chips.) If the value of the second timer/counter changes between the two sets of
readings, the second set of readings is used, otherwise the first set of readings is used. This
is useful when the second timer/counter channel is clocked by the output of the first channel.
i = TCgetCounts (h, chip1, chan1, pcount1, chip2, chan2, pcount2)
where: h short: board handle as issued by the
registerBoardEx function.
chip1 short: address offset of the timer/counter chip