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

Changing Shared Variable Properties Programmatically (DSC Module)

Use the SharedVariableIO properties to read or change configuration information about shared variables programmatically. Most of these properties are options you can configure for a shared variable in the Shared Variable Properties dialog box.

Note  You can use the SharedVariableIO properties only on shared variables you configure with the Variable Type set to Network-Published on the Variable page of the Shared Variable Properties dialog box.

Changes you make in the Shared Variable Properties dialog box or using the SharedVariableIO properties affect the LabVIEW project library (.lvlib). Changes you make using the SharedVariableIO properties do not affect the .lvlib file. The SharedVariableIO properties affect the Shared Variable Engine directly.

With the SharedVariableIO properties, you can configure many properties, such as alarming, logging, and scaling, programmatically. You also can read shared variable information and read and configure network information programmatically. The following list describes the properties you can configure and read.

  • Shared variable information—You can read information about the shared variable, including the name and data type of the shared variable, the name of the process to which the shared variable belongs, and whether the shared variable is loaded in the process. You also can provide a description for the shared variable.
  • Network information—You can read and configure options about NI Publish-Subscribe Protocol (NI-PSP) and how the shared variable can access the source. You also can specify whether the shared variable updates. For example, you can programmatically take a shared variable on or off scan by passing a TRUE (on) or FALSE (off) value to the Network:On Scan SharedVariableIO property. If a shared variable is off scan, the DSC Module does not process the shared variable or update it in the Shared Variable Engine, does not calculate alarms, and does not log data. You can start these activities by putting that shared variable back on scan.
  • Alarming—You can configure and read alarm information for shared variables. You can configure and read alarm options depending on the data type of the shared variable.
  • Logging—You can configure and read whether logging is enabled for shared variables. You also can configure and read time resolution, value resolution, and logging deadband for shared variables.
  • Scaling—You can configure and read scaling for shared variables. The scaling options you can configure and read depend on the data type of the shared variable.

You can create a Property Node to access the SharedVariableIO properties from a Shared Variable Constant or Shared Variable Control.


Resources


 

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