From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I find out which vi's are dynamic?

I am working on a project made up of hundreds of VIs. I have to make an standalone executable version of it. I was not the original developer. Is there a way I can scan the vi's to find out which of them are dynamic? What should I be looking for as a telltale sign of being dynamic (What makes a vi dynamic?)
Are all vit's dynamic? (I was told by my senior developer to include all vit's in the dynamic section of the build dialog box.)


Message Edited by rashid19672008 on 02-27-2008 03:25 PM
0 Kudos
Message 1 of 16
(3,672 Views)
Hi rashid19672008,
normally all vi´s loaded with the "open VI reference" block are dynamic. This include all your vit´s.
Mike


Message Edited by MikeS81 on 02-27-2008 04:50 AM
0 Kudos
Message 2 of 16
(3,661 Views)

This is not a property of a VI, but rather a way of using it. You can call any VI either way (or both ways), so whether a VI is called dynamically depends on your code.

One way of finding whether a VI does not have static calls is to open all the VIs in the hierarchy at the same time and then go over each of them in a loop, open a reference to it and check its "Callers" property. If the array is empty, it means that this VI is not called by any other VI currently in memory and might be called dynamically. It might also mean that it is an old VI and is not used any more.

Another option is to create a copy of the hierarchy using File>>Save With Options. LabVIEW will only copy the VIs which are called statically and you can then compare the hierarchies for files which are only found in the original.


___________________
Try to take over the world!
0 Kudos
Message 3 of 16
(3,655 Views)
When starting a new project, a good practice is to save the dynamic VIs in a specific folder. This will make it easy to locate them and reduce the risk to forgot to include them when configuring the build specifications.
0 Kudos
Message 4 of 16
(3,649 Views)
Thanks JB for such a golden idea. This should be made a habit by every developer. (I wish the original developers of the project had followed this advice, I intend to anyway).
0 Kudos
Message 5 of 16
(3,631 Views)
Thanks MikeS81 for the reply. Is "open VI reference" the only way to call a vi dynamically or there are other methods as well?
0 Kudos
Message 6 of 16
(3,630 Views)

Hi rashid,

i guess this is the only way to load a vi dynamically. I know no other way to do it.

Mike

0 Kudos
Message 7 of 16
(3,625 Views)
I thank NI for it. Life would have been hard if it was otherwise.
Thanks MikeS81!
0 Kudos
Message 8 of 16
(3,621 Views)
I also make a VI "All dynamic VIs.vi", with all dynamic vi's in it. When
editting subVI's, I have this VI opened so I know when one of them breaks.
It also helps when you rename a VI, or save it under a different name.

That doesn't help with an existing project though.

The use of dynamic VI's is advanced stuff, and if no precausions (like JB
suggested) are taken, could really mess up things. A primitive way of
finding out is to compile the code without any dynamic VI's, and see what is
not working...

Regards,

Wiebe.


0 Kudos
Message 9 of 16
(3,620 Views)
There are two ways to call a VI dynamically but both use Open VI Reference. See the document with this nice title : Differences between Calling a VI with an Invoke Node and Calling a VI with a Call by Reference Node.
0 Kudos
Message 10 of 16
(3,614 Views)