01-30-2007 10:05 PM
Solved! Go to Solution.
01-31-2007 09:23 AM
Hi John,
so what you want to do is to have every sub-application to own a copy of a LV2 style global to store its data. LV2 style global will be shared by all VIs. You can't neither have LV2 style global reentrant. The only way I see for that is to use an array in your LV2 style global and index the data in that array with a "thread ID" or "application ID" that would be a typedef. That's what I use to do. I have N instances of a thread that use the same LV2 style global that contains an array of N. I have a typedef that identifies the N threads. So I do Get/Set data with ThreadID.
Hope that helps!
Patrick.
01-31-2007 10:00 AM
01-31-2007 01:19 PM
Thanks for the replies! It looks like I'll have to identify each element in the global if I insist on using this method. (which I may just abandon for this project)
Unfortunately the LV2 global is a sub-vi of the reentrant vi, and I can't make the LV2 global reentrant since I need to use it in multiple places within the reentrant vi.
I guess this is the expected behaviour - i just isn't what I expected. 🙂
John
01-31-2007 01:51 PM
01-31-2007 05:11 PM - edited 01-31-2007 05:11 PM
Dooh!! Thanks for clarifying Jarrod. It all makes sense now.
Sorry Tomi, I misunderstood at first.
Thanks to all!
John
PS. The only disadvantage I see is having to pass the VI reference around, which is the kind of thing I am trying to avoid by using LV2 style globals in the first place. oh well 🙂
Message Edited by John Howard on 01-31-2007 06:17 PM