LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple instances of same SubVI on FP

Solved!
Go to solution

Hiall,

i found the nice feature that i can diplay the front panels of subVIs in subpanels of my main VI's front panel and up to now, it works nicely:

FPs.PNG

here, i have 4 VIs plotting some data, and all their front panels displayed on the main VI. They are called by some intermediate VI which in turn is called from the main VI.

 

now, since those 4 plot VIs are identical, i am looking for something like this:

FPss.PNG

How can I get the 4 instance's references? the "this VI" ref is identical for the 4 instances, i checked. i put it on preallocated reentrant.

 

Thank you so much for help!

0 Kudos
Message 1 of 4
(3,585 Views)
Solution
Accepted by topic author OPCler

If you share your code it would be much easier to show you. I think you have to use the Open VI Ref function with a 0x08 option flap for reentrant run. Open 4 different refs and you should have 4 different memory spaces.

 

You'll have to pass these refs in to your Intermediate VI and Call by Reference in order to run them with the correct input.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 2 of 4
(3,575 Views)
Solution
Accepted by topic author OPCler

based on your suggestion, i finally found the solution:multiple instancees.PNG

 

 

The trick is the x40 and x80 flag of the open VI function, together with the strictly typed reference type specification.

Add dont forget to make the instanced VI "reentrant" in VI properties -> execution

Download All
Message 3 of 4
(3,504 Views)

Thanks for coming back to share on the forum so others can find this solution. Smiley LOL

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 4 of 4
(3,484 Views)