Skip to content Skip to navigation

Connexions

You are here: Home » Content » Datasockets in LabVIEW

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Datasockets in LabVIEW

Module by: Felix Annan. E-mail the author

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)

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

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

What is in a lens?

Lens makers point to 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 member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks