Using the DAQ Function of the GX2065

Knowledge Base Article # Q200228

Read Prior Article Read Next Article
Summary How to use the Data Acquisition Functionality of the GX2065 DMM
  
Login to rate article
The GX2065 is a 3U DMM and DAQ. The DAQ is capable of capturing up to 8192 Voltage or Current measurements to memory.

The DAQ function uses a 3Mhz sampling clock and a clock divider with a maximum value of 255, allowing a range of sampling frequencies (3Mhz to 11.76Khz).

Follow these steps to capture samples using the DAQ:

1. Set desired function by calling GxDmmSetFunction, and passing in VAC_AC, VAC_DC, IAC_AC, or IAC_DC (Voltage or Current). The function must be one of four "AC" functions in order to use the DAQ.

2. Set desired range by calling GxDmmSetRange

3. Call GxDmmSetACClockDivider and pass in the clock divider value (1 to 256).

4. Call GxDmmSetTriggerMode and pass in GXDMM_TRIGGER_ARRAY along with the number of samples you would like to capture (1 to 8192). This will initiate the capture process

5. Monitor the status of the capture by calling GxDmmGetReadArrayStatus. This function will return the finished state of the capture and the number of samples currently captured.

6. When the capture process has completed, call GxDmmReadArray to retrieve the samples. The function will return an array of samples as well as an array of time stamps. Each sample is accompanied by a time stamp in nano seconds.

The following is C example code to capture 1000 samples of voltage at a sampling rate of 1.5Mhz:

SHORT nHandle, nStatus;

//Measurement array
DOUBLE adMeasurements[1000];

//64 Bit Time Stamps
DDWORD addwTimeStamps[1000];

BOOL bFinished=FALSE;

//Initialize DMM
GxDmmInitialize(nSlot, &nHandle, &nStatus);

//Set Function to AC, AC coupled for DAQ functionality
GxDmmSetFunction(nHandle, GXDMM_FUNCTION_VAC_AC_CPL, &nStatus);

//Set Range to 10 Volts
GxDmmSetRange(nHandle, GXDMM_RANGE_10V, &nStatus);

//Divide DAQ 3Mhz clock by 2 to get 1.5Mhz sampling clock
GxDmmSetACClockDivider(nHandle, 2, &nStatus);

//Start capture of 1000 samples
GxDmmSetTriggerMode(nHandle, GXDMM_TRIGGER_ARRAY, 1000, &nStatus);

//Wait until capture complete
while(!bFinished)
GxDmmGetReadArrayStatus(nHandle, &bFinished, &dwSampleCount, &nStatus);

//Read back measurements and timestamps
GxDmmReadArray(nHandle, adMeasurements, addwTimeStamps, 1000, &nStatus);


Article Date 7/23/2012
Keywords Gx2065, DMM, DAQ, Sampling


Login to rate article

Read Prior Article Read Next Article