Jump to content

Inheritance from parent class


Recommended Posts

Hello everyone,

I have a problem with my LabVIEW project. It has a general parent class I call “device” that includes common parameters and many public static and dynamic dispatch VI-s. Many dynamic dispatch VI-s are overwritten in inherited child class “subdevice” e.g. initialization VI-s etc. Child class has it’s own more specific parameters and methods. In the project has a general VI (device_PID.vi see the picture below) where I use my child class object and manipulate the class data. There goes the real action. Everything works fine with one member of child class. A problem arises when I add new class inherited from “device” class to the project. Then, my general VI and subVI-is are not executable. Example from Labview error details list:

1) “The subVI is not executable. You must fix all errors in the subVI before this VI can run.”

2) “One or more of the set of VIs which this dynamic dispatch subVI may call are broken. Each LabVIEW class may own a VI with the same name as a VI owned by the parent of the class or older ancestor. The dynamic dispatch subVI will call one of these VIs, chosen when the subVI actually executes. If any of the VIs are broken, then this subVI also is broken.”

If I enter the subVI the error list below appears:

“This VI's owning library has some problem. The library has blocked the VIs that it owns from executing until the problem is resolved. Please see errors listed on the library.”

Why are some dynamic dispatch subVI going broken?

Maybe someone can explain why it happens and how to avoid it. I have got stuck at the moment and can’t find a solution. Maybe the solution is already available somewhere in the forum but I have’nt found the right keyword yet.

Many thanks in advance

post-21316-0-22896400-1298661698_thumb.j

Link to comment

Why are some dynamic dispatch subVI going broken?

Here are some pointers for you. The list is not extensive but you might be in one of these situations:

1- One of your Dynamic Dispatch VI doesn't have the same connector pane (and datatypes) as its parent counterpart.

2- You have a Dynamic Dispatch VI that is set to require all child classes to override it, and one of the children doesn't override it.

3- You have a private VI that has Dynamic Dispatch input on its connector pane, which is prohibited.

4- You have one of the dynamic dispatched VI that is broken. Check all the hierarchy up to the parentmost VI.

Link to comment
2- You have a Dynamic Dispatch VI that is set to require all child classes to override it, and one of the children doesn't override it.

Thank you, François

You helped me to solve my problem. You gave me the right pointer. Such problems can occur if the project has grown large enough so you do not remember all checkmarks you have set. In my experience, Labview does not show the VI list you have to overwrite. If I-m wrong please correct me.

The solution was checking all my VI-s in parent class and I found couple of unnecessary checkmarks at the moment.

Thanks once more and success to you!

Eino

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.