Configures the start position to use for writing a waveform before calling the niRFSG_WriteArbWaveform function.

Syntax

ViStatus __stdcall niRFSG_SetArbWaveformNextWritePosition(ViSession vi, ViConstString waveformName, ViInt32 relativeTo, ViInt32 offset)

Remarks

This function allows you to write to arbitrary locations within the waveform. These settings apply only to the next write to the waveform specified by the name input of the niRFSG_AllocateArbWaveform function or the niRFSG_WriteArbWaveform function. Subsequent writes to that waveform begin where the last write ended, unless this function is called again.

Note

If you use this function to write the waveform that is currently generating, an undefined output may result.

Supported Devices: PXIe-5644/5645/5646, PXIe-5820/5830/5831/5832/5840/5841/5842/5860

Parameters

NameDirectionTypeDescription
vi[in]ViSession

Identifies your instrument session. The ViSession handle is obtained from the niRFSG_Init function or the niRFSG_InitWithOptions function and identifies a particular instrument session.

waveformName[in]ViConstString

Specifies the name of the waveform. This string is case-insensitive and alphanumeric, and it cannot use reserved words.

relativeTo[in]ViInt32

Specifies the reference position in the waveform. The position and offset together determine where to start loading data into the waveform.

Defined Values:

Name

Value

Description

NIRFSG_VAL_CURRENT_POSITION

8001 (0x1f41)

The reference position is relative to the current position.

NIRFSG_VAL_START_OF_WAVEFORM

8000 (0x1f40)

The reference position is relative to the start of the waveform.

offset[in]ViInt32

Specifies the offset from the relative to parameter at which to start loading the data into the waveform.

Returns

Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. Examine the status code from each call to an instrument driver function to determine if an error occurred. To obtain a text description of the error code, call the niRFSG_GetError function. The general meaning of the status code is as follows:

Value

Meaning

0

Success

Positive Values

Warnings

Negative Values

Errors