11-19-2009 06:43 AM
I am looking at the merge feature of LabVIEW. I have an attached zip with 3 VIs to merge. The 3 VIs are simple. Each with an Enum with one element wired to a case statement that performs a basic math function. their are 2 controls in each VI with the same name and 1 indicator with the same name.
The expected behavior would be to add 2 cases along with the corresponding enum to the base VI.
Instead I get conflicts all the way around.
It appears that the merge only works for incorporating changes, not additions. Can someone confirm or recommend a different method for accomplishing this?
-p
11-20-2009 10:06 AM
Hi Paul,
The function of merging VIs is indeed for making changes. The idea is that you have a base VI, which is common to both yours and theirs. You then have two different sets of changes to that base VI, yours and theirs. When you merge the VIs the tool looks for the changes between yours and theirs. This is what causes the conflicts. The conflicts are supposed to be there, and you have to choose which changes to incorporate to resolve the conflicts. The final result, after you resolve the conflicts by choosing which VI change to use, is a combination of yours and theirs.
If you use three completely different VIs you get a mess because there is no common code. You end up getting bits and pieces of yours and theirs and they don't really go together at all. So, the long winded answer to your question is that I am you are right. The merge VI function is for incorporating changes to the base VI.
There is no direct method for adding VIs together the way you are trying to do it. I would recommend creating type defs which will allow you to only have to make the changes once manually (but you will still have to change it manually the first time). You can also try using VI scripting. This is an NI Labs project, so we don't currently support it, but you may find it useful. Take a look at the link below:
LabVIEW Scripting
http://decibel.ni.com/content/community/zone/blog/2009/06/22/labview-scripting
Nick Keel
Applications Engineering
National Instruments