LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview child class data access

Solved!
Go to solution

Hi All:

 

I Have Parent class and Master as Child class ...

 

I am having a problem here getting data from Create method..I can see the data at the end of the create method (shown below); but at the top where I show indicaters it is not reflected... can someone pt me where I am making a mistake...

 

COM and slave data are defined both in the parent and child class...

 

See attached

 

Thanks

Leela.

0 Kudos
Message 1 of 14
(3,432 Views)

There is nothing attached.

0 Kudos
Message 2 of 14
(3,425 Views)

here it is

0 Kudos
Message 3 of 14
(3,419 Views)

AIM BMS.png

0 Kudos
Message 4 of 14
(3,415 Views)

Can you attach the image as an attachment?

 

That image is too small to see.

0 Kudos
Message 5 of 14
(3,415 Views)

AIM BMS.png

0 Kudos
Message 6 of 14
(3,407 Views)

I'm afraid in the child VI you are accessing the WRONG data members.

In a child class VI vi in order to access parent private data you have to use Data Member Access VIs.

 

Regards,

Marco

 

0 Kudos
Message 7 of 14
(3,388 Views)

I forgot,

my assumption is based on your sentence:

"COM and slave data are defined both in the parent and child class..."

Why do you need to place them in both places?

 

Marco

0 Kudos
Message 8 of 14
(3,387 Views)

Hi,

 

The wild unbundle in the top VI will return private data from the Master class, while you had actually set the private data of the Parent class using inheritance in the first subVI, so your behavior is expected. Like Marco said, it's very messy to have the same private data in both parent and child class 😕

 

Regards,

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

0 Kudos
Message 9 of 14
(3,377 Views)

I AM very new to OOP;

 

that is what I was initially thinking that in the master class I don't need to define the COM and Addr as they were already defined in the Parent Class as Data...Later I was having some problem so I added them....

 

 

Could you please shed some light on Dynamic Dispatching and Data Member Access VIs, when or Where  (under Child or Parent Class ) do we use them...

 

Leela.

 

 

 

0 Kudos
Message 10 of 14
(3,361 Views)