Supported Functions

The following Signametrics functions are supported by the GXDMM compatibility driver.  These listings provide the intended purpose of the Signametrics function and the GxDmm function/technique that was used to achieve compatibility.

DMMBurstBuffRead(int nDmm, int iSettle, int iMeasurements)

When DMMBurstBuffRead() is received, the compatibility driver triggers several measurements that can be read back in subsequent statements using the following GxDmm command.  The user would need to keep track of which measurements are settling measurements and which are valid.

GxDmmSetTriggerMode(nDmm, GXDMM_TRIGGER_ARRAY, iSettle+iMeasurements, &nStatus);

DMMCalibrate(int nDmm)

Performs calibration by executing the auto-zero command.

GxDmmSetAutoZero(nDmm, GXDMM_AUTO_ZERO_NOW, &nStatus);

DMMClearMinMax(int nDmm)

Performs the clear function of the GetMinMax command.

GxDmmGetMinMax(nDmm, &dMin, &dMax, TRUE, &nStatus);

DMMDelay(double dDelay)

Delays program execution by calling the Windows Sleep function.

Sleep((DWORD)(dDelay*1000));

DMMDisArmTrigger(int nDmm)

Stops reading by aborting any measurements in progress.

GxDmmAbortReading(nDmm, &nStatus);

DMMErrorCovert(SHORT nDmmError)

Accepts GxDmm specific error codes and returns equivalent Signametrics error codes.

DMMErrString(int nError, LPSTR lpcBuf, int nBufLen)

Converts Signametrics specific error codes to Signametrics specific error messages.

DMMFrequencyStr(int nDmm, LPSTR lpszReading)

Creates the frequency string by performing a frequency measurement and then formatting the response to replicate the Signametrics output.

GxDmmSetFunction(nDmm, GXDMM_FUNCTION_FREQUENCY, &nStatus);

GxDmmTrig(nDmm, &nStatus);

GxDmmMeasureEx(nDmm, &dMeasurement, szFrequency, szUnits, &ddwTime, &nStatus);

The frequency string is created from the szFrequency and szUnits.

DMMGetCalDate(int nDmm, LPSTR lpszDate)

Creates the calibration date string by checking the GX2065 calibration and parsing out the date to match the expected format.

GxDmmGetCalibrationInfo(nDmm, szCalInfo, 256, &nDaysUntilExpire, &nStatus);

DMMGetFuncRange(int nDmm)

This function causes the compatibility driver to retrieve the current function and range mode.  It then looks up the most similar Signametrics Function/Range enumerated value and returns it.  If the Gx2065’s function mode is not supported by the Signametrics card, this function will return DMM_E_FUNC “Invalid function parameter used.”

GxDmmGetFunction(nDmm, &dwFunction, &nStatus);

GxDmmGetRange(nDmm, &dRange, &nStatus);

          The current function/range is determined after an evaluation of dwFunction and dRange

DMMGetFunction(int nDmm)

Gets the current function mode from the GX2065 and resolves it to one of the Signametrics supported methods: VDC, VAC, IDC, IAC, OHMS2W, OHMS4W, TEMP_LCL, and DIODE.  If the GX2065 function is not supported by the Signametrics, this call will return DMM_E_FUNC.

GxDmmGetFunction(nDmm, &dwFunction, &nStatus);

DMMGetGrdVer(int nDmm)

This function should return the DMM firmware version of the on-board controller.  It always returns 1.

DMMGetHwVer(int nDmm)

This function should return the DMM hardware version.  It always returns 1.

DMMGetID(int nDmm)

This function return the DMM identification code.  It always returns 2040.

DMMGetMax(int nDmm, double FAR *lpfRes)

Returns the dMax parameter of the GetMinMax command.

GxDmmGetMinMax(nDmm, &dMin, &dMax, TRUE, &nStatus);

DMMGetMaxStr(int nDmm, LPSTR lpszReading)

Performs the clear function of the GetMinMax command.

GxDmmGetMinMax(nDmm, &dMin, &dMax, TRUE, &nStatus);

          The max string is created from the dMax parameter.

