At its most basic, allows you to read information from a network or to write information to a network. You can create complex applications with , but it is possible to create a basic, functional program with these elements alone.

The LabVIEW block diagram in the following figure shows the basic programming model.

Figure 3. Basic Program

LabVIEW block diagram for a simple program that reads data in a While Loop.

To create this basic program, complete the following steps:

  1. Create an session in a LabVIEW project: right-click My Computer, select New » Session, choose a valid session type to create for your device, and click Finish.
    You can create sessions for other input or output modes using the same technique. When you drag an output session to the diagram, creates a constant for data and wires that constant to Write. You can enter constant values to write, or, to change the data at run time, you can right-click the constant and select Change to Control.
    Note enables you to create sessions for multiple hardware interfaces. For each interface, you can use multiple input sessions and multiple output sessions simultaneously. The sessions can use different modes. For example, you can use a signal input single-point session for one interface that supports that session mode at the same time you use a frame input stream session for a different interface.
    The session appears in the project:
    LabVIEW Project Explorer with a project that includes an input session.
  2. Configure the session in the NI-XNET Session Setup window that appears.
  3. Create a VI in the project and open the block diagram.
  4. Drag a while loop to the diagram. Right-click the loop condition (the stop sign) and create a control (stop button).
  5. Drag the session from a LabVIEW project to the while loop.

    An session wired to the corresponding Read function is created.

  6. Right-click the data output from the Read and create an indicator.
  7. Run the VI.

    You can view the values that Read receives and stop program execution when you are done.

When you complete the preceding steps, you have created a fully functional application.

includes functions that extend this programming model to perform tasks such as:

  • Creating a session at run time (instead of a LabVIEW project)
  • Controlling the configuration and state of a session
  • Browsing and selecting a hardware interface
  • Managing and browsing database files, for protocols that support databases
  • Creating frames or signals at run time (instead of using a database file)