LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LVOOP by ref deep case/unbundle structure nesting

Solved!
Go to solution

Hi,

 

I have been experimenting with LVOOP for use in a relatively large project. I need lvoop by ref because the lvoop represents a actual object constructed in my dll and by ref implementation lets me keep track if this object is still valid since the ref gets deleted when the object is also deleted in my dll. In addition, the class holds (large) data referred to by many class VIs and it would have been wasteful to make many copies of it.

 

Anyway, I'm wondering if I'm doing this right because when accessing the class data I need to have deep nested structures and that doesn't seem too right. I'm attaching an example simple vi and a screenshot of the block diagram.

 

Here are the explanations for the deep structures:

1. Error case struct enclosing the whole block diagram.

2. Unbundle class object to get the DVR (I could possible unbundle this without this structure).

3. Unbundle the DVR to get the actual class cluster.

4. Error case structure in case the last unbundle failed.

5. Finally, unbudndle the class cluster to get the specific data item I want.

 

Thanks for any help,

MattLVOOP.png

0 Kudos
Message 1 of 2
(2,267 Views)
Solution
Accepted by topic author myle00

Hey myle00,

 

This implementation seems fine to me. Is there a reason you are concerned with having too many structures? As you noted, you could unbundle without using the "In Place Element Structure"; however, this structure can make the VI memory usage more efficient. If you are worried about the structures taking up space, you could always make it into a subVI (select the outside structure, go to edit>create subVI). Hope this helps!

 

Nathan H

Applications Engineering

National Instruments

Software Developer
National Instruments
0 Kudos
Message 2 of 2
(2,186 Views)