Set Named Waveform Next Write Position
- Updated2023-02-17
- 4 minute(s) read
Set Named Waveform Next Write Position
Modifies where to next write within a named waveform.
The Write Named Waveformnode always begins writing at the current write position. Existing data in the waveform is overwritten.
Inputs/Outputs

session in
Instrument session obtained from the Initialize Acquisition Sessionnode, the Initialize Generation Sessionnode, or the Initialize External Calibrationnode.

waveform name
The name you want to associate with the allocated waveform memory.

position
Parameter that specifies where to place the write position, in conjunction with offset.
| Current Write Position | The offset is relative to the current write position in the waveform. | |
| Start of Waveform | The offset is relative to the beginning of the waveform. |

offset
The specified 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 PXI/PXIe-654x/655x devices (64 samples for the PXI/PXIe-6547/6548 in DDR mode) and a multiple of 64 samples for PXI/PXIe-656x devices (128 samples for the PXI/PXIe-656x is in DDR mode).

error in
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Default value: No error

session out
Handle that identifies the session in all subsequent node calls.
The session out parameter is obtained from the Initialize Acquisition Sessionnode or the Initialize Generation Sessionnode.

error out
Error information.
The node produces this output according to standard error behavior.
Using the position and offset parameters
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 PXI/PXIe-654x/655x devices (64 samples for the PXI/PXIe-6547/6548 in DDR mode) or a multiple of 64 samples for PXI/PXIe-656x devices (128 samples for the PXI/PXIe-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 Write Named Waveformnode. Thus you do not need to explicitly use the Set Named Waveform Next Write Positionnode. Setting the position beyond the bounds of the allocated space produces an error.