GxDmmReadArray

Purpose

Returns a result from measurement that has already occurred

Syntax

GxDmmReadArray (nHandle, padMeasurement, paddwTime, dwCount, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle for a GX2065 board.
padMeasurement
PDOUBLE
Return an array of measurements that were taken synchronously. The array length must be at least as large as dwCount.
paddwTime
PDDWORD
Return an array of timestamps corresponding with the measurements stored in the padMeasurement array. The array length must be at least as large as dwCount.
dwCount
DWORD
The number of measurements and time stamps to return. The lengths of the padMeasurement and paddwTime arrays must be at least as large as dwCount. Valid values are 1-8192.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure, positive number on warning.

Comments

This function is applicable only to the following measurements functions:

2.       GXDMM_FUNCTION_VAC_AC_CPL – Voltage AC, AC Coupled Mode

3.       GXDMM_FUNCTION_IAC_AC_CPL – Current AC, AC Coupled Mode

4.       GXDMM_FUNCTION_VAC_DC_CPL – Voltage AC, DC Coupled Mode

5.       GXDMM_FUNCTION_IAC_DC_CPL – Current AC, DC Coupled Mode

This function reads back buffered measurements taken as a result of a Trigger Array operation (by calling GxDmmTriggerMode). The result is returned 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.

Note that this function does not initiate a new measurement. To initiate a new single reading through software, call GxDmmMeasure, GxDmmMeasureEx, or GxDmmTrig. To initiate a new multiple, buffered reading, call GxDmmSetTriggerMode and pass the GXDMM_TRIGGER_ARRAY constant.

Call GxDmmGetReadArrayStatus to make sure the Trigger Array operation has completed before calling this function.

Example

The following reads back 100 measurements after initiating a Trigger Array operation:

 

SHORT nHandle, nStatus;

DOUBLE adMeasurement[100];

DDWORD addwTime[100];

BOOL bStatus;

GxDmmTriggerMode (nHandle, GXDMM_TRIGGER_ARRAY, 100);

GxDmmGetReadArrayStatus(nHandle, &bStatus);

while(!bStatus)

GxDmmGetReadArrayStatus(nHandle, &bStatus);

GxDmmReadArray (nHandle, adMeasurement, addwTime, 100, &nStatus);

 

See Also

GxDmmGetReadArrayStatus, GxDmmReadEx, GxDmmMeasure, GxDmmMeasureEx, GxDmmSetTriggerMode, GxDmmGetTriggerMode, GxDmmSetRange, GxDmmGetRange, GxDmmSetFunction, GxDmmGetFunction, GxDmmGetErrorString