Western PA LabVIEW Users

cancel
Showing results for 
Search instead for 
Did you mean: 

What the heck is Object Oriented Programming, anyway?

** NEW **

I have added a simple example of Object Oriented Design here: http://decibel.ni.com/content/docs/DOC-4087. This is a log-file class which allows you to create, log, and close an instance of the logger. The logger will prepend a date-time stamp to any messages passed into it, and will append a carriage return. This could make life a lot simpler when designing large applications which could be operating in many states. It is especially useful when you have a main application with a hidden front panel.

** Original Posting **

Today I was invited by one of our larger customers in the area to present at their local user group. The topic was Object Oriented Programming. The time: 30 minutes.

OOP in 30 minutes is a tall order, but we did the best we could. As promised, I am posting a link to some introductory OOP materials for review.

Incidentally, it is very difficult to find an example or tutorial of Object Oriented Design without looking at code. If anyone can find one, please feel free to reply to this posting.

I have attached the slides from the presentation to this posting. A more complete set of slides can be found here: http://zone.ni.com/devzone/cda/tut/p/id/5786

We also teach a course on this to our customers. More information here: http://sine.ni.com/nips/cds/view/p/lang/en/nid/205080

Wikipedia Entry

http://en.wikipedia.org/wiki/Object-oriented_programming

If you can stomach the text, this is probably the best overview of Object Oriented programming I've seen in awhile. It could use a few diagrams.

Graphical Object Oriented Programming (GOOP)

http://zone.ni.com/devzone/cda/tut/p/id/3391

An introduction to Graphical OOP. Note the examples are way out of date, so ignore them.

LabVIEW OOP - Video Tutorial

http://www.youtube.com/watch?v=pomEr5vQpxM

Excellent demonstration of creating your first Object / Class in LabVIEW.

LabVIEW Object-Oriented Programming: The Decisions Behind the Design

http://zone.ni.com/devzone/cda/tut/p/id/3574

For those with a software engineering or C/C++ Background

If anyone has any other helpful links, please feel free to reply.

-Evan

0 Kudos
Message 1 of 5
(14,091 Views)

The best on-line resource for LVOOP is the Object Oriented Programming section of LAVA (LabVIEW Advanced Virtuial Architects). Tomi Maila (Our LVOOP LabVIEW Champion) as well as the architect of LVOOP "Aristos Queue" reply to post in that section as well as other LVOOPer (like myself).

First crack at defining OOP

OOP is a methodolgy that facilitate modular designs by identifying set of requirements that can be group and modeled as "object" each of which has methods and properties that meet the requirements.

LVOOP is a set of tools and specialized libraries that allow for easy development of code that realizes an OOP design.

Please feel free to edit any of the above!

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 5
(7,688 Views)

I understand the principles of OOP and I have looked through the LabVIEW examples and understand them. I always get stuck though in thinking how OOP could be applied for data acquisition because it is data streaming. I would think using a bunch of get and set commands would be in-efficient. Does somebody have an example of implementing OOP for data acquistion?

0 Kudos
Message 3 of 5
(7,688 Views)

sps wrote;

"

I always get stuck ... Does somebody have an example of implementing OOP for data acquistion?

"

In my opinion where OOP shines is when you have an app where the comment "Bunch of similar stuff where there are differences"

So if you are writing an app that is capable of collecting data data from a bunch of different interfaces LVOOP would be good choice. You could set up a DAQ class with plug-ins to support each variation of hardware you will use. LVOOP's dynamic dispatching can load an use the child class that is specific to the widget you have connected today and the rest of your app would interact with the plug-in you are using today the same it did yesterday when you had a different widget connected.

The dynamic dispathcing will work in exe as well. Just add the new plug-in the the "plugins" folder and the app can find your new widget and use it as if it knew about the new class all along.

Tomi Maila posted some plug-in examples in the LAVA forum I cited earlier. If you are interested in seeing how LVOOP does dynamic dispatching of plug-ins, look at his post.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 5
(7,688 Views)

Thanks a lot!

Rajesh Raghavan Nair

Certified LabVIEW Architect
Certified Teststand Architect
0 Kudos
Message 5 of 5
(7,688 Views)