Gx5732GetCounterClock

Purpose

Returns the counter clock source and polarity.

Syntax

Gx5732GetCounterClock (nHandle, nCounter, pnClockSource, pbClockPlarity, 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.
pnClockSource
PSHORT
Returned counter clock source:
0. GX5732_CLOCK0: Internal clock 0
1. GX5732_CLOCK1: Internal clock 1
2. GX5732_COUNTER_TO_USER_LINE0: User Line 0.
3. GX5732_COUNTER_TO_USER_LINE1: User Line 1.
4. GX5732_COUNTER_TO_USER_LINE2: User Line 2.
5. GX5732_COUNTER_TO_USER_LINE3: User Line 3.
6. GX5732_COUNTER_TO_USER_LINE4: User Line 4.
7. GX5732_COUNTER_TO_USER_LINE5: User Line 5.
pbClockPolarity
PBOOL
Returned clock polarity:
0. GX5732_POSITIVE_EDGE: Count on rising clock edge.
1. GX5732_NEGATIVE_EDGE: Count on falling clock edge.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Use the Gx5732SetCounterClock to set the clock source and polarity.

Example

The following example returns the clock source and polarity for counter 0:

 

SHORT nClockSource, nStatus;

BOOL bClockPolarity;

Gx5732GetCounterClock (nHandle, GX5732_COUNTER1,

&nClockSource, &bClockPolarity, &nStatus);

 

See Also

Gx5732SetCounterClock, Gx5732SetInternalClock, Gx5732SetCounterEnable