Takes a measurement and return the result with additional information
GxDmmMeasureEx (nHandle, pdMeasurement, pszMeasurement, pszUnits, pddwTime, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle for a GX2065 board. |
pdMeasurement |
PDOUBLE |
Return the measurement |
pszMeausrement |
PSTR |
Returns a string containing the formatted and normalized result. |
pszUnits |
PSTR |
Returns a string containing the units of the result |
pddwTime |
PDDWORD |
Returns the timestamp of the result in terms of nanoseconds. The time is synced with the PC’s clock. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure, positive number on warning. |
This function generates a software trigger and forces the DMM to take a measurement. The result is returned in two parameters, pdMeasurement, and pszMeasurement. The first parameter, pdMeasurement returns the result without normalizing, in base units. For example, Voltage will be returned as Volts, Current will be returned as Amps, Resistance will be returned as Ohms, Temperature will be returned as degrees Celsius, and Frequency will be returned as Hertz. The second parameter, pszMeasurement, returns the measurement as a formatted string containing the normalized result. The normalized result uses units that reflect the magnitude of the result as well as the resolution of the measurement. For example, 0.0312356789 Amps, measured in 100mA Range, and using 6 and a1/2 digits of resolution, will be returned as “31.2356” Milliamps. In this case, pszUnits will return the units as “mA”.
If the DMM is in continuous trigger mode when this function is called, the DMM will switch to software trigger mode before taking a measurement.
The parameter pdMeasurement will be set to 0 if an error occurs.
If an overflow warning (GXDMM_WARNING_OVERFLOW) has occurred, pdMeasurement will be set to GXDMM_OVERFLOW_MEASUREMENT (1000000000000).
If any other warning occurs, pdMeasurement will be set to 0.
NOTE: When measuring the resistance of open circuit in 2-Wire and 4-Wire modes, the measurement time is less than 1mSec regardless of the resolution and aperture settings.
The following takes a new measurement with additional information:
SHORT nHandle, nStatus;
DOUBLE dMeasurement;
CHAR szMeasurement[256], szUnits[10];
DDWORD ddwTime;
GxDmmMeasureEx (nHandle, &dMeasurement, szMeasurement, szUnits, &ddwTime, &nStatus);
GxDmmMeasure,GxDmmRead, GxDmmReadEx, GxDmmSetTriggerMode, GxDmmGetTriggerMode, GxDmmSetRange, GxDmmGetRange, GxDmmSetFunction,GxDmmGetFunction, GxDmmGetErrorString