Returns the function and function settings.
GxCntGet (nHandle, pnFunction, pnChannelMode, pnStartSlope, pnStopSlope, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a counter board. |
pnFunction |
PSHORT |
Returned function number see comments for details. |
pnChannelMode |
PSHORT |
Returned channels or Mode depends on the returned function value. See comments for details. |
pnStartSlope |
PSHORT |
Returned measurement start slope depends on the returned function value. See comments for details. |
pnStopSlope |
PSHORT |
Returned measurement stop slope depends on the returned function value. See comments for details. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Returned function is as follow:
0 GXCNT_FUNCTION_ACCUMULATE
1 GXCNT_FUNCTION_AUTO_RATIO
2 GXCNT_FUNCTION_FAST_FREQUENCY
3 GXCNT_FUNCTION_FREQUENCY
4 GXCNT_FUNCTION_PERIOD
5 GXCNT_FUNCTION_PULSE_WIDTH
6 GXCNT_FUNCTION_RATIO
7 GXCNT_FUNCTION_SINGLE_PERIOD
8 GXCNT_FUNCTION_TEST_CLOCK
9 GXCNT_FUNCTION_TIME_INTERVAL
10 GXCNT_FUNCTION_TIME_INTERVAL_DELAY
11 GXCNT_FUNCTION_TOTALIZE
12 GXCNT_FUNCTION_TOTALIZE_GATED
13 GXCNT_FUNCTION_TOTALIZE_GATED_ONCE
Returned measurement start slope is as follow:
0 GXCNT_POSITIVE_SLOPE: Rising (Positive) edge.
1 GXCNT_NEGATIVE_SLOPE: Falling (Negative) edge.
Returned measurement stop slope is as follow:
0 GXCNT_POSITIVE_SLOPE: Rising (Positive) edge.
1 GXCNT_NEGATIVE_SLOPE: Falling (Negative) edge.
The following example returns the function and function settings:
SHORT nHandle, nStatus;
SHORT nFunction, nChannelMode, nStartSlope, nStopSlope
GxCntGetFunction (nHandle, &nFunction, &nChannelMode, &nStartSlope, &nStopSlope, &nStatus);
GxCntSetAcquisitionTimeInterval, GxCntSetAcquisitionMode, GxCntGetAcquisitionMode, GxCntGetErrorString