Jump to content

Question about making the Executable file with GOOP


Recommended Posts

I has just finished coding a project with LabVIEW and GOOP. Now I want to make executable file for this project. My friend told me that I just need to add the VIs created by GOOP which is called by reference in to the project, and add it to the Dynamic VIs and Support Files. But when I finish building the Exe file, and when I run the .exe file, I met some error about looking for some VIs relating to the Process, Queue.

I don't know which files I should add to the project or I should add them all?

Thank you in advance for you time of reading and answering this question.

Thang Nguyen

Link to comment

Hi Thang

I think you are using GOOP Developer for this project.

If so then if you are using CreateByRef to dynamicaly call object creators then you need to save the object creators and the dependant code as an llb, simply save the creator as development distribution in the save with options dialog. Note your CreateByRef then has to call the required creator using the llb in the path ie MyProject\Plugins\DataIO.Digital.llb\DataIO.Digital.Create.vi

Let me know how you go, if you need a demo then please let me know.

Link to comment

I moddified the ObjectPersist demo code that implements plugins so it can be built as an exe. To download the code simply go the the following post.

Object Persistence with Open Goop Template

The sorce and a built exe are included in the download, you will see a plugin directory that contains the object llb's that are dynamicaly called.

Hope this helps.

Link to comment

Hi,

@ Kurt: Please tell me more detail how did you build the llb for GOOP Developer object? In each your llb example, I see there are alot of VIs. Do we have to build the project for all of files? I did not see your project in the directory. It makes me confuse.

@ Tomi Maila: I have just try to add the directory of the object as you say, but in the GOOP, there are some templete VIs still not finish. The exe builder can not run.

How about another sub VIs?

Link to comment

Hey Thang

I did the demo and exe under 7.0, so the steps to make the object llb's for say the DataIO.DataSocket.Digital object is as follows.

1) Open the DataIO.DataSocket.Digital.Create.vi

2) Select Save with Options...

3) At the Save with Options dialog select Development Distribution but include vi.lib files then hit Save

4) At the Choose a directory or VI library dialog rename the file names from DataIO.DataSocket.Digital.Create.llb to DataIO.DataSocket.Digital.llb, navigate to the Plugins directory and hit Save.

If you are using 8.2 then you need to:

1) Open the DataIO.DataSocket.Digital.Create.vi

2) select Save As...

3) At the Save dialog select select Duplicate hierachy to new location.

4) Reanme DataIO.DataSocket.Digital.Create Folder to DataIO.DataSocket.Digital.llb, navigate to the Plugins directory and hit Select.

As I've mentioned before if you are experiencing difficulty then I am happy to assist via a code review. You have my details, contact me if you wish to do so.

Link to comment

I have a small problem with this. In one of my GOOP VI, I use a VI from OpenG. Then when I build the llb files, it is added automatically in the llb. Now, when I build the .exe file. I meet this error:

Polymorphic VIs cannot be used as Startup/Exported or Dynamic VIs for applications or shared libraries.

C:\Program Files\National Instruments\LabVIEW 8.2\user.lib\_OpenG.lib\array\array.llb\Sort 2D Array__ogtk.vi

so I can not build the .exe file.

Please tell me the solution.

Thank you,

Thang Nguyen

Link to comment

QUOTE(SciWare @ Apr 3 2007, 06:20 PM)

I'll have a look at this and get back to you soon with something that will help you out.

Hi Kurt,

This is my remaining error when running the .exe. I built the .exe with only specificing the call by reference VIs only.

I hope you can understand something from here. I have the same error for another object which acquise the data.

Error 1013 occurred at Invoke Node in weaLogger.LaunchProcess.vi->weaLogger.New.vi->weaLogger.Create.vi->DAQ Main Screen.v

Possible reason(s):

LabVIEW: Cannot load front panel.

The front panel for D:\My project\My Application\WEAapplication.exe\weaLogger.Process.vi could not be loaded but is required by this property or method.

Waiting for your reply.

Link to comment

