09-24-2010 01:44 AM
Hi.
In this thread (http://forums.ni.com/t5/LabVIEW/How-to-access-a-known-control-in-a-VI-reference/td-p/1255244) I attempted to modify our under development test system, so that we didn't have to change the same main VI for every test that we are adding, since we are several persons who'll be adding tests (i.e. conflicts would arise, that we would have to iron out manually every time). The solution in the thread above works very well, by opening a reference to the test sub VI and calling the reference. I then can pass data to the sub VI, and can get the test results from the sub VI. Great!
The problem came when running the program through the Application Builder. The test system starts up fine, but the above method fails miserably, since the sub VI files are no longer there. It seems that the sub VI's are not a part of the exe binary file coming from the Application Builder.
So I'm drawing a blank here. Does anyone have a suggestion on how to to this? I'm only seeing the two options. Either adding the sub VI's in the same main VI file, but then we have to be very careful on not getting conflicts (or fix the conflicts manually when they arise). Or use the dynamic VI referencing, but then the system doesn't work with the Application Builder (which means that this method is out). Is there a third method of doing this?
09-24-2010 04:15 AM
I believe I've found the problem here.
Firstly the sub VI files weren't included in the exe file. But that was just a matter of adjusting the settings of the Application Builder. But lastly, there seems to be a bug with the Check if File or Folder Exists VI. After the program has been built, it seems that the Check if... VI can't find any files inside the .exe file.
09-24-2010 04:53 AM
Hi ojohnsen,
which LabVIEW version do you use? There are differences in the versions.
Why do you think you can't work with the dynamic call solution?
Mike
09-24-2010 05:35 AM
Hi Mike.
I use LabVIEW 2009.
Well, I actually *can* use the dynamic call solution now. The problem was that (1) the files weren't included in the exe file (fixed by adjusting the Application Builder settings), and (2) the Check if File or Folder Exist VI doesn't work if I try to check if the sub VI is present inside the exe file. The solution here was basically to ommit the whole Check if File or Folder Exist VI, and just do an error check on the Open VI Reference VI. The Open VI Reference VI will fail if trying to open a reference to a file that doesn't exist, so I just wired that to a case loop around the Call By Reference VI.