Example Code

How to Create Child LabVIEW Libraries (lvlib) Using Distributed System Manager (DSM) and LabVIEW Datalogging and Supervisory Control (DSC) Module

Code and Documents

Attachment

Functional Description

This post is to support KnowledgeBase 4SA8N6CX:How to Create Child LabVIEW Libraries (lvlib) Using Distributed System Manager (DSM) and LabVIEW Dat.... Please refer to this KnowledgeBase for more information on the modifications made during the below process.

In some applications it is desirable to have the Shared Variable Engine structure to match that of the real world application. For example, if you had multiple power stations, with multiple generators - but each generator has the some parameters you wish to monitor, then it would be good if the user could see the variables in this structure. In order to achieve this we need to be able to programmatically create child (sub) libraries for the shared variables. This can easily be done manually in the LabVIEW project but currently programmatically this functionality doesn't exist.

The solution is to programmatically edit the xlm data for the LabVIEW libraries (lvlib) files to include the required information for both the parent and child (sub) libraries. The attached example in LabVIEW 8.6 adds the information to the two library files as discussed in the KnowledgeBase article.

SubDLLs.PNG

Caveats and Additional Notes

  • Example in LabVIEW 8.6.
  • The code requires the LabVIEW Datalogging and Supervisory Control (DSC) Module to be installed.
  • The zip file attached includes all the subVIs.
  • When running the code, the user will be prompted to input the names of the parent and child libraries. Then use the Distributed System Manager (DSM) to view the structure (see image below). The user will see a prompt saying the libraries will be removed upon closure of the prompt.

DSMdll.PNG

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors