Sets the function mode to Accumulate.
GxCntSetFunctionAccumulate (nHandle, nMode, nStartSlope, nStopSlope, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a counter board. |
nMode |
SHORT |
Measurement mode:
|
nStartSlope |
SHORT |
Measurement Start Slope:
|
nStopSlope |
SHORT |
Measurement Stop Slope:
|
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The Accumulate mode provides total count over multiple gate intervals. External signal determines the gate interval while the count gate can be opened and closed indefinite number of times. Less than 0.5 microsecond of “dead time” is required between the closing of one gate interval and the beginning of the next. Data can be accurately read at any time. The signal slopes that open and close the count gate specified by the nStartSlope and nStopSlope.
Note: Call GxCntlClear function to clear the count and close the gate. The next gating signal edge will restart counting. If the counter is already running when this command is received, counting stops and the count is cleared. At least 0.5 µS and one Acquisition of the counted signal must occur between the closing and reopening of the gate.
The following example sets the function to Accumulate with channel A gated by channel B, negative start slope and positive stop slope:
SHORT nHandle, nStatus;
GxCntSetFunctionAccumulate (nHandle, GXCNT_MEASURE_A_GATED_BY_B, GXCNT_NEGATIVE_SLOPE, GXCNT_POSITIVE_SLOPE, &nStatus);
GxCntSetFunctionTotalize, GxCntSetFunctionTotalizeGated, GxCntSetFunctionTotalizeGatedOnce, GxCntGetErrorString