Gx5732SetCounterValue

Purpose

Loads the counter with a value.

Syntax

Gx5732SetCounterValue (nHandle nCounter, ucValue, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a GX5732 board.
nCounter
SHORT
Counter number:
0. GX5732_COUNTER0: Counter 0.
1. GX5732_COUNTER1: Counter 1.
2. GX5732_COUNTER2: Counter 2.
3. GX5732_COUNTER3: Counter 3.
ucValue
BYTE
Counter value: 0-255
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Use the Gx5732GetCounterValue to retrieve the counter value.

Example

The following example writes a value (250) to counter 2:

 

Gx5732SetCounterValue (nHandle, GX5732_COUNTER2, 250, &nStatus);

 

See Also

Gx5732GetCounterValue, Gx5732LoadCounterCounterPort