GxDmmSetACMath

Purpose

Sets the AC function math type

Syntax

GxDmmSetACMath (nHandle, dwMathType, pnStatus)

Parameters

Name
Type
Comments
nHandle
PSHORT
Handle for a GX2065 board.
dwMathType
DWORD
Sets the math function applied the raw measurement in any of the AC measurement functions.
  1. GXDMM_AC_MATH_RMS – Sets the AC math type to RMS (root mean square).
  2. GXDMM_AC_MATH_AVG – Sets the AC Math type to Average. This math operation will take the average (arithmetic mean) of all the DAQ samples taken.
  3. GXDMM_AC_MATH_PP – Sets the AC math type to Peak to Peak.
  4. GXDMM_AC_MATH_PKAMP – Sets the AC math type to Peak amplitude.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

When the DMM is in any of the AC functions (VAC AC Coupled, VAC DC Coupled, IAC AC Coupled, or IAC DC Coupled), an internal DAQ is used to acquire up to 8192 samples of data at up to 2MS/s. A math operation (from the types listed above) is applied to the samples to generate a final measurement result. Use the GxDmmSetACMinFrequency function to set the lowest expected frequency.

Example

The following example sets the AC math type to RMS:

 

SHORT nHandle, nStatus;

GxDmmSetACMath (nHandle, GXDMM_AC_MATH_RMS, &nStatus);

 

See Also

GxDmmGetACMath, GxDmmSetACMinFrequency, GxDmmGetACMinFrequency, GxDmmGetAutoRange, GxDmmSetFunction, GxDmmGetFunction, GxDmmSetRange, GxDmmGetRange, GxDmmGetErrorString