GtWaveArbFileSave

Supported By

GX1110, GX1120 ,

Applies To

Arbitrary Waveform Generator mode only.

Purpose

Save the specified board data to a file.

Syntax

GtWaveArbFileSave (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 support 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 starts data point.
GX1120:
Range: 1 to 2097151.
dwStartAddress
DWORD
Board start address to read data.
pdwSize
PDWORD
Specified number of data points to save. If pdwSize=-1, then the function will save all the data from the board. The start address and the size must meet the specification that. Start address + Length <= max number of board’s steps.
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 a 12-bit wide value and will clear all Marker and Sync bits previously set at the specified memory range.

A data point value of 2047 (0x7FF) represents the maximum output amplitude and -2047 (0x800) represents the 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 saves 4096 data points from the board starting at step 0 in the file and, step 0 at the board:

 

DWORD dwSize=4096;

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

 

See Also

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