Publishing Latest Values with Shared Variables
- Updated2025-01-22
- 2 minute(s) read
Publishing Latest Values with Shared Variables
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.
In general, you must complete the following tasks to publish latest values with a shared variable:
- Create a shared variable.
- Configure the shared variable.
- Program your applications to read and write the shared variable.
- 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:
- Use I/O variables for single-point access to I/O data through the NI Scan Engine.
- Use global variables to read and write data on a single computer.
- Use local variables to read and write data in a single VI.
In This Section
Related Information
- Binding Shared Variables and Other NI-PSP Data Items to Controls and Indicators
- Designing Applications Using Network Streams
- Choosing a Method of Reading and Writing Shared Variables
- Creating Shared Variables
- Configuring Shared Variables
- Reading and Writing Shared Variables with Shared Variable Nodes
- Making Shared Variables Available on a Network
- Using I/O Variables (Real-Time, Windows)
- Point-by-Point Analysis and Array-Based Analysis in
- Accessing Scanned I/O Data (Real-Time, Windows)
Use the NI Scan Engine for single-point access to scanned I/O data.
- Global Variables
- Local Variables
- Data Communication Methods in LabVIEW