Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Types of Refnum Controls

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

LabVIEW includes the following refnum controls located on the Refnum palette:

.NET Refnum—Use this refnum to launch the Select .NET Constructor dialog box and select an assembly in the Global Assembly Cache (GAC) or navigate to a private assembly.
Application Refnum—Used with the VI Server. Use this refnum control when you open a reference to a LabVIEW application and you want to pass the reference as a parameter to another VI. By passing this refnum to the VI Server, you can control the behavior and read properties of the application.

You can right-click an application refnum control and select Select VI Server Class from the shortcut menu to change the data type of the control—an application, a VI, a control or indicator, or a strictly typed VI.

You can drag any control and drop it on an application refnum to specify the type of control to which it refers.
Automation Refnum—Used with the ActiveX functions. Use this type of refnum when you open a reference to an ActiveX Server Object and you want to pass it as a parameter to another VI. To specify the type of the refnum, right-click it and select Select ActiveX Class»Browse from the shortcut menu to display the Select Object From Type Library dialog box and browse the list of available ActiveX Server applications.
Bluetooth Network Connection Refnum—Used with the Bluetooth VIs and functions. Use this type of refnum to open a connection to a Bluetooth device.
Byte Stream File Refnum—Used with text or binary byte stream files. Use this type of refnum when you open or create a file in one VI but want to perform I/O operations on the file in another VI. You must have a refnum control on the front panel of the VI that performs I/O operations and a refnum indicator on the front panel of the VI that opens or creates the file.
Control Refnum—Used with the VI Server. Use this refnum control when you open a reference to a front panel control or indicator and you want to pass the reference as a parameter to another VI. By passing this refnum to the VI Server, you can control the behavior and properties of the control.

You can right-click a control refnum control and select Select VI Server Class from the shortcut menu to specify the data type of the control—an application, a VI, a control or indicator, or a strictly typed VI.

Right-click a control refnum control on the front panel and select Show Icon from the shortcut menu to view the refnum as an icon. Right-click the refnum on the front panel and select Show Control on the shortcut menu to view the refnum as a control. Note that the control is for display only.

You can drag any control and drop it on a control refnum to specify the type of control to which it refers.
Data Log File Refnum—Used with datalog files. Because datalog files have an inherent structure, the Data Log File Refnum passes the refnum and a description of the file type to and from calling VIs. Place a control inside the refnum to define the structure of the file. For a file that contains numbers, create a datalog refnum that contains a number. If each record in the file contains a pair of numbers, place a cluster inside the refnum and place two numeric controls inside the cluster.

You can drag any control and drop it on a data log file refnum to specify the data type of the datalog file.
DataSocket Refnum—Used with DataSocket functions. Use this type of refnum when you want to open a reference to a data connection and you want to pass it as a parameter to another VI. To specify the type of the refnum, right-click it and select Select DataSocket Class from the shortcut menu to browse to the DataSocket class.
Event Callback Refnum—Use this refnum to unregister or re-register the event callback. You also can use this refnum to pass the event callback registration to a subVI.
IrDA Network Connection Refnum—Used with the IrDA functions. Use this type of refnum when you want to open a connection to an IrDA device.
Menu Refnum—Used with the Menu functions. Use this type of refnum when you want to pass a VI menu reference to a subVI.
Occurrence Refnum—Used with the Occurrence functions. Use this type of refnum when you generate an occurrence in one VI but want to set or wait for the occurrence in another VI.
TCP Network Connection Refnum—Used with the TCP VIs and functions. Use this type of refnum when you open a network connection in one VI but want to perform I/O operations on the network connection in another VI.
UDP Network Connection Refnum—Used with the UDP VI and functions. Use this type of refnum when you want to uniquely identify a UDP socket. You can pass the UDP socket reference to a subVI so the subVI can use the socket.
VI Refnum—Used with the VI Server. Use this refnum control when you open a reference to a VI and you want to pass the reference as a parameter to another VI. By passing this refnum to the VI Server, you can control the behavior and properties of the VI.

Use VI refnum controls to pass a VI refnum from one VI to another. The Open VI Reference function requires a strictly typed VI refnum control as a type specifier input when you want a strictly typed reference to a VI. In this case, the value of the refnum control is unimportant. The function uses only the type.

You can drag any control and drop it on a VI refnum to specify the type of control to which it refers.

