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

Publishing Latest Values with Shared Variables

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

A shared variable is a memory space that you can read data from and write data to. You can read and write shared variables on a single computer with single-process shared variables or on multiple computers with network-published shared variables, which publish data over a network using the NI Publish-Subscribe Protocol (NI-PSP). Use shared variables to publish only the latest values in a data set to one or more computers.

Note  To transfer every data point from one computer to another, National Instruments recommends sending commands or streaming data continuously with network streams. Refer to the Transferring Data over a Network topic for more information about choosing a networking feature that best fits your application needs.

In general, you must complete the following tasks to publish latest values with a shared variable:

  1. Create a shared variable.
  2. Configure the shared variable.
  3. Program your applications to read and write the shared variable.
  4. Make the shared variable available on the network.

Extending the Functionality of Shared Variables with the Real-Time and DSC Modules

The LabVIEW Real-Time and DSC Modules offer additional configuration and programming options for shared variables. For example, you can enable the real-time FIFOs of shared variables with the Real-Time Module and configure scaling and alarming properties for shared variables with the DSC Module. Refer to the Real-Time Module and DSC Module Help for more information about extending the functionality of shared variables.

Using Other Types of Variables

This book mainly describes the process of publishing latest values over a network using network-published shared variables. However, you also can perform the following tasks with other types of variables:


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