Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

NI-PSP Networking Technology

LabVIEW 8.2 Help
August 2006

NI Part Number:
371361B-01

»View Product Info

Network-published shared variables communicate between VIs, remote computers, and hardware through the Shared Variable Engine. The Shared Variable Engine uses the NI Publish-Subscribe Protocol (NI-PSP) data transfer protocol to write and allow users to read live data. NI-PSP is a proprietary technology that provides fast and reliable data transmission for large and small applications and is installed as a service on the computer when you install LabVIEW.

The NI-PSP networking protocol uses psp URLs to transmit data across the network. You can browse to any NI-PSP data item on the network to seamlessly bind shared variables to other shared variables or to server and device data items.

An NI-PSP data item can be a shared variable in a project other than an active project or a data item on a connected server or device, such as an OPC server or FieldPoint module.

Note  You can use the Shared Variable Engine to deploy data only from Windows NT/2000/XP and RT targets. However, you can use the NI-PSP protocol to read and write data on all LabVIEW-supported platforms.

To read and write shared variable values from an unsupported platform, create and deploy a shared variable on the target that has LabVIEW and the Shared Variable Engine, such as My Computer. Then add Shared Variable nodes from the target hosting the Shared Variable Engine to the block diagram of a VI, and deploy the VI to the target that does not support the Shared Variable Engine.

Network Paths

Shared variables outside of the active project appear as data items when you browse NI-PSP data items on the network. The network path to shared variables in other projects consists of the computer name, the name of the project library in which the shared variable resides, and the shared variable name: \\computer\library\variable. For example, the network path \\computer1\mylib\myvariable identifies a shared variable named myvariable in the mylib project library on a computer named computer1. If the shared variable exists in a sub-project library named mysublib, the shared variable path includes the sub-project library, such as \\computer1\mylib\mysublib\myvariable.

The network path to a psp data item consists of the computer name, the name of the process in which the data item resides, and the data item name: \\computer\process\data_item.

Shared Variable Deployment

You must deploy a shared variable for the variable to be available to other projects and remote computers. LabVIEW deploys shared variables when the Shared Variable Engine is running.

You can deploy a shared variable by running the VI in which the shared variable resides. You also can right-click the owning project library of the shared variable and select Deploy from the shortcut menu. To disable a shared variable so it does not deploy when you run the VI in which it resides, right-click the owning project library and remove the checkmark next to the Autodeploy Variables shortcut menu item.

When you run a VI containing a shared variable, the Shared Variable Engine deploys all shared variables in the owning project library for the variable in the VI, even if the shared variables are not all in currently running VIs. During deployment, LabVIEW reports any conflicts in the Shared Variable Engine, such as when you deploy shared variables that are not in the active project to the Shared Variable Engine.

Stopping the VI that contains a shared variable does not undeploy the shared variable. To undeploy a shared variable, right-click the owning project library for the shared variable and select Undeploy from the shortcut menu.


Resources


 

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