Returns the time allowable for a measurement read operation.
GxCntGetMeasurementTimeout (nHandle, pdSeconds , pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a counter board. |
pdSeconds |
PDOUBLE |
Returns timeout value in seconds, timeout range is 1mS to 3200 seconds. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
In most measurement functions the counter will wait indefinitely for a measurement to end if the input signal is removed or changes amplitude. If an attempt is made to read data from the board under this condition, the host computer will wait until the data is available. This lockup situation can be avoided by programming the timeout to an interval that is longer than any expected measurement, but will still allow the program to regain control if signal is absent or changes significantly from the expected amplitude.
In cases of measurements with long gate times or low frequency input signals and there is a potential problem, the GxCntIsMeasurementReady or GxCntReadStatusRegister functions can be used to see if data is ready and help to avoid unnecessary time-outs.
The following example returns the timeout settings:
SHORT nHandle, nStatus;
DOUBLE dSeconds
GxCntGetMeasurementTimeout (nHandle, &dSeconds, &nStatus)
GxCntSetMeasurementTimeout, GxCntGetFunction, GxCntGetErrorString