LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Static VI reference only available in Development Environment (2011)?

Solved!
Go to solution

Hi there,

 

I am having a problem where a static VI reference will break my entire executable in LV 2011. (I put a diagram disable structure around the reference and the problem stopped). It only becomes a problem when I build the executable, but works fine in the development environment. This was originally a LV 2012 project which I saved for LV 2011. The offending piece of code looks like this:

 

Capture.PNG

Does anyone know why this is happening or a work around?

Thank you,

Gregory

0 Kudos
Message 1 of 21
(4,901 Views)

For an asynchronous call, the VI refnum has to be strictly typed.  Right click the constant, Select VI Server Class, Browse and select your VI.  I'm not sure what the red star means in your picture.  I've seen it before but not sure what it means. 

 

Capture.PNG

aputman
0 Kudos
Message 2 of 21
(4,870 Views)

Hi aputman,

 

The red star does signify strict type definition I believe. 

0 Kudos
Message 3 of 21
(4,859 Views)

If so, then the problem is going to be with file location. In IDE mode, the VI is loaded in memory and so it operates fine but in EXE mode, it is not found because you're supplying absolute path with the property node. Instead, specify a path relative to the calling VI. 

aputman
0 Kudos
Message 4 of 21
(4,854 Views)

I see, but the odd thing is that it works fine in a LV 2012 built executable. And the code you posted above should run in an executable too, no?

0 Kudos
Message 5 of 21
(4,850 Views)

Use VI name instead of VI path. Does that change anything? The VI is already loaded in memory by the static reference, so no need to specify the whole path to the Open VI Reference.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 6 of 21
(4,831 Views)

Thank you Rolf, I can try that, but the executable reports that the VI is broken with the Static VI reference in there, so I think it will still be a problem. I will give it a try in the morning though, 

 

Gregory

0 Kudos
Message 7 of 21
(4,818 Views)

Gregory,

 

     I haven't tried this in LabVIEW 2011, but I've been using this method for "cloning" VIs for a while.  I do agree with Rolf, however -- I always use the VI Name property, not the VI Path, and it works in both Development and Execution mode.

 

Bob Schor

0 Kudos
Message 8 of 21
(4,811 Views)

As Rolf suggest using the name would certainly work and we are using it with no issue.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 9 of 21
(4,791 Views)

Is the Main added as Always include in the project? It should understand it's supposed to since it's static, but won't hurt. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 21
(4,790 Views)