GxCntReadMeasurementString

Purpose

Read a single measurement formatted as string.

Syntax

GxCntReadMeasurementString (nHandle, szMeasurement, nMeasMaxLen, pnStatus)           

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a counter board.
szMeasurement
PDOUBLE
Buffer to contain the Returned (null terminated) string.
nMeasMaxLen
SHORT
Size of the buffer to contain the error string.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

This function is used for reading measurement results out of the board. It returns the result both as a double precision floating point number, and as a formatted string. If a result is available it is returned immediately, otherwise the function will wait for a measurement to become available. Use GxCntIsMeasurementReady to prevent the software from “hanging up” if the signal is lost or for slow signals in order to ensure that measurement data is ready before attempting to read. See also GxCntReadMeasurement.

Example

The following example read a single measurement: and return the measurement formatted into a string:

 

SHORT nHandle, nStatus;

CHAR szMeasurement [256];

GxCntReadMeasurementString (nHandle, szMeasurement, sizeof(szMeasurement, &nStatus);

 

See Also

GxCntIsMeasurementReady, GxCntReadMeasurement, GxCntReadStatusRegister, GxCntGetFunction, GxCntGetErrorString