LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Class in LV


@crossrulz wrote:

Your class GUI VI does not hav to be called directly from your main application.  It could be ran dynamically in a new thread and your objects send messages via queues or user events.  It could even be the processing VI.


Please check this Desktop\Telecom.exercise\Trial_Applications\New folder\App_oop.vi is the below project file..

 As I have tried the usage within the application as you have explained and as I have understood!! Smiley Happy


0 Kudos
Message 11 of 22
(1,153 Views)

You provided a path, but, sadly, no attached file.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 12 of 22
(1,143 Views)

yup.. here's the File...

0 Kudos
Message 13 of 22
(1,134 Views)

http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/oop_in_lv/

 

Classes represents general traits that item share and objects are actually behaviors of our class (of how and what it is designed/capable to do) 

 

There are 4 pillars of OOP's:

 

  1. Encapsulation is the hidden data and methods, which is not really necessary to be shown to the user. 
  2. Abstraction is the top most layer that winds, the encapsulated layer and things that the user must be aware of while operating the object or using any of our classes behaviors.
  3. Inheritance is sharing common traits as methods in base-derived relationship.
  4. Polymorphism is utilizing the principles of same methods behavior with same name, but with over riding (additional method behavior) concepts from derived classes.

 

 

 

0 Kudos
Message 14 of 22
(1,138 Views)

I have attached the file.. 

can anyone of the Gem's look over it for procedure corrections, if should be made.


@PriyadarsiniS wrote:

yup.. here's the File...


 

0 Kudos
Message 15 of 22
(1,118 Views)

Do you have a specific question?

0 Kudos
Message 16 of 22
(1,128 Views)

@altenbach wrote:

Do you have a specific question?


yup .. actually, I was looking for a solution where my Derived class data can also be shown on the Abstract layer i.e., User interface, without making them appear straight from the root class (as it can be already done with help of Main-vi).

Now my application involves showing all the abstracted layers data along with leaf classes data that was processed due to user actions.

 

Am in need for a proper procedure to do this..

0 Kudos
Message 17 of 22
(1,099 Views)

As I said before, make the class insert itself into the subpanel.  This way, you can have an override method so that the child can put in whatever front panel it wants.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 18 of 22
(1,087 Views)

@crossrulz wrote:

As I said before, make the class insert itself into the subpanel.


sub-panel.PNG

 

yup.. I followed it but still, the code I have integrated is with respect to the Devices selected

and there order of path provided inside this Application. 

 

I have taken the NI: example of examples\Controls and Indicators\Containers\Multiple VIs in a Subpanel.vi 

  1. Init part: Until Run vi
  2. Process part: only vi reference
  3. Close part: Remove vi reference , in short

and Am not sure, if that method is correct for big applications.

0 Kudos
Message 19 of 22
(1,078 Views)

@PriyadarsiniS wrote:

yup.. I followed it but still, the code I have integrated is with respect to the Devices selected

and there order of path provided inside this Application.


Absolute paths should NEVER be coded in an application.  You are using the class constants to initialize the objects.  Now let the objects find their own GUI VI using their own logical name (Class.lvclass:GUI.vi) and Open VI Reference.  You only need that logical name to open the reference.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 20 of 22
(1,073 Views)