Using a Shared Variable Library inside of a LabVIEW Class

Updated May 3, 2018

Reported In

Software

  • LabVIEW Base
  • LabVIEW Full
  • LabVIEW Professional

Issue Details

I'm working with LabVIEW OOP, and I would like each object of my class to inherit a shared variable library. I am trying to bundle the library into my class definition, and LabVIEW gives me a broken wire when I attempt to.

Solution

Like other kinds of libraries, you cannot put a shared variable library inside of a class in LabVIEW. Instead, you should define the shared variable library independently from your class definition, and refer to it from each object individually.

Additional Information

In LabVIEW, object-oriented structures are implemented as libraries. You also cannot put a library inside of another library. This means that because shared variable libraries are also implemented as libraries, they cannot be added to class definitions in LabVIEW. You will see the same behavior if you try to add other types of libraries to classes in LabVIEW, as well.

WAS THIS ARTICLE HELPFUL?

Not Helpful