Julius Correia Posted August 10, 2005 Report Share Posted August 10, 2005 Hi, This is my first post to this forum. I have spent some time going through the forum am now ready to post!. I feel myself luck to have found this forum. Ok, I am trying to build an exe out of the plugin example that ships with labview 7.1. Though the plugin example works well, when i built an exe, it dosen't seem to work. I mean plugin VIs are not detected. I have a hunch that path needs to be considered when building an application with Plugins. However even after hardcoding the plugin directory path in my VI, i am unable to get the desired results. Is there anything i am missing here ?. Thanks in advance. Quote Link to comment
Neville D Posted August 10, 2005 Report Share Posted August 10, 2005 Hi,This is my first post to this forum. I have spent some time going through the forum am now ready to post!. I feel myself luck to have found this forum. Ok, I am trying to build an exe out of the plugin example that ships with labview 7.1. Though the plugin example works well, when i built an exe, it dosen't seem to work. I mean plugin VIs are not detected. I have a hunch that path needs to be considered when building an application with Plugins. However even after hardcoding the plugin directory path in my VI, i am unable to get the desired results. Is there anything i am missing here ?. Thanks in advance. 5597[/snapback] Say your plugins are in plugin.exe, and the vi is First.vi. Specify absolute path as C:\plugins.exe\First.vi. Don't forget that the path is now *.exe not *.llb as before. Hope this helps. Neville. Quote Link to comment
Julius Correia Posted August 11, 2005 Author Report Share Posted August 11, 2005 Say your plugins are in plugin.exe, and the vi is First.vi. Specify absolute path as C:\plugins.exe\First.vi. Don't forget that the path is now *.exe not *.llb as before.Hope this helps. Neville. 5609[/snapback] Thanks for your reply. I do not intent to create exe out of my plugins. So i do not have plugins.exe as you mentioned. My plugin folder contains the VIs (and their support VI's) that i want to add (to my main application) during the course of time without changing(rebuilding) my main application (the loader VI, which is loader.exe). My problem is that, I have been able to acheive this functionality with VIs, However when i built an exe i do not get desired results. An example would be wonderful. Hope i am understood. Quote Link to comment
Neville D Posted August 11, 2005 Report Share Posted August 11, 2005 Thanks for your reply. I do not intent to create exe out of my plugins. So i do not have plugins.exe as you mentioned. My plugin folder contains the VIs (and their support VI's) that i want to add (to my main application) during the course of time without changing(rebuilding) my main application (the loader VI, which is loader.exe). My problem is that, I have been able to acheive this functionality with VIs, However when i built an exe i do not get desired results. An example would be wonderful. Hope i am understood. 5614[/snapback] I am not sure, but you may not be able to call a VI from an executable. Just build your plugin VIs into an exe as well, and then try it. It should be an easy test. Neville. Quote Link to comment
Rolf Kalbermatter Posted August 12, 2005 Report Share Posted August 12, 2005 I am not sure, but you may not be able to call a VI from an executable. Just build your plugin VIs into an exe as well, and then try it. It should be an easy test.Neville. 5617[/snapback] You can call external VIs from an executable using VI server. However you have to be aware of a few things. 1) The VI must be in the same version of LabVIEW as was use to create the executable. 2) Calculating the path of an external plugin VI in respect to the VI inside the executable needs to take into account that a VI in an executable is always at the path <application directory>/<your exececutable>.exe/<your VI>.vi So assuming the plugin VIs are located in the same directory as the executable file you need to strip two times from the path you get from the This VI Path node and then append the VI name of your plugin. 3) The plugin must be able to reference any and every subVI directly. This means any subVI used by the plugin not already contained in the executable needs to be copied at a place where the VI can find them. Just copying the plugin VI into the application directory will in most cases not work. Better would be to load the plugin VI in LabVIEW and then Using Save with Options save the entire hierarchy to a new location, using LLBs, including vi.lib and any other option in the selection in the dialog and then save it. Move that LLB into the executable directory and adjust the path mentioned in point 2) to also account for the new LLB name in the path. This solution isn't very nice in that each plugin will contain all subVIs eventhough they might be already present in another plugin or the executable itself. It will however run as long as you don't happen to create two different subVIs having the same name. To get a more elaborate plugin distribution with plugin specific functions in the plugin LLB and the rest being added to the executable or some support LLB is far beyond a short esxplanation like this. It basically won't be possible without some custom made tools, where the OpenG Builder may actually be a good starting point to go from there. Rolf Kalbermatter Quote Link to comment
duehli Posted October 13, 2005 Report Share Posted October 13, 2005 I'm having the same problem, but Rolf's solution doesn't help in my situation. I have an application built in LabVIEW 7.1. Users can write plugins for that application, they are called exactly like Rolf suggested. But now one user has only LabVIEW 7.0. As these plugins are loaded into application memory space (LV runtime 7.1) the VI doesn't execute. As a solution, I'd like to call the VI directly in the development environment. But I guess, as Neville D said, this isn't possible. Any suggestions? Thanks, Daniel Quote Link to comment
duehli Posted October 17, 2005 Report Share Posted October 17, 2005 If anybody is interested, I found the solution. The trick is, use the real IP address of the machine (or its name) in "Open Application Reference". Using "localhost", "127.0.0.1", "" will all return a reference to the application, regardless of the port specified. But when using the real IP/name it will actually open a TCP connection and you can choose by port which reference you want. Like this you can call VIs in LabVIEW from your built application. :thumbup: Quote Link to comment
Mike Ashe Posted November 6, 2005 Report Share Posted November 6, 2005 You might also compile your plugins as DLLs, one for each plugin. Since you can call those DLLs from any language, you can also call them from LabVIEW and this should also let you mix LabVIEW versions, like having your main exe in 7.1 and a plugin DLL in 7.0 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.