Dan Bookwalter Posted February 14, 2008 Report Posted February 14, 2008 Does anyone have a simple example of implementing By Ref using a LV2 Global ? thanks Dan Quote
Tomi Maila Posted February 14, 2008 Report Posted February 14, 2008 Use LV2 global to return a key to your data stored into the global. Then store this key to your objects private data. When you need to access the data, use the key in the objects private to fetch the data from the LV2 global. The key can be for example index of an array if you are using an array for data storage or variant attribute name if you are using variant attributes as data storage. Cheers, Tomi Quote
Mellroth Posted February 14, 2008 Report Posted February 14, 2008 QUOTE(Dan Bookwalter @ Feb 13 2008, 12:05 PM) Does anyone have a simple example of implementing By Ref using a LV2 Global ?thanks Dan You can also make the LV2 global reentrant and use VI server "Call by reference node" to access data. The VI server reference is then your reference to the data. Tomi's suggestion is probably faster, but using VI-server means that different objects don't share the same memory to store the by-ref data, and in turn this means that two objects can access data in parallel. /J Quote
crelf Posted February 14, 2008 Report Posted February 14, 2008 QUOTE(Dan Bookwalter @ Feb 13 2008, 06:05 AM) Does anyone have a simple example of implementing By Ref using a LV2 Global ? Check out the INI file VIs in LabVIEW - they're not particulary simple, but I'd be happy to throw somwthing together to help (should only take 15 mins, but I'm a little busy right now - I'll do it this morning some time). Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.