NI-HSDIO LabVIEW VIs

niHSDIO Write Named Waveform VI

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

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

Details

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.

niHSDIO Write Named Waveform (1D U32)

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 of the waveform to configure position.

You should name waveforms using this VI under either of the following conditions:

  • You are using scripts.
  • You want to download multiple waveforms into the hardware.
c1du32.gif

data specifies the samples to write.

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.

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.

niHSDIO Write Named Waveform (1D U16)

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 of the waveform to configure position.

You should name waveforms using this VI under either of the following conditions:

  • You are using scripts.
  • You want to download multiple waveforms into the hardware.
c1du16.gif

data specifies the data to be written.

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.

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.

niHSDIO Write Named Waveform (1D U8)

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 of the waveform to configure position.

You should name waveforms using this VI under either of the following conditions:

  • You are using scripts.
  • You want to download multiple waveforms into the hardware.
c1du8.gif

data specifies the data for the waveform to be written.

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.

WDT

This instance of niHSDIO Write Named Waveform writes the waveform to onboard memory as waveform data type data.

niHSDIO Write Named Waveform (WDT)

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 of the waveform to configure position.

You should name waveforms using this VI under either of the following conditions:

  • You are using scripts.
  • You want to download multiple waveforms into the hardware.
cdigwfm.gif

data provides a waveform to generate.

cbool.gif

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.

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.

HWS

This instance of niHSDIO Write Named Waveform writes the waveform to onboard memory from a .hws (Hierarchical Waveform Storage) file.

niHSDIO Write Named Waveform From File (HWS)

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 of the waveform to configure position.

You should name waveforms using this VI under either of the following conditions:

  • You are using scripts.
  • You want to download multiple waveforms into the hardware.
cpath.gif

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.

cbool.gif

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.

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.

ii32.gif

waveform size returns the number of samples contained in the waveform.

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.

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

niHSDIO Write Named Waveform (Direct DMA)

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.

cu32.gif

window address specifies the window address from the Direct DMA-compatible data source.

ci32.gif

samples to write specifies the number of samples to write from the Direct DMA-compatible data source.

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

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.