Data Conversion
NI-HWS can convert some waveform data from the data type in which it was stored to a different data type when the data is read or retrieved. The table below shows the supported type conversions. A "Yes" in a box means that data stored as one data type can be retrieved as the other data type; a dash means the conversion is not supported.
F64 and DBL are both used by NI-HWS to mean double-precision floating-point numbers.
Analog Data Types
Stored Type | Retrieved Type | ||||
---|---|---|---|---|---|
Analog WDT | Analog I8 | Analog I16 | Analog I32 | Analog F64 | |
Analog WDT |
Yes | — | — | — | Yes |
Analog F64 |
Yes | — | — | — | Yes |
Analog I8 |
Yes | Yes | Yes | Yes | Yes |
Analog I16 |
Yes | — | Yes | Yes | Yes |
Analog I32 |
Yes | — | — | Yes | Yes |
Digital Data Types
Stored Type | Retrieved Type | ||||||
---|---|---|---|---|---|---|---|
Digital WDT | Digital 1D U8 | Digital 2D U8 | Digital 1D U16 | Digital 2D U16 | Digital 1D U32 | Digital 2D U32 | |
Digital WDT |
Yes | — | — | — | — | — | — |
Digital 1D U8 |
Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Digital 2D U8 |
Yes | — | Yes | — | Yes | — | Yes |
Digital 1D U16 |
Yes | Yes* | Yes* | Yes | Yes | Yes | Yes |
Digital 2D U16 |
Yes | — | Yes* | — | Yes | — | Yes |
Digital 1D U32 |
Yes | Yes* | Yes* | Yes* | Yes* | Yes | Yes |
Digital 2D U32 |
Yes | — | Yes* | — | Yes* | — | Yes |
*For digital waveforms, smaller data types can read larger data types with the following restrictions: the data must be mapped and all mapped bits must be within the smaller data types range. |
Waveforms are stored in groups with one or more waveforms per group. A waveform attribute is intended to apply only to its waveforms, not to the group.
A waveform reference is required to read or write any waveform data or attributes. Waveform names are used to obtain waveform references. However, if only one waveform is in the group, the waveform name is not needed. When two or more waveforms are in a group, the waveform name is required.