The following refnums are not located on the Refnum palette:

  • Config Data Refnum—Used with the Configuration File VIs when you want to open a configuration file in one VI and read from it or write to it in another VI.

    Right-click a refnum input terminal of a Configuration File VI and select Create»Control from the shortcut menu to create this refnum control. Creating a config data refnum control does not create a config data reference. You must use the Open Config Data VI to create a config data reference.
  • IMAQ Session Refnum—Used with the Image Acquisition VIs.
  • Motion Refnum—Used with the NI SoftMotion VIs and functions.
  • Notifier Refnum—Used with the Notifier Operations functions when you want to suspend the execution of a block diagram until you receive data from another section of the block diagram or from another VI running on the same computer.

    Right-click a refnum input terminal of a Notifier Operations function and select Create»Control from the shortcut menu to create this refnum control. Creating a notifier refnum control does not create a notifier reference. You must use the Obtain Notifier function to create a notifier reference.

    Right-click a notifier refnum on the front panel and select Show Icon from the shortcut menu to view the refnum as an icon. Right-click the refnum on the front panel and select Show Control on the shortcut menu to view the refnum as a control. Note that the control is for display only.

    You can drag any control and drop it on a notifier out refnum to specify the data type of the notifier.
  • Queue Refnum—Used with the Queue Operations functions when you want to store data in a queue, which you can later retrieve as individual elements or as an array of all the data elements.

    Right-click a refnum input terminal of a Queue Operations function and select Create»Control from the shortcut menu to create this refnum control. Creating a queue refnum control does not create a queue reference. You must use the Obtain Queue function to create a queue reference.

    Right-click a queue refnum on the front panel and select Show Icon from the shortcut menu to view the refnum as an icon. Right-click the refnum on the front panel and select Show Control on the shortcut menu to view the refnum as a control. Note that the control is for display only.

    You can drag any control and drop it on a queue refnum to specify the data type of the queue.
  • Rendezvous Refnum—Used with the Rendezvous VIs when you want to create a rendezvous in one VI and wait at the rendezvous in another VI.

    Right-click a refnum input terminal of a Rendezvous VI and select Create»Control from the shortcut menu to create this refnum control. Creating a rendezvous refnum control does not create a valid rendezvous reference. You must use the Create Rendezvous VI to create a rendezvous reference.
  • Semaphore Refnum—Used with the Semaphore VIs when you want to prevent two VIs or two sections of the same VI from executing in parallel.

    Right-click a refnum input terminal of a Semaphore VI and select Create»Control from the shortcut menu to create this refnum control. Creating a semaphore refnum control does not create a valid reference to a semaphore. You must use the Obtain Semaphore Reference VI to create a reference to a semaphore.
  • Shared Variable Refnum—Used with the Variable properties to configure shared variables programmatically.

    Right-click the Variable Reference output of a Variable Reference property and select Create»Control from the shortcut menu to create this refnum control.
  • TDMS File Refnum—Used with the TDMS Streaming VIs and functions to read and write waveforms and waveform properties to binary measurement files (.tdms).

    Right-click the tdms file input of a TDMS Read function and select Create»Control from the shortcut menu to create this refnum control. Creating a tdms file control does not create a tdms file reference. You must use the TDMS Open function to create a tdms file reference.
  • Data Value Refnum—Used with the In Place Element structure when you want to operate on a data value without requiring the LabVIEW compiler to copy the data values and maintain those values in memory.

    Right-click the Data Value Reference output of the In Place Element structure to create this refnum control. Creating a data value refnum control does not create a data value reference. You must use the New Data Value Reference function to create a data value reference.

    Right-click a data value refnum on the front panel and select Show Icon from the shortcut menu to view the refnum as an icon. Right-click the refnum on the front panel and select Show Control on the shortcut menu to view the refnum as a control. Note that the control is for display only.
  • External Data Value Refnum—Used with the In Place Element structure when you want to operate on an external data value without incurring a data copy to bring the data into LabVIEW. Creating an external data value refnum control does not create an external data value reference. You must get the external data value reference from a device driver that supports external data value references.

    To change a data value reference to an external data value reference, right-click the data value reference and select External from the shortcut menu. You also can use the Is External property to change a data value reference to an external data value reference programmatically.

    Right-click an external data value refnum on the front panel and select Show Icon from the shortcut menu to view the refnum as an icon. Right-click the refnum on the front panel and select Show Control on the shortcut menu to view the refnum as a control. Note that the control is for display only.

  • Variable Refnum—Used with the Shared Variable functions and the Variable properties and methods to find, read, and write shared variables programmatically.

    Right-click the shared variable refnum in input terminal of a Shared Variable function to create this refnum control.

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit