Shared Variables

LabVIEW SignalExpress

Shared Variables

Shared variables are application-independent configured software items that enable you to send data across projects or across a network.

Viewing Shared Variables

You can use the Channel View to display and manage shared variables that exist on the local machine or local network. In the Channel View, select Shared Variables from the View pull-down menu. Expand Localhost to display shared variables that are available on the local machine. Expand Network Neighborhood to display machines on the local network. LabVIEW SignalExpress recognizes shared variables created in LabVIEW SignalExpress and LabVIEW, as well as data published using DataSocket technology or data that meets OPC specifications.

Note Note  In this help topic, the term shared variable also applies to data published using DataSocket technology or data that meets OPC specifications. Refer to ni.com for more information about DataSocket technology. Refer to the OPC Foundation Web site for more information about OPC specifications.

Reading Shared Variables

Use the Read Shared Variables step to read shared variables in LabVIEW SignalExpress. The Read Shared Variables step reads the value of a shared variable and returns the value as an output you can send to other steps. You also can use the Channel View to read the value of a shared variable. Place a checkmark in the Acquire checkbox for a shared variable to read the value of the variable. LabVIEW SignalExpress automatically configures a Read Shared Variables step and adds the step to the Project View. Place a checkmark in the Acquire checkbox for a machine to read the values of all the available shared variables on the machine. LabVIEW SignalExpress uses one Read Shared Variables step to read the values of all the shared variables.

Note Note  You can use the Sample Period (s) column of the Channel View or the Sample period (s) parameter of the Read Shared Variables step to specify how frequently LabVIEW SignalExpress reads the value of the shared variable.

Writing to Shared Variables

You can write signals in a LabVIEW SignalExpress project to shared variables so that other projects can use the value of the signal. Right-click a step input or output signal and select Write to Shared Variable from the shortcut menu to write the value of the signal to a shared variable. The name of the signal appears with a globe icon () that indicates it is a shared variable. You also can right-click a shared variable input or output and select Write to Shared Variable from the shortcut menu to stop sharing the value of the signal.

LabVIEW SignalExpress automatically shares any shared variables you create on the local network. The shared variable appears at the path \\hostname\NI_SIGX_projectname, where hostname is the name of the machine on which you create the variable and projectname is the name of the LabVIEW SignalExpress project in which you create the variable.

Note Note  LabVIEW SignalExpress removes shared variables from the local network when you close the project that creates the shared variable(s).