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.
- Wire a shared variable refnum to the Property Set Mode property of the SharedVariableIO class.
- 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. |
- (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.
- (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. |
- Wire the shared variable output of the second Property Node to the shared variable input of a Property Set Mode property.
- Set the Property Set Mode property to commit.
- Run the VI.
Committing Multiple Shared Variables
Complete the following steps to commit multiple shared variables to the Shared Variable Engine simultaneously.
- Wire a shared variable refnum to the Property Set Mode property of the SharedVariableIO class.
- 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. |
- (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.
- (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. |
- Repeat steps 1-4 for each shared variable you want to commit.
- Wire an array of the shared variable references you created or modified to the shared variables input of the Commit Shared Variables VI.
- 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.