LabVIEW associates each wire and terminal on the block diagram with a data type. LabVIEW keeps track of this type with a structure in memory called a type descriptor. This type descriptor is a sequence of 16-bit integers that can describe any data type in LabVIEW. Numeric values are written in hexadecimal format, unless otherwise noted.

Note The format in which LabVIEW stores type descriptors changed in LabVIEW 8.0. LabVIEW 7.x and earlier stores type descriptors in 16-bit flat representation. This information applies if you use the Convert 7.x Data mode of the Flatten To String function. The following information reflects how LabVIEW stores type descriptors in LabVIEW 7.x and earlier. |

The generic format of a type descriptor in LabVIEW 7.*x* and earlier is

<length> <type code>

Some type descriptors have additional information following the type code. Arrays and clusters are structured or aggregate data types because they include other types. For example, the cluster type contains additional information about the type of each of its elements.

The first word (16 bits) in any type descriptor is the length, in bytes, of that type descriptor, including the length word. The second word (16 bits) is the type code. LabVIEW reserves the high-order byte of the type code (the *xx* in the following tables) for internal use. When comparing two type descriptors for equality, you should ignore this byte. Two type descriptors are equal even if the high-order bytes of the type codes are not.

The type code encodes the actual type information, such as single-precision or extended-precision, floating-point number, as listed in the following table. These type code values might change in future versions of LabVIEW.

The following tables list numeric and non-numeric data types, type codes, and type descriptors.

Data Type | Type Code (numbers in hexadecimal) | Type Descriptor (numbers in hexadecimal) |
---|---|---|

8-bit Integer |
01 |
0005 |

16-bit Integer |
02 |
0005 |

32-bit Integer |
03 |
0005 |

64-bit Integer |
04 |
0005 |

Unsigned 8-bit Integer |
05 |
0005 |

Unsigned 16-bit Integer |
06 |
0005 |

Unsigned 32-bit Integer |
07 |
0005 |

Unsigned 64-bit Integer |
08 |
0005 |

Single-Precision Floating-Point Number |
09 |
0005 |

Double-Precision Floating-Point Number |
0A |
0005 |

Extended-Precision Floating-Point Number |
0B |
0005 |

Single-Precision Complex Floating-Point Number |
0C |
0005 |

Double-Precision Complex Floating-Point Number |
0D |
0005 |

Extended-Precision Complex Floating-Point Number |
0E |
0005 |

Enumerated 8-bit Integer |
15 |
<nn> |

Enumerated 16-bit Integer |
16 |
<nn> |

Enumerated 32-bit Integer |
17 |
<nn> |

Single-Precision Physical Quantity |
19 |
<nn> |

Double-Precision Physical Quantity |
1A |
<nn> |

Extended-Precision Physical Quantity |
1B |
<nn> |

Single-Precision Complex Physical Quantity |
1C |
<nn> |

Double-Precision Complex Physical Quantity |
1D |
<nn> |

Extended-Precision Complex Physical Quantity |
1E |
<nn> |

n=length; |

Data Type | Type Code (numbers in hexadecimal) | Type Descriptor (numbers in hexadecimal) |
---|---|---|

Boolean |
21 |
0004 |

String |
30 |
0008 |

Path |
32 |
0008 |

Picture |
33 |
0008 |

Array |
40 |
<nn> |

Cluster |
50 |
<nn> |

Waveform |
54 |
<nn> |

Refnum |
70 |
<nn> <refnum type code><specific type code information> |

Variant |
53 |
<nn> |

n=length; |

The minimum value in the size field of a type descriptor is 4, as shown in the previous table. However, any type descriptor can have a name (a Pascal string) appended, in which case the size field is larger by the length of the name rounded up to a multiple of two.

In the following example of an enumerated 8-bit integer for the items am, fm, and fm stereo, each group of characters represents a 16-bit word. The space enclosed in quotation marks (" ") represents an ASCII space.

0016 0015 0003 02a m02 fm 09f m" " st er eo

0016 indicates 22 bytes total. 0015 indicates an enumerated 8-bit integer. 0003 indicates there are three items.

In the following example of a double-precision physical quantity with units m/s, each group represents a 16-bit word.

000E 001A 0002 0002 FFFF 0003 0001

000E indicates 14 bytes total. 001A indicates this is a double-precision physical quantity. 0002 indicates two base-exponent pairs. 0002 denotes the seconds base index. FFFF (–1) is the exponent of seconds. 0003 denotes the meters base index. 0001 is the exponent of meters.

LabVIEW stores all physical quantities internally in terms of base units, regardless of the units used to display them.

The following table shows the nine bases that are represented by indexes 0 through 8 for radians through candela.

Quantity Name | Unit | Abbreviation | Base Value |
---|---|---|---|

plane angle |
radian | rad | 0 |

solid angle |
steradian | sr | 1 |

time |
second | s | 2 |

length |
meter | m | 3 |

mass |
kilogram | kg | 4 |

electric current |
ampere | A | 5 |

thermodynamic temperature |
kelvin | K | 6 |

amount of substance |
mole | mol | 7 |

luminous intensity |
candela | cd | 8 |

The string, path, and picture data types have a 32-bit length, similar to the array dimension size. However, the only value currently encoded is FFFFFFFF (–1), which indicates variable sized. Currently, all strings, paths, and pictures are variable sized. The actual length is stored with the data.

The array and cluster data types each have their own type code. They also contain additional information about the data types of their elements and the dimensionality for arrays or number of elements for clusters.

The type code for an array is 40. A word that contains the number of dimensions of the array immediately follows the type code. Then, for each dimension, a 32-bit integer contains the size in elements of that dimension. Finally, after all of the dimension sizes, the type descriptor for the element appears. The element type can be any type except an array. Currently all sizes are FFFFFFFF (–1), which means the array dimension size is variable. LabVIEW stores the actual dimension size, which is always greater than or equal to zero, with the data. The following example is a type descriptor for a 1D array of double-precision floating-point numbers:

000E 0040 0001 FFFF FFFF 0004 000A

000E is the length of the entire type descriptor, including the element type descriptor. The array is variable sized, so the dimension size is FFFFFFFF. The element type descriptor (0004 000A) appears exactly as it does for a scalar of the same type.

The following example is a type descriptor for a 2D array of Boolean values:

0012 0040 0002 FFFF FFFF FFFF FFFF 0004 0021

The type code for a cluster is 50. A word that contains the number of items in the cluster immediately follows the type code. The type descriptor for each element in *cluster order* follows this word. For example, consider a cluster of two integers, a 16-bit signed integer and a 32-bit unsigned integer:

000E 0050 0002 0004 0002 0004 0007

000E is the length of the type descriptor including the element type descriptors.

Because array and cluster type descriptors contain other type descriptors, they might become deeply nested. For example, the following is a type descriptor for a multi-plot graph. The numeric types can vary.

0028 0040 0001 FFFF FFFF...1D array of

001E 0050 0001...1 component cluster of

0018 0040 0001 FFFF FFFF...1D array of

000E 0050 0002...2 component cluster of

0004 000A...double-precision floating-point number

0004 0003...32-bit integer

The type code for a waveform is 54. A word that contains the type of waveform immediately follows the type code. The type descriptor of the cluster of the waveforms elements follows this word. There are five categories of waveforms:

- Analog
- Digital
- Digital Data
- Time Stamp
- Dynamic

The following table lists the types of analog waveforms.

Type | Subtype Code |
---|---|

8-bit signed |
14 |

16-bit signed |
2 |

32-bit signed |
15 |

64-bit signed |
19 |

Double-Precision |
3 |

Single-Precision |
5 |

Extended-Precision |
10 |

8-bit unsigned |
11 |

16-bit unsigned |
12 |

32-bit unsigned |
13 |

64-bit unsigned |
20 |

Complex Single-Precision |
16 |

Complex Double-Precision |
17 |

Complex Extended-Precision |
18 |

For example, consider a double-precision waveform:

0086 0054 0003...size of waveform, followed by type and subtype code

0080 0050 0005...size of cluster, cluster code, and number of elements

<type descriptor of time stamp>

<type descriptor of *dt*>

<type descriptor of array of element type>

<type descriptor of unused error cluster>

<type descriptor of attributes>

The type descriptor of the other types of analog waveforms is similar to the double-precision waveform. The difference is a different type for the array element and a different subtype.

The digital waveform is the only type of waveform that has a subtype code 8.

For example,

00B6 0054 0008...size of digital waveform, type code and subtype code

00B0 0050 0005...size of cluster, cluster code and number of elements

<type descriptor of time stamp>

<type descriptor of *dt*>

<type descriptor of digital data>

<type descriptor of unused error cluster>

<type descriptor of attributes>

Digital data is the only data type with a waveform type code and a subtype code of 7.

For example,

003E 0054 0007...size of digital data, type code and subtype code

0038 0050 0002...size of cluster, cluster code and number of elements.

<type descriptor of transitions>

<type descriptor of data>

The time stamp has a subtype code of 6. The time stamp is a 128-bit fixed-point number. LabVIEW stores a time stamp as a cluster of four integers where the first two integers (64 bits) represent the number of whole seconds after 12:00 a.m., Friday, January 1, 1904, Universal Time [01-01-1904 00:00:00]. The next two integers (64 bits) represent the fractions of seconds.

001C 0054 0006 0016 0050 0004 0004 0003, 0004 0003, 0004 0003, 0004 0003

09...size of dynamic waveform, type code subtype

0096 0050 0001...cluster of one element

0090 0040 0001 FFFF FFFF...array of one element

<type descriptor of an analog waveform>