Specifications

Commands - 24
COUNT
Process Function
Syntax: n =count(channel)
Purpose: To return the count in the software event counters and return the count of the hardware counters.
Remarks: The COUNT function returns the accumulated high to low transitions at a specified input, independent
of program execution.
The software counters are set up using the ON COUNT statement. channel is the counter number,
and ranges from 0 to 7.
See the Multitasking Chapter for more information.
RELATED: CLEAR COUNT, CONFIG COUNT, ON COUNT, RESUME COUNT, START COUNT, STOP
COUNT
EXAMPLE: 10 FOR X = 0 TO 7
20 A(X) = COUNT(X)
30 NEXT
This example transfers the data from all the counters to array A.
ERROR: <Illegal argument> – if counter> 7
<Data negative> – for counter