Skip to content Skip to navigation

Connexions

You are here: Home » Content » Datasockets in LabVIEW

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the author

Recently Viewed

This feature requires Javascript to be enabled.

Datasockets in LabVIEW

Module by: Felix Annan

Summary: This module introduces inter-VI data transfer using datasockets

Datasockets can be used in many different ways; they can be used with the hyper text transfer protocol (http), the file transfer protocol (ftp) and basically any protocol that utilizes the Transmission Control Protocol (TCP) in some form.

To use datasockets to transfer data between VIs across a network it is necessary to set up the Datasockets Server. This is a program that runs on one of the machines in the network and acts as an intermediary, transferring data between computers that are connected to it. Once the server is running, a specific variable (temporary or permanent) can be created on the server to which multiple clients can read/write data. The data transfer uses the Datasocket Transfer Protocol (DSTP).

The Advantage:

  1. Can work with multiple network protocols
  2. Front Panel objects can be bound to a datasocket variable on the server to make the setup less complicated

The Disadvantage:

  1. Requires a server (this could be any of the communicating computers however)
  2. No buffering of information, the datasocket variable holds only one value at a time.

This method is similar to Network Published Shared Variables, generally they are good for the transfer of data that doesn’t change too often due to the lack of a buffer. The reader and writer must be synchronized to prevent loss of messages.

Implementation:

Once the Datasockets Server (listed in the Windows Start Menu for National Instruments) has been started, a sample as shown in the diagram can be set up. Alternatively to bind to a datasocket location the Databinding property of a front panel object can be used. Right-click on the object and click on Databind.

Figure 1: The VI on the left writes to a datasocket variable and the VI on the right reads from the datasocket variable
Datasockets
Datasockets (datasockets.jpg)

Comments, questions, feedback, criticisms?

Send feedback