06-01-2016 01:00 PM
I’m using an FVG in to VI’s: main_1.vi and main_2.vi which is running at the same time.
As a normal FVG, the FVG will be seen from both main’s.
Is there any way to change this, so you can use the same FVG to store different data for main_1 and main_2, or do I have to rename FVG to FVG_1 (used in main_1) and FVG_2 (used in main_2).
My FVG have a structure like this:
https://decibel.ni.com/content/docs/DOC-2143
Solved! Go to Solution.
06-01-2016 01:06 PM
A few possibilities.
1. Call them different names like you suggested.
2. Make sure the two main VI's are in different projects. A Main VI only exists within the project's domain.
3. Modify the FGV to add another input such as a numeric where you can wire in a one or a two. Have the FGV keep an array of data, and will update whichever element is appropriate based on the wire number you put in. Of course everytime you use the FGV in main1, you'll have to make sure you wire in a 1. Everytime you use it in Main2, you'll have to wire in a 2.
06-01-2016 01:16 PM
Thank you for your reply.
So I can use all 3 ways. Number 2 seem seem easiest.
I think I will use that 🙂
06-01-2016 01:16 PM
4. If you are only calling this VI in a single place in both of your VIs, then make the FGV reentrant (preallocated). Then each call of the FGV will have its own memory space.
06-02-2016 12:43 AM
I don't now about a single place. Eg. I have this vi - I call a lot of times to keep track of time.
06-02-2016 06:08 AM
@Michael.Koppelgaard wrote:I don't now about a single place. Eg. I have this vi - I call a lot of times to keep track of time.
Then the reentrant idea won't work for you. I just had to throw it out there for completeness sake.
06-02-2016 07:40 AM
In your Get case, you don't need to branch the blue value to send it out through separate tunnels to wire to nCall. You just need to wire it from the right hand shift register.