IviDmm_Read

CVI/LabWindows IVI Class Driver

IviDmm_Read

IviDmmBase Capability Group

C Function Prototype

ViStatus IviDmm_Read (ViSession vi, ViInt32 maxTime ViReal64 *reading);

Purpose

This function initiates a measurement, waits until the DMM has returned to the Idle state, and returns the measured value.

After this function executes, the reading parameter contains an actual reading or a value indicating that an overrange condition occurred.

If an overrange condition occurs, the reading parameter contains an IEEE defined NaN (Not a Number) value and the function returns IVIDMM_WARN_OVER_RANGE.

Test the measurement value for overrange with the IviDmm_IsOverRange function.

The value of the IVIDMM_ATTR_FUNCTION attribute determines the units for the reading parameter.

Parameters

Inputs Type Description
vi ViSession The instrument handle that you obtain from the IviDmm_init or IviDmm_InitWithOptions functions. The handle identifies a particular IVI session.
maxTime ViInt32 Pass the maximum length of time in which to allow the read operation to complete. Express this value in milliseconds. If the operation does not complete within this time interval, the function returns the IVIDMM_ERROR_MAX_TIME_EXCEEDED error code. When this occurs, you can call IviDmm_Abort to cancel the read operation and return the instrument to the Idle state.

Defined Values:

IVIDMM_VAL_MAX_TIME_INFINITE—Wait indefinitely for a timeout.

IVIDMM_VAL_MAX_TIME_IMMEDIATE—Do not wait for a timeout.

Note  The maxTime parameter affects only this function. It has no effect on other timeout parameters or attributes.
Outputs Type Description
     
reading ViReal64 Returns the measured value. The value you specify for the function parameter of the IviDmm_ConfigureMeasurement function determines the units of this parameter.

Possible Units

Return Values