NI-HSDIO LabVIEW VIs

Table of Contents

niHSDIO Set Named Waveform Next Write Position VI

  • Updated2023-02-21
  • 5 minute(s) read
Installed With: NI-HSDIO

Modifies where to next write within a named waveform.

The niHSDIO Write Named Waveform VI always begins writing at the current write position. Existing data in the waveform is overwritten.

Related Topics

Details

niHSDIO Set Named Waveform Next Write Position

civrn.gif

instrument handle identifies your instrument session. instrument handle is obtained from the niHSDIO Init Acquisition Session VI, the niHSDIO Init Generation Session VI, or the niHSDIO Init Ext Cal VI.

cstr.gif

waveform name specifies the name to associate with the allocated waveform memory.

cu16.gif

position specifies where to place the write position, in conjunction with offset.

Current Write Position (45)

The offset is relative to the current write position in the waveform.

Start of Waveform (44)

The offset is relative to the beginning of the waveform.

ci32.gif

offset specifies an offset for the write position within the named waveform. offset is in samples.

Before issuing a write waveform command, the offset relative to the start of the waveform must be a multiple of 32 samples for NI 654x/655x devices (64 samples for the NI 6547/6548 in DDR mode) and a multiple of 64 samples for NI 656x devices (128 samples for the NI 656x is in DDR mode).

cerrcodeclst.gif

error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. The default is 0. If status is TRUE, code is a negative error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source identifies where an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

iivrn.gif

instrument handle out passes a reference to your instrument session to the next VI. instrument handle is obtained from the niHSDIO Init Acquisition Session VI or the niHSDIO Init Generation Session VI.

ierrcodeclst.gif

error out contains error information. This output provides standard error out functionality.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source identifies where and why an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

Details

position and offset are used together to determine the next write position. position describes an absolute or relative move. offset is the number of samples to shift the next write position. You must always set the write position at a position that is a multiple of 32 samples for NI 654x/655x devices (64 samples for the NI 6547/6548 in DDR mode) or a multiple of 64 samples for NI 656x devices (128 samples for the NI 656x in DDR mode).

The following table shows examples of combinations of position and offset.

Position Offset Next Write Position
Start of Waveform 0 Start of waveform
Start of Waveform 5 Sixth sample of waveform
Start of Waveform -1 ERROR. These settings would try to place write position before start of waveform.
Current Write Position 0 No effect. These settings leave the next write position unchanged.
Current Write Position 10 Shift write position 10 samples ahead from current location. This position setting is valid only if the current write position plus this offset is in the waveform.
Current Write Position -10 Shift write position 10 samples back from current location. This position setting is valid only if the current write position is greater than 10.

The write position is moved to the end of the most recently written data after each use of the niHSDIO Write Named Waveform VI. Thus you do not need to explicitly use the niHSDIO Set Named Waveform Next Write Position VI. Setting the position beyond the bounds of the allocated space produces an error.

Log in to get a better experience