Saturday, September 25, 2010

Datasockets in LabVIEW

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

Content actions
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)

GIVE FEEDBACK:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Popular Projects

My Blog List

Give support

Give support
Encourage Me through Comments & Followers

Followers