niHSDIO Write Named Waveform VI
- Updated2023-02-21
- 15 minute(s) read
Transfers waveform data from PC memory to onboard memory. If you specify a waveform name not already being used on the instrument, the appropriate amount of onboard memory is allocated (if available) and the data is stored in that new location. For binary data, choose the appropriate instance of this VI or function based on your data width. For data other than binary data, choose the appropriate instance of this VI or function based on your cycle-cycle-tristate or hardware compare needs.
Related Topics
1D U32
This instance of niHSDIO Write Named Waveform writes the waveform to onboard memory from a one-dimensional array of unsigned 32-bit data.

![]() |
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. |
||||||
![]() |
waveform name specifies the name of the waveform to configure position. You should name waveforms using this VI under either of the following conditions:
|
||||||
![]() |
data specifies the samples to write. |
||||||
![]() |
error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality.
|
||||||
![]() |
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. |
||||||
![]() |
error out contains error information. This output provides standard error out functionality.
|
1D U16
This instance of niHSDIO Write Named Waveform writes the waveform to onboard memory from a one-dimensional array of unsigned 16-bit data.

![]() |
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. |
||||||
![]() |
waveform name specifies the name of the waveform to configure position. You should name waveforms using this VI under either of the following conditions:
|
||||||
![]() |
data specifies the data to be written. |
||||||
![]() |
error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality.
|
||||||
![]() |
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. |
||||||
![]() |
error out contains error information. This output provides standard error out functionality.
|
1D U8
This instance of niHSDIO Write Named Waveform writes the waveform to onboard memory from a one-dimensional array of unsigned 8-bit data.

![]() |
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. |
||||||
![]() |
waveform name specifies the name of the waveform to configure position. You should name waveforms using this VI under either of the following conditions:
|
||||||
![]() |
data specifies the data for the waveform to be written. |
||||||
![]() |
error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality.
|
||||||
![]() |
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. |
||||||
![]() |
error out contains error information. This output provides standard error out functionality.
|
WDT
This instance of niHSDIO Write Named Waveform writes the waveform to onboard memory as waveform data type data.

![]() |
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. |
||||||
![]() |
waveform name specifies the name of the waveform to configure position. You should name waveforms using this VI under either of the following conditions:
|
||||||
![]() |
data provides a waveform to generate. |
||||||
![]() |
Use rate from waveform specifies how the sample rate is computed. Setting this value to TRUE computes the sample rate from the WDT value. If the sample rate has been configured using the niHSDIO Configure Sample Clock, Use rate from waveform overrides the sample rate. |
||||||
![]() |
error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality.
|
||||||
![]() |
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. |
||||||
![]() |
error out contains error information. This output provides standard error out functionality.
|
HWS
This instance of niHSDIO Write Named Waveform writes the waveform to onboard memory from a .hws (Hierarchical Waveform Storage) file.

![]() |
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. |
||||||
![]() |
waveform name specifies the name of the waveform to configure position. You should name waveforms using this VI under either of the following conditions:
|
||||||
![]() |
file path specifies the path and file name of the HWS file to open. The .hws extension is typically used for HWS files, although using this extension is optional. |
||||||
![]() |
Use rate from waveform specifies how the sample rate is computed. Setting this value to TRUE computes the sample rate from the WDT value. If the sample rate has been configured using the niHSDIO Configure Sample Clock, Use rate from waveform overrides the sample rate. |
||||||
![]() |
error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality.
|
||||||
![]() |
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. |
||||||
![]() |
waveform size returns the number of samples contained in the waveform. |
||||||
![]() |
error out contains error information. This output provides standard error out functionality.
|
Direct DMA
This instance of niHSDIO Write Named Waveform writes a specified amount of data from a Direct DMA-compatible device to the waveform in onboard memory.
The sample size of the data you write is shown by the following table.
| Device | Sample Size in Bytes |
|---|---|
| NI 6541/6542 | 4 |
| NI 6544/6545 | 4 |
| NI 6547/6548 | 4 in SDR mode; 2 in DDR mode |
| NI 655x | 4 |
| NI 656x | 2 in SDR mode; 1 in DDR mode |

![]() |
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. |
||||||
![]() |
waveform name specifies the name to associate with the allocated waveform memory. |
||||||
![]() |
window address specifies the window address from the Direct DMA-compatible data source. |
||||||
![]() |
samples to write specifies the number of samples to write from the Direct DMA-compatible data source. |
||||||
![]() |
error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality.
|
||||||
![]() |
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. |
||||||
![]() |
error out contains error information. This output provides standard error out functionality.
|
Details
Data is always written to memory starting at the waveform write position. The initial write position for a new waveform is the start of the allocated memory. This VI moves the next write position to the end of the data just written, so subsequent uses of this VI appends data to the end of previously written data. You may also manually change the write position with the niHSDIO Set Named Waveform Next Write Position VI. If you try to write past the end of the allocated space, the VI returns an error.
Waveforms are stored contiguously in onboard memory. You cannot resize an existing named waveform. Instead, delete the existing waveform using the niHSDIO Delete Named Waveform VI and then re-create it with the new size using the same name.
This VI also calls the Dynamic instance of the niHSDIO Commit VI.
When you explicitly call the niHSDIO Allocate Named Waveform VI and write waveforms using multiple niHSDIO Write Named Waveform VIs, each waveform block written must be a multiple of 32 samples for the NI 654x/655x devices (64 samples for the NI 6547/6548 in DDR mode) or a multiple of 64 samples for the NI 656x devices (128 samples in DDR mode).
![]() |
Note If the waveform was allocated 10 KB, but this VI has only written a 5 KB waveform, the remaining 5 KB contain invalid data. |
















