10-11-2013 04:14 PM
I have a sub vi that I want to use to capture values of the inputs of a calling VI. The capture process is shown in the attachment.When I use this sub vi in any calling VIs in developper mode it works all the time, but when I complile the package it works always for some instances and never for other instances (in the same Top Level VI) . The heirarchy is Top level, Intermediate, and viref capture routine . The intent is to capture the values that the Top Level Passes to the Intermediate Level. The fault is that in the compiled mode the PNL controls reference produces 0 elements . I have looked at the build parameters for some settng I might need to set, but there is nothing obvious.
The code is LabView 2012.
10-11-2013 04:49 PM
If the VI is a supporting VI amd never is required to show the front panel then the front panel is not included when built into an executable. No front panel, no front panel controls and no control references You need to make sure the VIs you want to get references to include the front panel. In the Build Specification select the category Source FIle Settings. Then select each file you want to preserve the front panel on and uncheck Use default save settings the uncheck Remove front panel. If all the files are in a folder in the project you can select the folder and select Set save settings for all contained items to affect all the VIs in the folder.
10-12-2013 03:22 PM
Making sure that the build specification was set not to remove the panel helped. It did provide a value for every sub vi that contained the profiling vi; however, in some cases the value of the returned field in the compiled version was null whereas the value in the version run in developper mode had the correct value. I have four sub vis in which I have embedded profiling VI : 2 work fine in compiled mode and 2 return the field names with null values. I think that I have marked them all the same in the build file (see attachement). Furhter build field considerations ?
10-14-2013 10:14 AM
I'm not sure if I understand what's happening now. I think yoy're saying you no get a reference to all controls but some property of some of the controls returns a NULL instead of the expected value. Is that corect? If so, what type of controls return the expected value and what type of controls return NULLs?
10-14-2013 03:43 PM
All the controls are either TEXT scalar or TEXT 1-dimensional array. In developper mode everthing works, but when compile the Parent VI I get a reference to all of them , but for some instances of using the profiling VI I get null values for each of the field lables.
10-15-2013 05:55 PM
You said that 2 instances return the correct values and two return nulls. Is it always the same VIs that have nulls returned? Are the values actually null or do they just look blank? You can check for that by setting the display to codes display mode.