11-27-2012 12:45 PM
Hello guys,
I saw an example of car wash (example test of CLD), found out a lvclass could be used as an attribute? Is it similar to the cluster? I never use it before, could someone give me any explaination about it? So appreciate!
Solved! Go to Solution.
11-27-2012 02:08 PM
Hi, any suggestion?
11-27-2012 02:15 PM
I suspect that it is the name that was given to the object for that example.
I am not aware of a special class for attributes. I'm not saying there is such a thing or there isn't.
I have not come across such a class.
11-27-2012 02:59 PM
Hey, Ray. I think you are right. I found a type def named "attributes.ctl" in this lvclass. So, is it just a cluster? The icon shown as an object...( Actually, I did not use object before, is it similar to cluster?) The wire is different to cluster as well.
11-27-2012 04:29 PM
@phyyu wrote:
Hey, Ray. I think you are right. I found a type def named "attributes.ctl" in this lvclass. So, is it just a cluster? The icon shown as an object...( Actually, I did not use object before, is it similar to cluster?) The wire is different to cluster as well.
a lvclass is an object, as in Object Oriented Programming. The CS definition of a class, which an object is an instance of, is a set of data and the methods that operate on that data. In that respect a cluster is similar in that it can be viewed as the class data. OOP also brings other things to the table such as access scope and inheritance. Based on your questions I think this is your first exposure to OOP. I recommend you do some general reading to familiarize yourself with OOP in general. It is not a LabVIEW only concept. In fact, LabVIEW was rather late to the game in supporting OOP.
11-27-2012 04:36 PM
Thanks a lot! I knew the concepts of classes and objects, only in C++ and Java, I didn't reallized LabVIEW is an OOP language! Quite exciting!
I found some materials about it, need to share here..
http://blog.eyesonvis.com/2012/08/21/intro-to-lvoop-part-1/
http://lavag.org/topic/11218-excellent-intro-presentation-on-object-oriented-programming-in-labview/
11-28-2012 10:11 AM
You can write programs in LabVIEW in OOP or not. That's the beauty of the language.