The Process needs to retain its FP when it is built or placed in an llb as property nodes are used to initialise the object input to the process instance. The code prevents the FP being striped in a build by a control property node being present. Check that in your process a property node for the object control exists that just returns the label text, it should be sitting in the left hand sequence.

Also if you are building your object as a llb then choose not to remove front panels.

I've just done up the DynamicPersist demo under 8.2 that shows how to build your objects as plugins, I'll have it up in about an hour and I'll post a link when its done, I think this will help you out.

Link to comment

Thank you very much for your help.

I think I should tell about my file structure. I think that it may help.

+ "GUI" directory to store the GUI VIs.

+ "SUBVIs" directory to store the sub VIs (which is not GOOP).

+ "GOOP" directory to store GOOP object.

+ "DB" directory to store configurationg file.

+ "DataFiles" directory to store logging files.

I want to know beside the llb from GOOP. Do I have to add another directory when build the .exe file?

Thank again.

Thang Nguyen

Link to comment

I've built the DynamicPersistDemo under 8.2 and have created build specifications that create the exe and the plugin library, download the code and exe here

There are two projects, DynamicPersist.lvproj manages the application and contains the build specifications for the exe, the other Plugins.lvproj holds the build settings for creating the Plugin.llb which contains the desired objects that will be called dynamically by the DynamicPersist.exe

Take a close look at the build specifications, check that your additional exclusions in the plugin build is not "Remove as much as possible".

I hope this helps

QUOTE(Thang Nguyen @ Apr 5 2007, 12:29 AM)

I want to know beside the llb from GOOP. Do I have to add another directory when build the .exe file?

It's up to you, I generally create a Bin directory that stores the exe and associated support files, to keep it sepparated from the source.

Link to comment

Dear Kurt,

Sorry, but I still have trouble with these call by ref stuffs :headbang: .

I have some questions.

+ First, I tried to build the plugins.llb like you which only include the create VI which will be call by ref VI. But in my plugins.llb, there are only these create VI. Why in your plugins.llb there are also other VIs? Beside that, I built exactly like you. The program can read in the configuration file already. There are just remaining problem with call by ref.

+ Second, this is one of my error:

Is it the problem with path?. My program runs well, so there is no problem with VIs.

Error 1003 occurred at Open VI Reference in weaDataIO.CreateByRef.vi->WEA Create IO FP Objects__wea.vi->DAQ Main Screen.vi

Possible reason(s):

LabVIEW: The VI is not executable. Most likely the VI is broken or one of its subVIs cannot be located. Open the VI in LabVIEW using File>>Open and verify that it is runnable.

VI Path: D:\My Project\Bin\plugins.llb\weaDataIO.FieldPoint.Create.vi

+ Third, this is another error, about the queue in GOOP

Error 1 occurred at Enqueue Element in weaDAControl.Start.vi->DAQ Main Screen.vi

Possible reason(s):

LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.

==> This is the VI start the process of object.

Waiting for your reply.

Link to comment

QUOTE(Thang Nguyen @ Apr 5 2007, 06:59 AM)

I changed the VI property of the process VI to Open FP, then it's fine with this problem now. Did I do it right?

Hey Thang

I've never had to change the VI property of the process VI to Open FP to get an active object proccess working, either for an object included in an exe or an external plugin. If this has resolved your issue and your are now continuing with your project then go with it. However I'm concerned that something in your code or your build proccess has stripped out the FP of your proccess when it is built into the exe or packaged as a plugin object.

Without seeing your code and reviewing it, it's difficult to diagnose your application, and what you are trying to achieve is non trivial. At this point I can only discuss and provide demonstrations of how I would engineer a similar application. My offer of providing code review is allways open and I think this in the end would be the most effective way for me to help you if you are still experiencing difficulties, hey its free as well.

Link to comment

Hi Kurt,

I found the bug which doesn't allow the .exe file run. That is the link to the old source from which I copied. There is no hint to find this problem unstill I copy the old source to another driver.

Thank you very much for your support. I find your steps to build .exe is really helpfull. I highly appricate your help with detailed example.

Thang Nguyen

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.