07-23-2011 11:52 AM
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,
Matt
Solved! Go to Solution.
08-01-2011 03:24 PM
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