niHSDIO Set Named Waveform Next Write Position

NI Digital Waveform Generator/Analyzer

niHSDIO Set Named Waveform Next Write Position

Modifies where within a named waveform to next write data.

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

instrument handle identifies your instrument session. instrument handle was obtained from the niHSDIO Init Acquisition Session VI or the niHSDIO Init Generation Session VI.
waveform name represents the name to associate with the allocated waveform memory.
position Specifies where to place the write position, in conjunction with offset. You can choose either Current Write Position or Start of Waveform as the values for this control.

If you choose Start of Waveform, the offset is relative to the beginning of the waveform. If you choose Current Write Position, the offset is relative to the current write position in the waveform.

offset allows you to set the write position of the named waveform, in conjunction with position. offset is in samples.

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

error in describes error conditions that occur before this VI or function runs.
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.
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.
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.
instrument handle out passes a reference to your instrument session to the next VI. instrument handle was obtained from the niHSDIO Init Acquisition Session VI or the niHSDIO Init Generation Session VI.
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
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.
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.

niHSDIO Set Named Waveform Next Write Position Details

position and offset are used together to determine where the next write position will be. 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 the NI 654x/655x or a multiple of 64 samples for the NI 656x (128 samples for the NI 656x in DDR mode).

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 this VI unless you want to. Attempting to set the write position beyond the bounds of the allocated space results in an error.

Examples of combinations of position and offset:

Position Offset Next Write Position
Start of Waveform 0Start 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 only valid 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 only valid if the current write position is greater than 10.