Gx3722DigitizerReadWaveform

Purpose

Reads the digitizer memory’s waveform double precision values into an array.

Syntax

Gx3722DigitizerReadWaveform (nHandle, nChannel, padWaveform, pdwWaveformSize, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX3722 board.
nChannel
SHORT
Channel number:
1.      GX3722_DIGITIZER_CH1: Read the acquired data from channel 1.
2.    GX3722_DIGITIZER_CH2: Read the acquired data from channel 2.
padWaveform
PDOUBLE
Buffer to hold the waveform array of Doubles.
pdwWaveformSize
PDWORD
When calling this function, it should hold the number of elements in pvWaveform. On return, the function will return the actual number of elements copied to the array.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Digitizer memory cannot not be written to and read from at the same time.  Use Gx3722GetSampleStatus() API to ensure that the digitizer is not operating before calling this function.

Example

The following example begins digitizing and then reads back the values:

 

DOUBLE adWave[2048];

DWORD dwSize=2048;

SHORT nSampleStatus;

 

Gx3722DigitizerSetSampleCount (nHandle, dwSize, &nStatus);

Gx3722DigitizerTrigger (nHandle, &nStatus);

do

{

    Sleep(100);

    Gx3722DigitizerGetSampleStatus (nHandle, &nSampleStatus, &nStatus);

} while (nSampleStatus==GX3722_DIGITIZER_STATUS_BUSY);

Gx3722DigitizerReadWaveform (nHandle, GX3722_DIGITIZER_CH1, adWave, &dwSize, &nStatus);

 

See Also

Gx3722DigitizerArm, Gx3722DigitizerHalt, Gx3722DigitizerSetTriggerSource, Gx3722DigitizerSetTriggerMode, Gx3722DigitizerSetTriggerThreshold, Gx3722DigitizerSetSampleCount, Gx3722DigitizerTrigger, Gx3722DigitizerReadWaveformEx, Gx3722DigitizerSetPxiTrigger, Gx3722DigitizerGetState, Gx3722DigitizerGetSampleStatus, Gx3722DigitizerGetTriggerStatus, GxFpgaGetErrorString