취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

labview child class data access

해결 완료!
솔루션으로 이동

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 포인트
1/14 메시지
4,531 조회수

There is nothing attached.

0 포인트
2/14 메시지
4,524 조회수

here it is

0 포인트
3/14 메시지
4,518 조회수

AIM BMS.png

0 포인트
4/14 메시지
4,514 조회수

Can you attach the image as an attachment?

 

That image is too small to see.

0 포인트
5/14 메시지
4,514 조회수

AIM BMS.png

0 포인트
6/14 메시지
4,506 조회수

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 포인트
7/14 메시지
4,487 조회수

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 포인트
8/14 메시지
4,486 조회수

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 포인트
9/14 메시지
4,476 조회수

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 포인트
10/14 메시지
4,460 조회수