LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Config File VIs cause plugin to not execute

Hi All,

 

I have an application that uses a call by reference plugin architecture. I make sure to include the connector pane on the type specifier in my executable, so my inputs and outputs are specified at compile time. Each time I deploy an executable with a new version of LabVIEW, I mass compile the ever-growing directory of plugins (stored as regular LabVIEW VIs) in the same version of LabVIEW and carry on. This system has worked well for several years.

 

Recently I have decided to upgrade the plugin capability. I had included a File Path control on the connector pane originally, but never used it as an optional input. Now I have started using it, and the connector pane seems to work fine. But when I add Configuration File VIs (native LabVIEW VIs) to my plugin, they cause the code to not execute! As soon as I add a single Config File VI (Open File, Read or Write or Close), the executable pitches an error 1003 that the code is not executable. If I remove the subVI, the plugin loads and executes correctly.

 

I thought perhaps it had something to do with polymorphic instances handled by RTE, so I removed all those. Same problem. Even a single instance of Write Key.vi with a constant refnum is enough to make the executable pitch the error.

 

Why can I not add Configuration File VIs to a LabVIEW plugin to be run by compiled executable?

 

BTW - I'm running LV 2011 SP1 on Win 7.

0 Kudos
Message 1 of 3
(2,405 Views)

I can only offer the following statement:

 

between 8.6 and 2009 the configuration file API was completely revised.  (I like the changes)

 

you cannot "mix-N-match" the APIs.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 3
(2,398 Views)

I talked with NI Tech support this AM about this issue. It turns out there is an easy solution (in my case).

 

The problem is that the Configuration File VIs are not included in my EXE build. And since they are "native" LabVIEW VIs (VIs built by NI and included with LabVIEW, not primitive functions), they are not included with the runtime engine (RTE). Therefore, after the EXE has been built (without the Configuration File VIs), the RTE doesn't know where to find the Config VIs when it tries to load the Plugin VI.

 

I think there are at least 2 solutions to this problem. First, I could include all the Config VIs that I ever plan to use into my EXE build. I have done this and it works. In my case there will only ever be 4 or 5, so that is a reasonable approach.

 

The other approach that might work, although I have not tried it, would be to place a copy of each Config VI into the same directory (or project library) as the plugin. That way, the required subVI will be available for loading by the RTE. You might have to play around with renaming the Config VIs and making sure that your plugin is linked directly to the ones in the same directory, not the default native LabVIEW VIs.

0 Kudos
Message 3 of 3
(2,383 Views)