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

Configuring Shared Variables

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Use the Shared Variable Properties dialog box to configure shared variables from the Project Explorer window. To display this dialog box, create a new shared variable or right-click an existing shared variable in the Project Explorer window and select Properties from the shortcut menu.

The following list describes the functionality and use cases of some common shared variable configuration options:

  • Enter a name for the shared variable in the Name text box.
  • Select the data type for the shared variable from the Data Type pull-down menu. If you do not see the data type you want to use, select From Custom Control to use the data type of a custom control.
  • Select the type of shared variable you want to create based on the network location of the computers you will read and write the variable with. You can choose from the following options with the Variable Type pull-down menu:
    • Select Network-Published to create shared variables that you want to read and write on remote computers and targets on the same network.
    • Select Single-Process to create shared variables that you want to read and write on a single computer.
  • If you select Network-Published from the Variable Type list, you can place a checkmark in the Use Buffering checkbox on the Network page to enable client-side buffering for the shared variable data. Depending on the data type you select from the Data Type pull-down menu, you might need to enter additional values in the Use Buffering section.
    Note  When you select this option, the shared variable stores data in a FIFO buffer. However, this option does not guarantee lossless data communication because new values still can overwrite old values if the buffer reaches capacity. If your application requires lossless communication, use network streams to stream data between applications continuously. Refer to the National Instruments Web site for a detailed explanation of shared variable buffering behaviors.
  • If you select Network-Published from the Variable Type list, you can place a checkmark in the Single Writer checkbox on the Network page to accept writes from only one application at a time. When you select this option, the first application that connects to the shared variable can write values to that shared variable, whereas any subsequent applications cannot. When the first application disconnects, the next application in the queue can write values to the shared variable.

 

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