DMMGetMin(int nDmm, double FAR *lpfRes)

Returns the dMin parameter of the GetMinMax command.

GxDmmGetMinMax(nDmm, &dMin, &dMax, TRUE, &nStatus);

DMMGetMinStr(int nDmm, LPSTR lpszReading)

Performs the clear function of the GetMinMax command.

GxDmmGetMinMax(nDmm, &dMin, &dMax, TRUE, &nStatus);

          The min string is created from the dMin parameter.

DMMGetRange(int nDmm)

Gets the current function mode from the GX2065 and resolves it to one of the Signametrics supported methods: VDC, VAC, IDC, IAC, OHMS2W, OHMS4W, TEMP_LCL, and DIODE.  If the GX2065 function is not supported by the Signametrics, this call will return DMM_E_FUNC.

GxDmmGetRange(nDmm, &dRange, &nStatus);

DMMGetRate(int nDmm, double FAR *lpdRate)

This function returns the measurement rate of the card.

GxDmmGetAperture(nDmm, &dAperture, &nStatus);

GxDmmGetLineFrequency(nDmm, &dwLineFrequency, &nStatus);

*lpdRate=1/(dAperture*(1.0/dwLineFrequency));

DMMGetType(int nDmm)

This function should return the DMM type currently in use.  It always returns 2042.

DMMGetVer(int nDmm, double FAR *lpdVer)

This function should return the DMM software version number.  It always assigns 1.

*lpdVer=1.0;

DMMInit(int nDmm, LPCSTR lpszCal)

This function establishes communication with the DMM.  The power line cycles is read from the DAT file referenced in lpszCal.

GxDmmInitialize(nSlot, &nHandle, &nStatus);

GxDmmReset(nHandle, &nStatus);

GxDmmSetLineFrequency(nHandle, m_iPowerLineCycles, &nStatus);

GxDmmSetAutoZero(nHandle, GXDMM_AUTO_ZERO_OFF, &nStatus);

DMMIsAutoRange(int nDmm)

This function gets the status of the autorange flag.

GxDmmGetAutoRange(nDmm, &bAuto, &nStatus);

DMMIsInitialized(int nDmm)

This function checks to see if the board number specified by nDmm was initialized by the driver during this session.  Returns TRUE if the board was initialized.

DMMIsRelative(int nDmm)

This function checks to see if the specified board was set to perform relative measurements by a previous call to the Signametrics function DMMSetRelative().

DMMPeriodStr(int nDmm, LPSTR lpszReading)

Creates a period string by performing a frequency measurement and then formatting the response to replicate the Signametrics output.

      DMMReadFrequency(nDmm, &dFrequency);

     The period string is created by inverting and formatting dFrequency.

DMMPolledRead(int nDmm, double FAR *lpfRes)

This function checks if the DMM is ready to measure.  If it is ready, an immediate measurement is made.

      GxDmmGetReadStatus(nDmm, &bValid, &nStatus);

      if (bValid)

            GxDmmMeasure(nDmm, lpfRes, &nStatus);

DMMPolledReadCmd(int nDmm)

This function triggers the DMM to perform a read command.

GxDmmTrig(nDmm, &nStatus);

DMMPolledReadStr(int nDmm, LPSTR lpszReading)

This function checks if the DMM is ready to measure.  If it is ready, an immediate measurement is made and the measurement is formatted to replicate the Signametrics output.

      GxDmmGetReadStatus(nDmm, &bValid, &nStatus);

      if (bValid)

            DMMReadStr(nDmm, lpszReading);

DMMRead(int nDMM, double *lpfValue)

This function triggers and return a reading from the DMM.

      GxDmmTrig(nDmm, &nStatus);

      GxDmmMeasure(nDmm, lpfValue, &nStatus);

DMMReadBuffer(int nDmm, double FAR *lpdRes)

This function reads the next measurement from the DMM’s internal buffer.

GxDmmReadArray(nDmm, lpdRes, &ddwTime, 1, &nStatus);

DMMReadFrequency(int nDmm, double FAR *lpdFreq)

