Digital Waveform Data Representation

NI Digital Waveform Generator/Analyzer

Digital Waveform Data Representation

NI-HSDIO supports two data types to represent digital waveform data. The first data type is as a one-dimensional array of integer data. The other data type is the digital waveform data type (WDT). VIs and functions in NI-HSDIO that write or read/fetch digital waveform data can accept either data type.

The WDT is required when you use more than the 0 and 1 states in a waveform, for example, if your waveform includes Z's, X's, H's, or L's. Binary data uses only 1 bit per channel per sample, and this cannot represent more than two states. DWDT uses 8 bits per channel per sample and can represent extended digital states.

One difference between U32 array data and WDT data is memory usage. Each sample of U32 data occupies four bytes of PC memory, independent of the number of channels being used. Each sample of a digital WDT data occupies 1 byte for each channel used, but unused channels do not occupy memory. Thus, a 1,000-sample waveform of 16 channels represented in a raw U32 array would occupy
(4 Bytes/sample) x (1,000 samples) = 4 kBytes.

The same 1,000 sample waveform represented in a WDT would occupy approximately
(1 byte/channel) x (16 channels/sample) x (1,000 samples) = 16 kBytes.

Related Topics: