What is the Structure in Memory of a Reference Number (Refnum) Used by LabVIEW?

Updated Jan 29, 2019

Reported In

Software

  • LabVIEW

Issue Details

How does LabVIEW store the type descriptor for a Reference Number (refnum) in memory? What are the new Queue/Notification refnums?

Solution

A reference number (refnum) is a structure used to identify and recover some operation that has been performed inside LabVIEW. 

The general structure of the refnum is :
[length] [type code] [type code for specific refnum] [specific type code information] [number of characters in label] [label characters]

The description of the number is (in hexadecimal format): 
  1. [length] 
    Number of bytes that exist in this datatype
  2. [type code]
    7030 - Code for refnums
  3. [type code for specific refnum]
    01 - Data Log File or a GOOP (Graphical Object-Oriented Programming) refnum
    02 - Byte Stream File
    04 - Occurrence
    05 - TCP/IP Network Communication
    07 - Activex Automation
    08 01 00- Application VI 
    08 02 04 00 - VI Refnum 
    08 06 04 00 - Control 
    09 - Menu
    0E - Visa Resource Name
    0F - IVI Logical Name
    10 - UDP Network Communication
    11 - Notification*
    12 - Queue*
  4. [specific type code information]
    The code in this area is specific for each refnum. Please check on the link below for further information. 
  5. [number of characters in label] and representative [label characters]

(*) Note: The new refnums for Notification and Queue are a new kind of refnum implemented in LabVIEW 6.1. In older versions, they appear as type code 01 (GOOP refnum).

If you are interested in obtaining some specific information for a refnum, you can follow these instructions:
 

7.x or earlier
1. Create a Control Refnum on the front panel of a VI.
2. Create a Property Node and select Type Descriptor.
3. Create an Indicator for the property node and examine the results after you execute the program.
You will be able to see the composition of type descriptor examining the array obtained with TypeDesc.
 

8.x and later
The Type Descriptor property node was dropped in later versions of LabVIEW.