This function triggers and returns the next frequency measurement.

      GxDmmSetFunction(nDmm, GXDMM_FUNCTION_FREQUENCY, &nStatus);

      GxDmmTrig(nDmm, &nStatus);

      GxDmmMeasure(nDmm, lpdFreq, &nStatus);

DMMReadMeasurement(int nDMM, double FAR *value)

This function reads triggered measurements from the DMM.

GxDmmRead(nDmm, value, &nStatus);

DMMReadNorm(int nDmm, double FAR *lpdRes)

This function reads a measurement in base units.

GxDmmMeasure(nDmm, lpdRes, &nStatus);

DMMReadPeakToPeak(int nDmm, double * dPtp)

This function returns a VAC signal’s peak to peak measurement.  The DMM must be configured to measure VAC signals prior to calling this function.

      GxDmmGetACMath(nDmm, &dwACMathType, &nStatus);

      GxDmmSetACMath(nDmm, GXDMM_AC_MATH_PP, &nStatus);

      GxDmmMeasure(nDmm, dPtp, &nStatus);

      GxDmmSetACMath(nDmm, dwACMathType, &nStatus);

DMMReadPeriod(int nDmm, double FAR *lpdRes)

This function returns the next period reading.  The DMM must be configured to measure VAC signals prior to calling this function.

      DMMReadFrequency(nDmm, &dFrequency);

      *lpdRes=1/dFrequency;

DMMReadStr(int nDmm, LPSTR lpszReading)

This function makes a measurement and formats it to match the Signametrics output.

      GxDmmSetFunction(nDmm, GXDMM_FUNCTION_FREQUENCY, &nStatus);

      GxDmmTrig(nDmm, &nStatus);

GxDmmMeasureEx(nDmm, &dMeasurement, szFrequency, szUnits, &ddwTime, &nStatus);

DMMReady(int nDmm)

This function returns the ready flag after a triggered measurement.

GxDmmGetReadArrayStatus(nDmm, &bFinished, &dwCount, &nStatus);

      The function returns the bFinishedparameter.

DMMSetAutoRange(int nDmm, BOOL bAuto)

This function enables/disables the autorange operation of the DMM.

GxDmmSetAutoRange(nDmm, bAuto, &nStatus);

DMMSetFuncRange(int nDmm, int nFnRange)

This function changes the measurement function and range modes.

If the GXDMM’s function or range is not supported by the Signametrics card, this function will return DMM_E_FUNC “Invalid function parameter used.”  Later in this chapter, there is a Comparison matrix which shows which ranges the GXDMM used based on the programmed Signametrics function value.

DMMSetFunction(nDmm, nFunction);

DMMSetRange(nDmm, nRange);

DMMSetFunction(int nDmm, int nFunction)

This function changes the measurement function of the DMM.

GXDMM supports the following Signametrics function modes as nFunction: VDC, VAC, IDC, IAC, OHMS2W, OHMS4W, TEMP_LCL, and DIODE.  Attempting to use any other function modes will result in DMMSetFunction returning DMM_E_FUNC “Invalid function value used.”  Later in this chapter, there is a Comparison matrix which shows which ranges the GXDMM used based on the programmed Signametrics function value.

      GxDmmSetFunction(nDmm, nFunction, &nStatus);

DMMSetRange(int nDmm, int nRange)

This function changes the measurement range of the DMM. Later in this chapter, there is a Comparison matrix which shows which ranges the GXDMM used based on the programmed Signametrics function value.

GxDmmSetRange(nDmm, dRange, &nStatus);

DMMSetRate(int nDmm, int nRate)

This function sets the reading rate of the DMM.

GxDmmGetLineFrequency(nDmm, &dwLineFrequency, &nStatus);

      dAperture=(1.0/nRate)/(1.0/dwLineFrequency);

      GxDmmSetAperture(nDmm, dAperture, &nStatus);

DMMSetRelative(int nDmm, BOOL bRelative)

This function turns on/off relative reading mode.

DMMTrigger(int nDmm, int nSamples)

This function software triggers the DMM to take nSamples measurements.

GxDmmSetTriggerMode(nDmm, GXDMM_TRIGGER_ARRAY, nSamples, &nStatus);