How do You Use a Class in Labview?

Hi, our team wants to implement class usage in our Labview project and we can’t find any guide on the internet, apart from the basic class creation ones. We understand how to create the class, and how to add private variables, but we can’t seem to update their values or use them outside or inside the class.
We would appreciate any help! (:

Are you talking about code blocks? I think code blocks are only scoped to the single block.

An alternative to a class that you can do is a Sub VI. Maybe look into that?

You can definitely use LabVIEW classes to program your robot. In fact, Howdy Bots 6377 has done that for the past couple of years.

As you point out, the resources to get up-and-running are a bit hidden, so I hope the following path helps you get up and running:

  1. Learn about LabVIEW Object Oriented design in LabVIEW here: Introduction to LabVIEW Object Oriented Programming
  2. Use the LabVIEW Help and Examples (Help > Find Examples…): LabVIEW Object-Oriented Programming
  3. Take a look at the Howdy Bots repository to get an example of a codebase that uses this architecture. It comes with a document that helps explain how everything is connected.

All the best!

1 Like