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

Reading and Writing Shared Variables with Controls and Indicators

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Read and write shared variables and other NI-PSP data items in human-machine interface (HMI) applications by binding those shared variables to controls and indicators. When you bind a shared variable to a front panel control or indicator, that control or indicator directly writes values to, or reads values from, the shared variable.

Note  You can bind front panel objects to network-published shared variables only.

For example, if you need to monitor the temperature of the valves on a boiler, you can bind shared variables to controls and indicators to display and, to a limited extent, process the latest temperature values in the following ways:

  • View the value of a shared variable. For example, if you bind a front panel indicator to one of the temperature variables, the indicator displays the latest value of the variable.
  • Display or use data from a VI on one computer with a control or indicator in a VI on another computer. For example, if a VI on another computer calculates the average temperature of the valves and writes that data to a shared variable, you can display the same data in a VI on your computer by binding a front panel indicator to that same shared variable. Or, you can use the data by binding a control in your VI to the shared variable and wiring that control to a subVI or function.
  • Manipulate and read a control from multiple computers. For example, if you bind the stop buttons in VIs on multiple computers to the same shared variable, each of those controls can shut down the temperature sensor.
Note  You can bind front panel objects to DataSocket server items using the opc, ftp, and http  protocols on Windows, and on all LabVIEW-supported platforms using the dstp and file  protocols. However, using front panel data binding to control a front panel object remotely through the Shared Variable Engine (SVE) provides faster and more reliable data transmission, as well as connections to shared variables and NI-PSP data items.

 

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