niHSDIO Write Named Waveform
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. Supported devices for the binary instances of this VI depend on the data width for your device, not on the number of assigned dynamic channels. The WDT and HWS instances do not have this restriction. Details.
Use the pull-down menu to select an instance of this VI.
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. This instance is supported for devices with a data width of 4.
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.
You should name waveforms using this VI under either of the following conditions:
|
|||||||
data is the waveform where acquired samples are written. | |||||||
error in describes error conditions that occur before this VI or function runs.
| |||||||
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.
|
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. This instance is supported for devices with a data width of 2.
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.
You should name waveforms using this VI under either of the following conditions:
|
|||||||
data contains the data to be written. | |||||||
error in describes error conditions that occur before this VI or function runs.
| |||||||
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.
|
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. This instance is supported for devices with a data width of 1.
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.
You should name waveforms using this VI under either of the following conditions:
|
|||||||
data contains the data for the waveform to be written. | |||||||
error in describes error conditions that occur before this VI or function runs.
| |||||||
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.
|
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 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.
You should name waveforms using this VI under either of the following conditions:
|
|||||||
data is the waveform where acquired samples are written. | |||||||
Use rate from waveform controls 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 VI, Use rate from waveform overrides the sample rate. |
|||||||
error in describes error conditions that occur before this VI or function runs.
| |||||||
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.
|
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 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.
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 controls 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 VI, Use rate from waveform overrides the sample rate. |
|||||||
error in describes error conditions that occur before this VI or function runs.
| |||||||
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. | |||||||
waveform size returns the number of samples contained in the waveform. | |||||||
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.
|
Direct DMA
Writes a specified amount of data from a Direct DMA-compatible device to the waveform in onboard memory. The sample size is 4 bytes for NI 654x/655x devices, and 2 bytes for the NI 656x in SDR mode or 1 byte in DDR mode.
instrument handle identifies your instrument session. instrument handle was obtained from the niHSDIO Init Acquisition Session VI or the niHSDIO Init Generation Session VI. | |||||||
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. | |||||||
waveform name represents the name to associate with the allocated waveform memory.
You should name waveforms using this VI under either of the following conditions:
|
|||||||
error in describes error conditions that occur before this VI or function runs.
|
|||||||
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.
|
niHSDIO Write Named Waveform 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 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 function has only written a 5 KB waveform, the remaining 5 KB contain invalid data. |