Sets function to Totalize Gated.
GxCntSetFunctionTotalizeGated (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 Totalize Gated function allows events on one input channel to be counted for a period of time determined by events on the second input channel. The second input signal open and close the gate as specified in nStartSlope and nStopSlope.
Only one measurement, over a single gate interval, is performed. A new measurement will be started when the counter receives most commands. The GxCntlClear or GxCntTrig functions are the preferred way to initiate a new measurement.
After the gate closes, the measurement data is held until explicitly cleared (GxCntlClear). In order to identify the final count the GxCntIsMeasurementReady function must be used to check that the gate has opened and closed.
|
Note: If the counter is already making a measurement when this mode is set counting stops and the count is cleared. |
The following example sets the gate time to 1mS:
SHORT nHandle, nStatus;
GxCntSetFunctionTotalizeGated (nHandle, 0.001, &nStatus)
GxCntGetGateTime, GxCntSetAcquisitionTimeInterval, GxCntGetAcquisitionTimeInterval, GxCntSetAcquisitionMode, GxCntGetAcquisitionMode, GxCntGetErrorString