S5 Solutions - Product Development, ATE, LabVIEW
  • Solutions
    • Product Design
    • Automated Test Equipment
    • Engineering Solutions
  • Project Portfolio
  • Tools
    • Seattle LabVIEW Developers
    • ATE Base Testers
    • Learning LabVIEW >
      • Getting Started with OOP
    • ALOHA >
      • ALOHA - Details
      • ALOHA - Screenshots
      • ALOHA - Video
      • ALOHA - Download
    • MLA
    • Museum Guide
    • Select5
    • More > >
      • Wireless LINX
      • VINE
      • Lipless!
      • Election The Game
  • Blog
  • Contact

Getting Started with Object-Oriented Programming in LabVIEW

LabVIEW is a great language. What could make it better? Objects.

Object-oriented programming adds a dimension to LabVIEW that can help bring order to your program and keep that order as it grows. If you have used OO in other languages, most of the principles are still in place. If it is a new concept, don't let that keep you from harnessing the power of objects to improve your LabVIEW code.

There is a learning curve, of course. But it is well worth it.

​Why use OOP?

  • Your life will get much harder and then much easier. Much, much easier.
  • It is a more intuitive way of looking at solutions
  • It mirrors the way things work in the real world
  • Code Reuse
  • Extensibility
  • Maintainability
  • Abstractions are the Keys to Upping your Game
Picture
The Dunning-Kruger Effect
How learning something new works

OO Basics

Encapsulation

  • A place for everything and everything in its place
  • Classes own data and protect access to it
  • Scoping / Access Privilege (Public, Private, Community)
  • ​Property on LVCLASS Virtual Folder/VI/CTL/etc
  • LV - Property Nodes & Accessors 

Scoping / Access Privilege

  • Scoping / Access Privilege
  • Public - Everybody
  • Private - Just Me
Picture
Looking for help with your LabVIEW project?
Get in touch to discuss how we can help.
Contact Us

Inheritance

Inheritance is a type of relationship between Parent & Child Classes. Child classes inherit attributes and functionality from their parents. From there, child classes can grow to include additional attributes and functionality that the parent does not possess.
  • Parent - more generic Class
  • Child - more specific Class
  • Many Levels Supported
  • Single vs. Multiple Inheritance - LVOOP supports Single Inheritance. Some other Languages support Multiple Inheritance.
Picture

Polymorphism

The word polymorphism comes from ​Latin, meaning “many forms”. This is the OO concept that there are varying forms of things that have similarities. For example, you may have multiple forms of shapes, such as Square, Circle, and Triangle, that have certain similarities, like color, size, and position.

By Value vs. By Reference

There are two ways a program can manage an object in memory: by Value or by Reference.
By Value (By-Val)
  • Enhanced Cluster
  • Copy-on-write
  • Branching Wires Generates Multiple Values
  • Hard to Share Data
  • When copies are OK
By Reference (By-Ref)
  • Traditional “Pointer”
  • Single Instance on Construction
  • Branching Wires Enables Multiple Access
  • Designed to Share Data
  • When Single Value is desired
So, how do you choose when to use By-Val or By-Ref?
The right choice depends on the purpose of the object and how it is used in the program.
Picture

Helpful Tools

NI GDS (GOOP Development System)
  • Available in VIPM
Picture
OpenGDS
  • Available for download at opengds.github.io and github.com/opengds/OpenGDS
Picture
Picture
Let's get in touch to discuss how we can help you with your LabVIEW project.
Contact Us
Services
Product Design
Automated Test Equipment
Engineering Solutions

Company
Contact Us
​About Us
​
​Project Portfolio
​NI Alliance Partner Page
​Documents
Capabilities Statement
​
Employee login
Tools
Base ATE Testers
ALOHA
MLA
Museum Guide
Select5
Wireless LINX
VINE
Resources
​
LabVIEW Videos
Fun
Lipless! Game
​
​Election the Game
LabVIEW in Meatspace

8227 44th Ave W, Suite F
Mukilteo, WA 98275 ​
425-232-6277
Info@S5Solutions.com

www.S5Solutions.com
Picture
© 2021  S5 Solutions, Inc.  All Rights Reserved.
  • Solutions
    • Product Design
    • Automated Test Equipment
    • Engineering Solutions
  • Project Portfolio
  • Tools
    • Seattle LabVIEW Developers
    • ATE Base Testers
    • Learning LabVIEW >
      • Getting Started with OOP
    • ALOHA >
      • ALOHA - Details
      • ALOHA - Screenshots
      • ALOHA - Video
      • ALOHA - Download
    • MLA
    • Museum Guide
    • Select5
    • More > >
      • Wireless LINX
      • VINE
      • Lipless!
      • Election The Game
  • Blog
  • Contact