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

Committing Shared Variables (DSC Module)

You can commit one or more shared variables to the Shared Variable Engine.

Committing a Single Shared Variable

Complete the following steps to commit a single shared variable to the Shared Variable Engine.

  1. Wire a shared variable refnum to the Property Set Mode property of the SharedVariableIO class.
  2. Set the Property Set Mode property to buffer.
    Note  If you are creating a new shared variable, set the set mode input of the Create Shared Variable VI to buffer.
  3. (Optional) Wire the shared variable output of the Property Set Mode property or of the Create Shared Variable VI to the shared variable input of another SharedVariableIO class Property Node.
  4. (Optional) Use the second Property Node to enable other SharedVariableIO properties for the shared variable.
    Note  Enable property groups before you enable individual properties. For example, use the Scaling:Enabled property to enable scaling before you use other Scaling SharedVariableIO properties.
  5. Wire the shared variable output of the second Property Node to the shared variable input of a Property Set Mode property.
  6. Set the Property Set Mode property to commit.
  7. Run the VI.

Committing Multiple Shared Variables

Complete the following steps to commit multiple shared variables to the Shared Variable Engine simultaneously.

  1. Wire a shared variable refnum to the Property Set Mode property of the SharedVariableIO class.
  2. Set the Property Set Mode property to buffer.
    Note  If you are creating a new shared variable, set the set mode input of the Create Shared Variable VI to buffer.
  3. (Optional) Wire the shared variable output of the Property Set Mode property or of the Create Shared Variable VI to the shared variable input of another SharedVariableIO class Property Node.
  4. (Optional) Use the second Property Node to enable other SharedVariableIO properties for the shared variable.
    Note  Enable property groups before you enable individual properties. For example, use the Scaling:Enabled property to enable scaling before you use other Scaling SharedVariableIO properties.
  5. Repeat steps 1-4 for each shared variable you want to commit.
  6. Wire an array of the shared variable references you created or modified to the shared variables input of the Commit Shared Variables VI.
  7. Run the VI.

Refer to the Create Online Process VI in the labview\examples\lvdsc\Variables\Library Generation directory for an example of committing shared variables to the Shared Variable Engine.

 


Resources


 

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