GtWaveArbFileLoad

Supported By

GX1110, GX1120

Applies To

Arbitrary Waveform Generator mode only.

Purpose

Load the specified file to the board.

Syntax

GtWaveArbFileLoad (nHandle, nChannel, szFileName, dwFileStart, dwStartAddress, pdwSize, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX11X0 board.
nChannel
SHORT
Not used, pass as 0.
szFileName
LPCSTR
File name. The saved data format will be determined by the file extension.
The driver supports the following file formats:
  • WaveEasy Files (*.WaveEasy)
  • NI-HWS Files (*.hws)
  • CSV (comma delimited) Files (*.csv)
  • Text Files (*.txt)
  • PRN (space delimited) Files (*.prn)
dwFileStart
DWORD

File start data point.

GX1120: Range: 0 to 2097151.

GX1120: Range: 0 to 33554431.
dwStartAddress
DWORD
Board start address to fill data.
pdwSize
PDWORD
Specified number of data points to load. If pdwSize=-1, then the function will load all the data from the file to the board. If there are more data points in the file than available memory, i.e. max number of steps less start address, the function returns an error without loading any data.
GX1120:
Range: 1 to 2097152 (GTWAVE_GX1120_ARB_WAVE_MAX_LENGTH).
GX1120: Range: 1 to 33554432 (GTWAVE_GX1120_ARB_WAVE_MAX_LENGTH).
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

GX1120:

Since there is only one channel, there is no meaning to the channel number.

When calling this function, the function will cast all values to 12-bit wide value and will clear all Marker and Sync bits previously set at the specified memory range.

Data point value of 2047 (0x7FF) represents highest output amplitude and -2047 (0x800) represents lowest output amplitude.

The following equation represents the relative output amplitude voltage:

Output voltage = amplitude setting (peak-to-peak)* (data point value)/4096+ offset

GX1120:

Since the memory is shared by both channels, there is no meaning to the channel number.

Data point value of 0x7FFF represents highest output amplitude and 0x8000 represents lowest output amplitude.

Example

The following example loads the “WaveEasy1.WaveEasy” file to the board starting at step 0 in the file, step 0 at the board and all available data in the file:

 

DWORD dwSize=-1;

GtWaveArbFileLoad(nHandle, GTWAVE_CHANNEL_A, “WaveEasy1.WaveEasy”, 0, 0, &dwSize, &nStatus);

 

See Also

GtWaveArbFileSave, GtWaveArbSetMarker, GtWaveArbSetSampleRate, GtWaveArbSetWaveformLength, GtWaveArbSetSync, GtWaveArbFillPredefinedWaveform, GtWaveArbReadWaveformData, GtWaveArbWriteWaveformData