GxCalMesure

Purpose

Measure the output voltage or resistance according to the specified voltage range and connected function.

Syntax

GxCalMesure (nHandle, nVoltageRange, pdValue, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a GX1034 board.
nVoltageRange
SHORT
Voltage range should be set as follows:
  1. GXCAL_MEASURE_VOLTAGE_RANGE_MINUS_10_TO_10: voltage range is from –10V to +10V with resolution of 0.3mV.
pdValue
PDOUBLE
Returned measurement.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The function measures the output voltage or resistance according to the specified voltage range only if the board is set to either GXCAL_FUNCTION_MEASURE_VDC function or GXCAL_FUNCTION_MEASURE_RESISTANCE function otherwise the function returns an error.

If the board was set to GXCAL_FUNCTION_MEASURE_VDC function then the function returns the measured voltage between pins 2 and 6 on the output DIN connector in volts. The user can specify the voltage range of the measurement allowing for better resolution for small voltage amplitudes.

If the board was set toGXCAL_FUNCTION_MEASURE_RESISTANCE function then the function returns the measured resistance between pins 2 and 6 on the output DIN connector in OHms. The user can specify different voltage range allowing for better resolution for high resistance values, as well as change the output current settings by calling the GXCAL_FUNCTION_MEASURE_RESISTANCE function.

Example

The following example sets the function to measure VDC and then take a measurement the output voltage using 0-10V range:

 

SHORT nHandle, nStatus;

DOUBLE dVoltage;

 

GxCalSetFunction (nHandle, GXCAL_FUNCTION_MEASURE_VDC, 0, 0, &nStatus);

GxCalMesure (nHandle, 0, TRUE, GXCAL_MEASURE_VOLTAGE_RANGE_MINUS_10_TO_10, &dVoltage, &nStatus);

 

See Also

GxCalReset, GxCalSetFunction, GxCalGetFunction, GxCalGetErrorString